### Convert cvsbook texinfo files to Info, HTML, PostScript, etc.
VERSION = 1.21
NAME = cvsbook
DISTFILES = README Makefile cvsbook.el TODO fix-anchors.py
.PHONY: translations german
all: www
www: 3rd_edition 1st_edition translations dist
3rd_edition:
rm -f OSDevWithCVS_3E.tar.gz OSDevWithCVS_3E.zip
tar zcf OSDevWithCVS_3E.tar.gz OSDevWithCVS_3E
zip OSDevWithCVS_3E.zip OSDevWithCVS_3E/*
1st_edition: version ps pdf info html
translations: german
german:
cp translations/german/Inhalt.html translations/german/index.html
version:
echo "@set VERSION ${VERSION}" > version.texi
info: version
makeinfo main.texi
html: version html-monolithic html-distributed
html-monolithic: version
makeinfo --no-split --html main.texi > cvsbook.html
html-distributed: version
@echo Non-monolithic HTML not supported.
dvi: version
tex main.texi
ps: dvi
dvips main.dvi -o cvsbook.ps
pdf: ps
ps2pdf cvsbook.ps cvsbook.pdf
dist: info-dist html-dist ps-dist pdf-dist texi-dist big-dist
html-dist:
gzip -c --best ${NAME}.html > ${NAME}.html.gz
zip ${NAME}.html.zip ${NAME}.html
ps-dist:
gzip -c --best ${NAME}.ps > ${NAME}.ps.gz
zip ${NAME}.ps.zip ${NAME}.ps
pdf-dist:
gzip -c --best ${NAME}.pdf > ${NAME}.pdf.gz
zip ${NAME}.pdf.zip ${NAME}.pdf
info-dist:
mkdir ${NAME}-${VERSION}
cp *.info* ${DISTFILES} ${NAME}-${VERSION}
tar cvf ${NAME}-${VERSION}-info.tar ${NAME}-${VERSION}
gzip --best ${NAME}-${VERSION}-info.tar
zip ${NAME}-${VERSION}-info.zip ${NAME}-${VERSION}/*
rm -rf ${NAME}-${VERSION}
texi-dist:
mkdir ${NAME}-${VERSION}
cp *.texi ${DISTFILES} ${NAME}-${VERSION}
tar cvf ${NAME}-${VERSION}-texi.tar ${NAME}-${VERSION}
gzip --best ${NAME}-${VERSION}-texi.tar
zip ${NAME}-${VERSION}-texi.zip ${NAME}-${VERSION}/*
rm -rf ${NAME}-${VERSION}
big-dist:
mkdir ${NAME}-${VERSION}
cp ${DISTFILES} *.texi *.info* *.html *.ps *.pdf *.sh \
${NAME}-${VERSION}
if [ -f ${NAME}-${VERSION}/${NAME}.html ]; then \
rm -f ${NAME}-${VERSION}/${NAME}-${VERSION}.html; \
fi
if [ -f ${NAME}-${VERSION}/${NAME}.ps ]; then \
rm -f ${NAME}-${VERSION}/${NAME}-${VERSION}.ps; \
fi
tar cvf ${NAME}-${VERSION}-all.tar ${NAME}-${VERSION}
gzip --best ${NAME}-${VERSION}-all.tar
zip ${NAME}-${VERSION}-all.zip ${NAME}-${VERSION}/*
rm -rf ${NAME}-${VERSION}
texclean:
rm -f *~ *.aux *.cp *.cps *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr
clean: texclean
rm -f cvsbook*.info* cvsbook*.html cvsbook*.ps *.pdf *.tar *.gz *.zip
rm -rf ${NAME}-${VERSION}