Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. BASEDIR=~/lfs-book
  2. lfs:
  3. xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR)/ \
  4. stylesheets/lfs-chunked.xsl index.xml
  5. if [ ! -e $(BASEDIR)/stylesheets ]; then \
  6. mkdir -p $(BASEDIR)/stylesheets; \
  7. fi;
  8. cp stylesheets/lfs.css $(BASEDIR)/stylesheets
  9. if [ ! -e $(BASEDIR)/images ]; then \
  10. mkdir -p $(BASEDIR)/images; \
  11. fi;
  12. cp /usr/share/xml/docbook/xsl-stylesheets-1.65.1/images/*.png \
  13. $(BASEDIR)/images
  14. cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@" \
  15. index.html part1.html part2.html part3.html longindex.html
  16. cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
  17. index.html part1.html part2.html part3.html longindex.html
  18. sh goTidy $(BASEDIR)/
  19. pdf:
  20. xsltproc --xinclude --nonet --output lfs.fo stylesheets/lfs-pdf.xsl \
  21. index.xml
  22. sed -i -e "s/inherit/all/" lfs.fo
  23. fop.sh lfs.fo lfs.pdf
  24. print:
  25. xsltproc --xinclude --nonet --output lfs-print.fo \
  26. stylesheets/lfs-print.xsl index.xml
  27. sed -i -e "s/inherit/all/" lfs-print.fo
  28. fop.sh lfs-print.fo lfs-print.pdf
  29. nochunks:
  30. xsltproc --xinclude --nonet --output lfs.html \
  31. stylesheets/lfs-nochunks.xsl index.xml
  32. tidy -config tidy.conf lfs.html || true
  33. validate:
  34. xmllint --noout --nonet --xinclude --postvalid index.xml