Makefile 1.4 KB

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