|
Carlos Lopez |
a09598 |
#Author: Jaime Irving Davila
|
|
Carlos Lopez |
a09598 |
#Date: 23/09/2001
|
|
Carlos Lopez |
a09598 |
#Modified on 15/04/2002
|
|
Carlos Lopez |
a09598 |
#Given to the public domain
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variables useful for the customization of the makefile
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the document (without the sgml extension)
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
DOC = synfig-studio
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the file used for the index (without the sgml extension)
|
|
Carlos Lopez |
a09598 |
INDEX = index
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the compiler of the sgml, could be jade, openjade, ..
|
|
Carlos Lopez |
a09598 |
COMPILER = openjade
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Location of the stylesheet for the html output
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
DBSTYLESHEET = /usr/share/sgml/docbook/stylesheet/dsssl/ldp/ldp.dsl
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Options for generating multiple HTML output
|
|
Carlos Lopez |
a09598 |
MULTIPLEHTMLOPT = -t sgml -ihtml -d${DBSTYLESHEET}\#html
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the directory for the source sgml
|
|
Carlos Lopez |
a09598 |
SGMLDIR = en
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the directory for the "others" files
|
|
Carlos Lopez |
a09598 |
OTHERSDIR = ${SGMLDIR}/others
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the directory for the png files
|
|
Carlos Lopez |
a09598 |
PNGDIR = png
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
RESULTDIR = result/${SGMLDIR}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the directory for the output of the multiple html
|
|
Carlos Lopez |
a09598 |
MULTIPLEHTMLDIR = ${RESULTDIR}/out-htmls
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the directory for the output the ps file
|
|
Carlos Lopez |
a09598 |
PSDIR = ${RESULTDIR}/out-ps
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the script which generates the ps file, in RedHat it's db2ps
|
|
Carlos Lopez |
a09598 |
SCRIPTPS = db2ps
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Name of the directory for the temp and tmp-output the pdf file
|
|
Carlos Lopez |
a09598 |
PDFDIR = ${RESULTDIR}/tmp-pdf
|
|
Carlos Lopez |
a09598 |
#Name of the script which generates the ps file, in RedHat it's db2ps
|
|
Carlos Lopez |
a09598 |
SCRIPTPDF = db2pdf
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variables needed by the rules, should NOT be changed
|
|
Carlos Lopez |
a09598 |
#Variable for including the sgml source file
|
|
Carlos Lopez |
a09598 |
VPATH = ${SGMLDIR}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for knowing if there exists the sgml index file, in case it
|
|
Carlos Lopez |
a09598 |
#NOT exists its value is empty, otherwise it's the name of the index
|
|
Carlos Lopez |
a09598 |
ISINDEX = ${findstring ${INDEX}, ${wildcard ${SGMLDIR}/*.sgml}}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for knowing if the tag init will be needed
|
|
Carlos Lopez |
a09598 |
ifneq (${ISINDEX}, ${INDEX})
|
|
Carlos Lopez |
a09598 |
USEINIT = init
|
|
Carlos Lopez |
a09598 |
endif
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for storing the name of all the sgml source files directory
|
|
Carlos Lopez |
a09598 |
SRCFILES = $(patsubst ${SGMLDIR}/${INDEX}.sgml,,$(wildcard ${SGMLDIR}/*))
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for storing the name of all the files in the "others" directory
|
|
Carlos Lopez |
a09598 |
OTHERFILES = $(wildcard ${OTHERSDIR}/*)
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for storing the names of the "others" files placed in the
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for storing the names of the "others" files placed in the
|
|
Carlos Lopez |
a09598 |
#multiple-html directory
|
|
Carlos Lopez |
a09598 |
OTHERMULTIPLE = $(patsubst ${SGMLDIR}/others/%, ${MULTIPLEHTMLDIR}/%, ${OTHERFILES} )
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for storing the names of the png's pictures
|
|
Carlos Lopez |
a09598 |
PNGFILES = $(wildcard ${PNGDIR}/*.png)
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for storing the names of the png's files placed on the
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for storing the names of the png's files placed on the
|
|
Carlos Lopez |
a09598 |
#single-html directory
|
|
Carlos Lopez |
a09598 |
PNGMULTIPLE = $(patsubst ${PNGDIR}/%, ${MULTIPLEHTMLDIR}/%, ${PNGFILES})
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Variable for storing the names of the eps files
|
|
Carlos Lopez |
a09598 |
FIGEPS = $(patsubst ${PNGDIR}/%.png, ${PSDIR}/%.eps, ${PNGFILES})
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
PATH_LANG = ${CURDIR}/${SGMLDIR}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
all: multiple-html ps pdf
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
.PHONY: all clean init cpfilessingle multiple-html cpfilesmultiple distsource ps
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Rules needed for generating multiple html files
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
multiple-html: ${MULTIPLEHTMLDIR}/${DOC}.html cpfilesmultiple
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${MULTIPLEHTMLDIR}/${DOC}.html: ${MULTIPLEHTMLDIR} ${INDEX}.sgml.m ${SGMLDIR}/${DOC}.tmp.sgml
|
|
Carlos Lopez |
a09598 |
#cp -f ${SGMLDIR}/${INDEX}.sgml.m ${SGMLDIR}/${INDEX}.sgml
|
|
Carlos Lopez |
a09598 |
${COMPILER} ${MULTIPLEHTMLOPT} ${SGMLDIR}/${DOC}.tmp.sgml
|
|
Carlos Lopez |
a09598 |
mv *.html ${MULTIPLEHTMLDIR}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${SGMLDIR}/${DOC}.tmp.sgml: ${SGMLDIR}/${DOC}.sgml
|
|
Carlos Lopez |
a09598 |
sed "s:##PATHLANG##:${PATH_LANG}:" ${SGMLDIR}/${DOC}.sgml > ${SGMLDIR}/${DOC}.tmp.sgml
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
HTML.index.m: ${DOC}.sgml ${SRCFILES} ${USEINIT} ${SGMLDIR}/${DOC}.tmp.sgml
|
|
Carlos Lopez |
a09598 |
${COMPILER} ${MULTIPLEHTMLOPT} -V html-index ${SGMLDIR}/${DOC}.tmp.sgml > /dev/null
|
|
Carlos Lopez |
a09598 |
mv HTML.index ${SGMLDIR}/HTML.index.m
|
|
Carlos Lopez |
a09598 |
rm *.html
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${INDEX}.sgml.m: HTML.index.m
|
|
Carlos Lopez |
a09598 |
perl -S collateindex.pl -o ${SGMLDIR}/${INDEX}.sgml.m ${SGMLDIR}/HTML.index.m
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${MULTIPLEHTMLDIR}:
|
|
Carlos Lopez |
a09598 |
mkdir -p ${MULTIPLEHTMLDIR}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
cpfilesmultiple: ${PNGMULTIPLE} ${OTHERMULTIPLE}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${MULTIPLEHTMLDIR}/%.png: ${PNGDIR}/%.png
|
|
Carlos Lopez |
a09598 |
cp -rf $< $@
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${MULTIPLEHTMLDIR}/%: ${OTHERSDIR}/%
|
|
Carlos Lopez |
a09598 |
cp -rf $< $@
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Rules needed for generating the ps file
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
ps: ${PSDIR}/${DOC}.ps
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${PSDIR}/${DOC}.ps: ${PSDIR} ${FIGEPS} ${INDEX}.sgml.m
|
|
Carlos Lopez |
a09598 |
cp -rf ${SGMLDIR}/*.sgml ${PSDIR}
|
|
Carlos Lopez |
a09598 |
cd ${PSDIR}; ${SCRIPTPS} ${DOC}.tmp.sgml ; mv ${DOC}.tmp.ps ${DOC}.ps
|
|
Carlos Lopez |
a09598 |
cd ..
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${PSDIR}/%.eps: ${PNGDIR}/%.png ${PSDIR}
|
|
Carlos Lopez |
a09598 |
convert $< $@
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${PSDIR}:
|
|
Carlos Lopez |
a09598 |
mkdir -p ${PSDIR}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Rules needed for generating the pdf file
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
pdf: ${PDFDIR}/${DOC}.pdf
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${PDFDIR}/${DOC}.pdf: ${PDFDIR} ${INDEX}.sgml.m
|
|
Carlos Lopez |
a09598 |
cp -rf ${PNGDIR}/* ${PDFDIR}
|
|
Carlos Lopez |
a09598 |
cp -rf ${SGMLDIR}/*.sgml ${PDFDIR}
|
|
Carlos Lopez |
a09598 |
cp -rf ${SGMLDIR}/* ${PDFDIR}
|
|
Carlos Lopez |
a09598 |
mv ${PDFDIR}/${DOC}.tmp.sgml ${PDFDIR}/${DOC}.sgml
|
|
Carlos Lopez |
a09598 |
cd ${PDFDIR};${SCRIPTPDF} ${DOC}.sgml
|
|
Carlos Lopez |
a09598 |
cd ..
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
${PDFDIR}:
|
|
Carlos Lopez |
a09598 |
mkdir -p ${PDFDIR}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#Some additional and standard tags
|
|
Carlos Lopez |
a09598 |
init:
|
|
Carlos Lopez |
a09598 |
perl -S collateindex.pl -N -o ${SGMLDIR}/${INDEX}.sgml
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
distsource: clean
|
|
Carlos Lopez |
a09598 |
tar cvfz ${DOC}.tar.gz *
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
clean:
|
|
Carlos Lopez |
a09598 |
rm -rf ${MULTIPLEHTMLDIR} ${SGMLDIR}/*.index.* ${SGMLDIR}/${INDEX}.sgml* nil ${PSDIR} ${PDFDIR}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
|