Use LinkableValueNode members functions when possible in the derived valuenodes.
[synfig.git] / synfig-docs / Makefile
1 #Author: Jaime Irving Davila
2 #Date: 23/09/2001
3 #Modified on 15/04/2002
4 #Given to the public domain
5
6 #Variables useful for the customization of the makefile
7
8 #Name of the document (without the sgml extension)
9
10 DOC = synfig-studio
11
12 #Name of the file used for the index (without the sgml extension)
13 INDEX = index
14
15 #Name of the compiler of the sgml, could be jade, openjade, ..
16 COMPILER = openjade
17
18 #Location of the stylesheet for the html output
19
20 DBSTYLESHEET = /usr/share/sgml/docbook/stylesheet/dsssl/ldp/ldp.dsl
21
22 #Options for generating multiple HTML output
23 MULTIPLEHTMLOPT = -t sgml -ihtml -d${DBSTYLESHEET}\#html 
24
25 #Name of the directory for the source sgml
26 SGMLDIR = en
27
28 #Name of the directory for the "others" files
29 OTHERSDIR = ${SGMLDIR}/others
30
31 #Name of the directory for the png files
32 PNGDIR = png
33
34 RESULTDIR = result/${SGMLDIR}
35
36 #Name of the directory for the output of the multiple html
37 MULTIPLEHTMLDIR = ${RESULTDIR}/out-htmls
38
39 #Name of the directory for the output the ps file
40 PSDIR = ${RESULTDIR}/out-ps
41
42 #Name of the script which generates the ps file, in RedHat it's db2ps
43 SCRIPTPS = db2ps
44
45 #Name of the directory for the temp and tmp-output the pdf file
46 PDFDIR = ${RESULTDIR}/tmp-pdf
47 #Name of the script which generates the ps file, in RedHat it's db2ps
48 SCRIPTPDF = db2pdf
49
50 #Variables needed by the rules, should NOT be changed
51 #Variable for including the sgml source file
52 VPATH = ${SGMLDIR}
53
54 #Variable for knowing if there exists the sgml index file, in case it
55 #NOT exists its value is empty, otherwise it's the name of the index
56 ISINDEX = ${findstring ${INDEX}, ${wildcard ${SGMLDIR}/*.sgml}}
57
58 #Variable for knowing if the tag init will be needed
59 ifneq (${ISINDEX}, ${INDEX})
60         USEINIT = init
61 endif
62
63 #Variable for storing the name of all the sgml source files directory
64 SRCFILES = $(patsubst ${SGMLDIR}/${INDEX}.sgml,,$(wildcard ${SGMLDIR}/*))
65
66 #Variable for storing the name of all the files in the "others" directory
67 OTHERFILES = $(wildcard ${OTHERSDIR}/*)
68
69 #Variable for storing the names of the "others" files placed in the
70
71 #Variable for storing the names of the "others" files placed in the
72 #multiple-html directory
73 OTHERMULTIPLE = $(patsubst ${SGMLDIR}/others/%, ${MULTIPLEHTMLDIR}/%, ${OTHERFILES} )
74
75 #Variable for storing the names of the png's pictures
76 PNGFILES = $(wildcard ${PNGDIR}/*.png)
77
78 #Variable for storing the names of the png's files placed on the
79
80 #Variable for storing the names of the png's files placed on the
81 #single-html directory
82 PNGMULTIPLE = $(patsubst ${PNGDIR}/%, ${MULTIPLEHTMLDIR}/%, ${PNGFILES})
83
84 #Variable for storing the names of the eps files
85 FIGEPS = $(patsubst ${PNGDIR}/%.png, ${PSDIR}/%.eps, ${PNGFILES})
86
87 PATH_LANG = ${CURDIR}/${SGMLDIR}
88
89 all: multiple-html ps pdf
90
91 .PHONY: all clean init cpfilessingle multiple-html cpfilesmultiple distsource ps
92
93 #Rules needed for generating multiple html files
94
95 multiple-html: ${MULTIPLEHTMLDIR}/${DOC}.html cpfilesmultiple
96
97 ${MULTIPLEHTMLDIR}/${DOC}.html: ${MULTIPLEHTMLDIR} ${INDEX}.sgml.m ${SGMLDIR}/${DOC}.tmp.sgml
98         #cp -f ${SGMLDIR}/${INDEX}.sgml.m ${SGMLDIR}/${INDEX}.sgml
99         ${COMPILER} ${MULTIPLEHTMLOPT} ${SGMLDIR}/${DOC}.tmp.sgml
100         mv *.html ${MULTIPLEHTMLDIR}
101
102 ${SGMLDIR}/${DOC}.tmp.sgml: ${SGMLDIR}/${DOC}.sgml
103         sed "s:##PATHLANG##:${PATH_LANG}:" ${SGMLDIR}/${DOC}.sgml > ${SGMLDIR}/${DOC}.tmp.sgml
104
105 HTML.index.m: ${DOC}.sgml ${SRCFILES} ${USEINIT} ${SGMLDIR}/${DOC}.tmp.sgml
106         ${COMPILER} ${MULTIPLEHTMLOPT} -V html-index ${SGMLDIR}/${DOC}.tmp.sgml > /dev/null
107         mv HTML.index ${SGMLDIR}/HTML.index.m
108         rm *.html
109
110 ${INDEX}.sgml.m: HTML.index.m
111         perl -S collateindex.pl -o ${SGMLDIR}/${INDEX}.sgml.m ${SGMLDIR}/HTML.index.m
112
113 ${MULTIPLEHTMLDIR}:
114         mkdir -p ${MULTIPLEHTMLDIR}
115
116 cpfilesmultiple: ${PNGMULTIPLE} ${OTHERMULTIPLE}
117
118 ${MULTIPLEHTMLDIR}/%.png: ${PNGDIR}/%.png
119         cp -rf $< $@
120
121 ${MULTIPLEHTMLDIR}/%: ${OTHERSDIR}/%
122         cp -rf $< $@
123
124 #Rules needed for generating the ps file
125
126 ps: ${PSDIR}/${DOC}.ps
127
128 ${PSDIR}/${DOC}.ps: ${PSDIR} ${FIGEPS} ${INDEX}.sgml.m
129         cp -rf ${SGMLDIR}/*.sgml ${PSDIR}
130         cd ${PSDIR}; ${SCRIPTPS} ${DOC}.tmp.sgml ; mv ${DOC}.tmp.ps ${DOC}.ps
131         cd ..
132
133 ${PSDIR}/%.eps: ${PNGDIR}/%.png ${PSDIR}
134         convert $< $@
135
136 ${PSDIR}:
137         mkdir -p ${PSDIR}
138
139 #Rules needed for generating the pdf file
140
141 pdf: ${PDFDIR}/${DOC}.pdf
142
143 ${PDFDIR}/${DOC}.pdf: ${PDFDIR} ${INDEX}.sgml.m
144         cp -rf ${PNGDIR}/* ${PDFDIR}
145         cp -rf ${SGMLDIR}/*.sgml ${PDFDIR}
146         cp -rf ${SGMLDIR}/* ${PDFDIR}
147         mv ${PDFDIR}/${DOC}.tmp.sgml ${PDFDIR}/${DOC}.sgml
148         cd ${PDFDIR};${SCRIPTPDF} ${DOC}.sgml
149         cd ..
150
151 ${PDFDIR}:
152         mkdir -p ${PDFDIR}
153
154 #Some additional and standard tags
155 init:
156         perl -S collateindex.pl -N -o ${SGMLDIR}/${INDEX}.sgml
157
158 distsource: clean
159         tar cvfz ${DOC}.tar.gz *
160
161 clean:
162         rm -rf ${MULTIPLEHTMLDIR} ${SGMLDIR}/*.index.* ${SGMLDIR}/${INDEX}.sgml* nil ${PSDIR} ${PDFDIR}
163
164
165