source: Makefile@ 05d60ce

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 05d60ce was 05d60ce, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added a versose flag and other fixes to the Makefile.
Changed obfuscate.sh to try to prevent hangs when parsing nonchunked output.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8203 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[edb9842]1BASEDIR=~/lfs-book
[2c5e4d5]2DUMPDIR=~/lfs-commands
[0e6d3c0]3CHUNK_QUIET=1
4ROOT_ID=""
[44758be]5PDF_OUTPUT=LFS-BOOK.pdf
6NOCHUNKS_OUTPUT=LFS-BOOK.html
[3a4594b]7
[05d60ce]8ifdef V
9 Q =
10else
11 Q = @
12endif
13
[0e6d3c0]14lfs: validxml profile-html
15 @echo "Generating chunked XHTML files..."
[05d60ce]16 $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
[0e6d3c0]17 -stringparam rootid $(ROOT_ID) -stringparam base.dir $(BASEDIR)/ \
18 stylesheets/lfs-chunked.xsl /tmp/lfs-html.xml
[287ea55]19
[0e6d3c0]20 @echo "Copying CSS code and images..."
[05d60ce]21 $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
[44758be]22 mkdir -p $(BASEDIR)/stylesheets; \
23 fi;
[05d60ce]24 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
25 $(Q)if [ ! -e $(BASEDIR)/images ]; then \
[44758be]26 mkdir -p $(BASEDIR)/images; \
27 fi;
[05d60ce]28 $(Q)cp images/*.png $(BASEDIR)/images
29 $(Q)cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" *.html
30 $(Q)cd $(BASEDIR)/; sed -i -e "s@../images@images@g" *.html
[287ea55]31
[05d60ce]32 @echo "Running Tidy and obfuscate.sh..."
33 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
[132fd16]34 tidy -config tidy.conf $$filename; \
35 true; \
36 sh obfuscate.sh $$filename; \
[3879ebc]37 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
38 done;
[5470c67]39
[05d60ce]40 $(Q)$(MAKE) wget-list
[3a4594b]41
[0e6d3c0]42pdf: validxml
43 @echo "Generating profiled XML for PDF..."
[05d60ce]44 $(Q)xsltproc --nonet --stringparam profile.condition pdf \
[0e6d3c0]45 --output /tmp/lfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \
46 /tmp/lfs-full.xml
47
48 @echo "Generating FO file..."
[05d60ce]49 $(Q)xsltproc --nonet -stringparam rootid $(ROOT_ID) \
[0e6d3c0]50 --output /tmp//lfs-pdf.fo stylesheets/lfs-pdf.xsl /tmp/lfs-pdf.xml
[05d60ce]51 $(Q)sed -i -e 's/span="inherit"/span="all"/' /tmp/lfs-pdf.fo
[0e6d3c0]52
53 @echo "Generating PDF file..."
[05d60ce]54 $(Q)fop /tmp/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
[0e6d3c0]55
56nochunks: validxml profile-html
57 @echo "Generating non chunked XHTML file..."
[05d60ce]58 $(Q)xsltproc --nonet -stringparam profile.condition html \
[0e6d3c0]59 -stringparam rootid $(ROOT_ID) --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
60 stylesheets/lfs-nochunks.xsl /tmp/lfs-html.xml
61
62 @echo "Running Tidy..."
[05d60ce]63 $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
64 @echo "Running obfuscate.sh..."
65 $(Q)sh obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
66 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" \
[81fd230]67 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
68
[0e6d3c0]69validxml:
70 @echo "Validating the book..."
[05d60ce]71 $(Q)xmllint --nonet --noent --xinclude --postvalid \
[0e6d3c0]72 -o /tmp/lfs-full.xml index.xml
73
74profile-html: validxml
75 @echo "Generating profiled XML for XHTML..."
[05d60ce]76 $(Q)xsltproc --nonet --stringparam profile.condition html \
[0e6d3c0]77 --output /tmp/lfs-html.xml stylesheets/lfs-xsl/profile.xsl \
78 /tmp/lfs-full.xml
79
80wget-list:
81 @echo "Generating wget list..."
[05d60ce]82 $(Q)mkdir -p $(BASEDIR)
83 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/wget-list \
[0e6d3c0]84 stylesheets/wget-list.xsl chapter03/chapter03.xml
85
[05d60ce]86dump-commands: validxml
[0e6d3c0]87 @echo "Dumping book commands..."
[05d60ce]88 $(Q)xsltproc --output $(DUMPDIR)/ \
89 stylesheets/dump-commands.xsl /tmp/lfs-full.xml
[2c5e4d5]90
[287ea55]91validate:
[0e6d3c0]92 @echo "Validating the book..."
[05d60ce]93 $(Q)xmllint --noout --nonet --xinclude --postvalid index.xml
[0e6d3c0]94
95all: lfs nochunks pdf dump-commands
[536b6aa]96
[0e6d3c0]97.PHONY : all dump-commands lfs nochunks pdf profile-html validate validxml wget-list
Note: See TracBrowser for help on using the repository browser.