source: Makefile@ 5094344a

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 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 5094344a was 5094344a, checked in by Matthew Burgess <matthew@…>, 12 years ago

Fix hyperlink to wget-list output in the nochunks HTML output. Fixes #2956.

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

  • Property mode set to 100644
File size: 4.2 KB
Line 
1BASEDIR = ~/lfs-book
2DUMPDIR = ~/lfs-commands
3RENDERTMP = $(HOME)/tmp
4CHUNK_QUIET = 1
5ROOT_ID =
6PDF_OUTPUT = LFS-BOOK.pdf
7NOCHUNKS_OUTPUT = LFS-BOOK.html
8
9ifdef V
10 Q =
11else
12 Q = @
13endif
14
15lfs: maketar validxml profile-html
16 @echo "Generating chunked XHTML files..."
17 $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
18 -stringparam rootid "$(ROOT_ID)" -stringparam base.dir $(BASEDIR)/ \
19 stylesheets/lfs-chunked.xsl $(RENDERTMP)/lfs-html.xml
20
21 @echo "Copying CSS code and images..."
22 $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
23 mkdir -p $(BASEDIR)/stylesheets; \
24 fi;
25 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
26 $(Q)if [ ! -e $(BASEDIR)/images ]; then \
27 mkdir -p $(BASEDIR)/images; \
28 fi;
29 $(Q)cp images/*.png $(BASEDIR)/images
30 $(Q)cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" *.html
31 $(Q)cd $(BASEDIR)/; sed -i -e "s@../images@images@g" *.html
32
33 @echo "Running Tidy and obfuscate.sh..."
34 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
35 tidy -config tidy.conf $$filename; \
36 true; \
37 /bin/bash obfuscate.sh $$filename; \
38 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
39 done;
40
41 $(Q)$(MAKE) wget-list
42
43pdf: validxml
44 @echo "Generating profiled XML for PDF..."
45 $(Q)xsltproc --nonet --stringparam profile.condition pdf \
46 --output $(RENDERTMP)/lfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \
47 $(RENDERTMP)/lfs-full.xml
48
49 @echo "Generating FO file..."
50 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
51 --output $(RENDERTMP)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
52 $(RENDERTMP)/lfs-pdf.xml
53 $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/lfs-pdf.fo
54 $(Q)bash pdf-fixups.sh $(RENDERTMP)/lfs-pdf.fo
55
56 @echo "Generating PDF file..."
57 $(Q)if [ ! -e $(BASEDIR) ]; then \
58 mkdir -p $(BASEDIR); \
59 fi;
60 $(Q)fop $(RENDERTMP)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
61
62nochunks: maketar validxml profile-html
63 @echo "Generating non chunked XHTML file..."
64 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
65 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
66 stylesheets/lfs-nochunks.xsl $(RENDERTMP)/lfs-html.xml
67
68 @echo "Running Tidy..."
69 $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
70 @echo "Running obfuscate.sh..."
71 $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
72 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" \
73 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
74 $(Q)sed -i -e "s@../wget-list@wget-list@" \
75 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
76 $(Q)$(MAKE) wget-list
77
78tmpdir:
79 @echo "Creating and cleaning $(RENDERTMP)"
80 $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
81 $(Q)rm -f $(RENDERTMP)/lfs-{full,html,pdf}.xml
82 $(Q)rm -f $(RENDERTMP)/lfs-pdf.fo
83
84validxml: tmpdir
85 @echo "Processing bootscripts..."
86 $(Q)bash process-scripts.sh
87 @echo "Validating the book..."
88 $(Q)xmllint --nonet --noent --xinclude --postvalid \
89 -o $(RENDERTMP)/lfs-full.xml index.xml
90 $(Q)rm -f appendices/*.script
91 $(Q)./aux-file-data.sh $(RENDERTMP)/lfs-full.xml
92
93maketar:
94 $(Q)if [ "x$(MAKETAR)" == "x" ]; then \
95 echo "Making tarballs..."; \
96 sh make-aux-files.sh; \
97 fi;
98
99profile-html: validxml
100 @echo "Generating profiled XML for XHTML..."
101 $(Q)xsltproc --nonet --stringparam profile.condition html \
102 --output $(RENDERTMP)/lfs-html.xml stylesheets/lfs-xsl/profile.xsl \
103 $(RENDERTMP)/lfs-full.xml
104
105wget-list:
106 @echo "Generating wget list..."
107 $(Q)mkdir -p $(BASEDIR)
108 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/wget-list \
109 stylesheets/wget-list.xsl chapter03/chapter03.xml
110
111md5sums:
112 @echo "Generating md5sum file..."
113 $(Q)mkdir -p $(BASEDIR)
114 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/md5sums \
115 stylesheets/md5sum.xsl chapter03/chapter03.xml
116 $(Q)sed -i -e "s/BOOTSCRIPTS-MD5SUM/$(shell md5sum lfs-bootscripts*.tar.bz2 | cut -d' ' -f1)/" \
117 $(BASEDIR)/md5sums
118 $(Q)sed -i -e "s/UDEV-MD5SUM/$(shell md5sum udev-config*.tar.bz2 | cut -d' ' -f1)/" \
119 $(BASEDIR)/md5sums
120
121
122dump-commands: validxml
123 @echo "Dumping book commands..."
124 $(Q)xsltproc --output $(DUMPDIR)/ \
125 stylesheets/dump-commands.xsl $(RENDERTMP)/lfs-full.xml
126
127validate: maketar validxml
128 @echo "Validation complete."
129
130all: lfs nochunks pdf dump-commands md5sums
131
132.PHONY : all dump-commands lfs nochunks pdf profile-html tmpdir validate \
133 validxml wget-list maketar md5sums
Note: See TracBrowser for help on using the repository browser.