1 # the input file. normally, you will call make with 'make INFILE=my_xml_file_here.xml', to override this.
4 # The xslt processor. We can use xalan or xsltproc standalone. to use libxslt in php5, see xmlformthrough.
6 # Uncomment this block to use xsltproc
7 XSLTPROC
=/usr
/bin
/xsltproc
11 ## Uncomment this block to use xalan
12 #XSLTPROC=/usr/bin/xalan
16 # detect the name of the directory to create for storing the files generated from the input xml document.
17 DIRNAME
=$(shell ${XSLTPROC} ${XSLOPT} xslt
/safename.xslt
${INOPT} ${INFILE})
21 all: ${DIRNAME} ${DIRNAME}/info.txt
${DIRNAME}/table.sql
${DIRNAME}/style.css
${DIRNAME}/new.php
${DIRNAME}/print.php
${DIRNAME}/report.php
${DIRNAME}/view.php
${DIRNAME}/save.php
${DIRNAME}/show.php
26 ${DIRNAME}/%.txt
: xslt
/%.txt.xslt
${INFILE}
27 ${XSLTPROC} ${XSLOPT} xslt
/info.txt.xslt
${INOPT} ${INFILE} > $@
29 ${DIRNAME}/%.sql
: xslt
/%.sql.xslt
${INFILE}
30 ${XSLTPROC} ${XSLOPT} xslt
/$*.sql.xslt
${INOPT} ${INFILE} > $@
32 ${DIRNAME}/%.css
: xslt
/%.css.xslt
${INFILE}
33 ${XSLTPROC} ${XSLOPT} xslt
/$*.css.xslt
${INOPT} ${INFILE} > $@
35 ${DIRNAME}/%.php
: xslt
/%.php.xslt
${INFILE}
36 ${XSLTPROC} ${XSLOPT} xslt
/$*.php.xslt
${INOPT} ${INFILE} > $@
41 formscript.pl
: formscript.pl.orig
42 cat formscript.pl.orig | tr
-d
'\r' > formscript.pl
43 chmod
755 formscript.pl
45 #additional dependancies, to regenerate output when the developer is editing code.
47 ${DIRNAME}/new.php
: xslt
/field_objects.xslt xslt
/common_objects.xslt
49 ${DIRNAME}/print.php
: xslt
/field_objects.xslt xslt
/common_objects.xslt
51 ${DIRNAME}/show.php
: xslt
/field_objects.xslt xslt
/common_objects.xslt xslt
/report_objects.xslt
53 ${DIRNAME}/view.php
: xslt
/field_objects.xslt xslt
/common_objects.xslt
55 ${DIRNAME}/save.php
: xslt
/common_objects.xslt
57 ${DIRNAME}/report.php
: xslt
/common_objects.xslt