source: Makefile@ 1118b17

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 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 1118b17 was 1118b17, checked in by Bruce Dubbs <bdubbs@…>, 8 years ago

Create branches/merge in svn repo fo rtesting of merged LFS books

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/merge@11073 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 6.5 KB
RevLine 
[7d39455]1BASEDIR = ~/lfs-book
[1118b17]2SYSDDIR = ~/lfs-systemd
[7d39455]3DUMPDIR = ~/lfs-commands
4RENDERTMP = $(HOME)/tmp
5CHUNK_QUIET = 1
6ROOT_ID =
7PDF_OUTPUT = LFS-BOOK.pdf
8NOCHUNKS_OUTPUT = LFS-BOOK.html
[5fde2f94]9SHELL = /bin/bash
[3a4594b]10
[05d60ce]11ifdef V
12 Q =
13else
14 Q = @
15endif
16
[1118b17]17sysv: validate profile-html
18 $(Q)xsltproc --nonet \
19 --output $(RENDERTMP)/lfs-html2.xml \
20 --stringparam profile.revision sysv \
21 stylesheets/lfs-xsl/profile.xsl \
22 $(RENDERTMP)/lfs-html.xml
23
[0e6d3c0]24 @echo "Generating chunked XHTML files..."
[1118b17]25 $(Q)xsltproc --nonet \
26 --stringparam chunk.quietly $(CHUNK_QUIET) \
27 --stringparam rootid "$(ROOT_ID)" \
28 --stringparam base.dir $(BASEDIR)/ \
29 stylesheets/lfs-chunked.xsl \
30 $(RENDERTMP)/lfs-html2.xml
[287ea55]31
[0e6d3c0]32 @echo "Copying CSS code and images..."
[05d60ce]33 $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
[44758be]34 mkdir -p $(BASEDIR)/stylesheets; \
35 fi;
[05d60ce]36 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
[1c27a53]37 $(Q)pushd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" *.html; popd
38
[05d60ce]39 $(Q)if [ ! -e $(BASEDIR)/images ]; then \
[44758be]40 mkdir -p $(BASEDIR)/images; \
41 fi;
[05d60ce]42 $(Q)cp images/*.png $(BASEDIR)/images
[1c27a53]43# $(Q)pushd $(BASEDIR)/; sed -i -e "s@../images@images@g" *.html; popd
[287ea55]44
[05d60ce]45 @echo "Running Tidy and obfuscate.sh..."
46 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
[132fd16]47 tidy -config tidy.conf $$filename; \
48 true; \
[66195c8]49 /bin/bash obfuscate.sh $$filename; \
[1118b17]50 sed -e "s@text/html@application/xhtml+xml@g" \
51 -e "s/\xa9/\&copy;/ " \
52 -i $$filename; \
[3879ebc]53 done;
[5470c67]54
[22bcbdd]55 $(Q)$(MAKE) $(BASEDIR)/wget-list $(BASEDIR)/md5sums
[3a4594b]56
[1118b17]57systemd: validated profile-html
58 $(Q)xsltproc --nonet \
59 --output $(RENDERTMP)/lfs-html2.xml \
60 --stringparam profile.revision systemd \
61 stylesheets/lfs-xsl/profile.xsl \
62 $(RENDERTMP)/lfs-html.xml
63
64 @echo "Generating chunked XHTML files..."
65 $(Q)xsltproc --nonet \
66 --stringparam chunk.quietly $(CHUNK_QUIET) \
67 --stringparam rootid "$(ROOT_ID)" \
68 --stringparam base.dir $(SYSDDIR)/ \
69 stylesheets/lfs-chunked.xsl \
70 $(RENDERTMP)/lfs-html2.xml
71
72 @echo "Copying CSS code and images..."
73 $(Q)if [ ! -e $(SYSDDIR)/stylesheets ]; then \
74 mkdir -p $(SYSDDIR)/stylesheets; \
75 fi;
76 $(Q)cp stylesheets/lfs-xsl/*.css $(SYSDDIR)/stylesheets
77
78 $(Q)if [ ! -e $(SYSDDIR)/images ]; then \
79 mkdir -p $(SYSDDIR)/images; \
80 fi;
81 $(Q)cp images/*.png $(SYSDDIR)/images
82
83 @echo "Running Tidy and obfuscate.sh..."
84 $(Q)for filename in `find $(SYSDDIR) -name "*.html"`; do \
85 tidy -config tidy.conf $$filename; \
86 true; \
87 /bin/bash obfuscate.sh $$filename; \
88 sed -e "s@text/html@application/xhtml+xml@g" \
89 -e "s/\xa9/\&copy;/ " \
90 -i $$filename; \
91 done;
92
93# $(Q)$(MAKE) $(SYSDDIR)/wget-list $(SYSDDIR)/md5sumsd
94
[924ab90]95pdf: validate
[0e6d3c0]96 @echo "Generating profiled XML for PDF..."
[05d60ce]97 $(Q)xsltproc --nonet --stringparam profile.condition pdf \
[106dc42]98 --output $(RENDERTMP)/lfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \
99 $(RENDERTMP)/lfs-full.xml
[0e6d3c0]100
101 @echo "Generating FO file..."
[7d39455]102 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
[106dc42]103 --output $(RENDERTMP)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
104 $(RENDERTMP)/lfs-pdf.xml
105 $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/lfs-pdf.fo
[6708e6a]106 $(Q)bash pdf-fixups.sh $(RENDERTMP)/lfs-pdf.fo
[0e6d3c0]107
108 @echo "Generating PDF file..."
[c948b40]109 $(Q)if [ ! -e $(BASEDIR) ]; then \
110 mkdir -p $(BASEDIR); \
111 fi;
[ed480958]112 $(Q)fop -q $(RENDERTMP)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 2>fop.log
113 @echo "$(BASEDIR)/$(PDF_OUTPUT) created"
114 @echo "fop.log created"
[0e6d3c0]115
[924ab90]116nochunks: validate profile-html
[0e6d3c0]117 @echo "Generating non chunked XHTML file..."
[7d39455]118 $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
[0b158f3]119 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
[106dc42]120 stylesheets/lfs-nochunks.xsl $(RENDERTMP)/lfs-html.xml
[0e6d3c0]121
122 @echo "Running Tidy..."
[05d60ce]123 $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
124 @echo "Running obfuscate.sh..."
[22bcbdd]125 $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
126 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
127 $(Q)sed -i -e "s@../wget-list@wget-list@" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
[e679f0b]128 $(Q)sed -i -e "s@../md5sums@md5sums@" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
[22bcbdd]129 $(Q)$(MAKE) $(BASEDIR)/wget-list $(BASEDIR)/md5sums
[81fd230]130
[106dc42]131tmpdir:
132 @echo "Creating and cleaning $(RENDERTMP)"
133 $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
134 $(Q)rm -f $(RENDERTMP)/lfs-{full,html,pdf}.xml
135 $(Q)rm -f $(RENDERTMP)/lfs-pdf.fo
136
[924ab90]137validate: tmpdir
[1c48007]138 @echo "Processing bootscripts..."
[6d13ffb]139 $(Q)bash process-scripts.sh
[0e6d3c0]140 @echo "Validating the book..."
[05d60ce]141 $(Q)xmllint --nonet --noent --xinclude --postvalid \
[106dc42]142 -o $(RENDERTMP)/lfs-full.xml index.xml
[1c48007]143 $(Q)rm -f appendices/*.script
[63f4150]144 $(Q)./aux-file-data.sh $(RENDERTMP)/lfs-full.xml
[924ab90]145 @echo "Validation complete."
[1c48007]146
[1118b17]147validated: tmpdir
148 @echo "Validating the book..."
149 $(Q)xmllint --nonet --noent --xinclude --postvalid \
150 -o $(RENDERTMP)/lfs-full.xml indexd.xml
151 @echo "Validation complete."
152
153profile-html:
[0e6d3c0]154 @echo "Generating profiled XML for XHTML..."
[05d60ce]155 $(Q)xsltproc --nonet --stringparam profile.condition html \
[22bcbdd]156 --output $(RENDERTMP)/lfs-html.xml stylesheets/lfs-xsl/profile.xsl \
157 $(RENDERTMP)/lfs-full.xml
[0e6d3c0]158
[064222a]159wget-list: $(BASEDIR)/wget-list
160$(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent
[0e6d3c0]161 @echo "Generating wget list..."
[05d60ce]162 $(Q)mkdir -p $(BASEDIR)
163 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/wget-list \
[22bcbdd]164 stylesheets/wget-list.xsl chapter03/chapter03.xml
[0e6d3c0]165
[064222a]166md5sums: $(BASEDIR)/md5sums
167$(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent
[daed5a3]168 @echo "Generating md5sum file..."
169 $(Q)mkdir -p $(BASEDIR)
170 $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/md5sums \
[22bcbdd]171 stylesheets/md5sum.xsl chapter03/chapter03.xml
172 $(Q)sed -i -e \
173 "s/BOOTSCRIPTS-MD5SUM/$(shell md5sum lfs-bootscripts*.tar.bz2 | cut -d' ' -f1)/" \
174 $(BASEDIR)/md5sums
[daed5a3]175
[1118b17]176md5sumsd: $(SYSDDIR)/md5sumsd
177$(SYSDDIR)/md5sumsd: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent
178 @echo "Generating md5sum file..."
179 $(Q)mkdir -p $(SYSDDIR)
180 $(Q)xsltproc --xinclude --nonet --output $(SYSDDIR)/md5sums \
181 stylesheets/md5sum.xsl chapter03/chapter03.xml
182
[924ab90]183dump-commands: validate
[0e6d3c0]184 @echo "Dumping book commands..."
[05d60ce]185 $(Q)xsltproc --output $(DUMPDIR)/ \
[106dc42]186 stylesheets/dump-commands.xsl $(RENDERTMP)/lfs-full.xml
[2c5e4d5]187
[0e6d3c0]188
[22bcbdd]189all: lfs nochunks pdf dump-commands
190
191.PHONY : all dump-commands lfs nochunks pdf profile-html tmpdir validate
[536b6aa]192
Note: See TracBrowser for help on using the repository browser.