source: Makefile@ bd899fb

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 bd899fb was 5fde2f94, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Minor clarification in Makefile

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

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