2005-06-23 18:29:46 +01:00
|
|
|
BASEDIR=~/lfs-book
|
2005-08-29 20:11:10 +01:00
|
|
|
DUMPDIR=~/lfs-commands
|
2004-07-13 12:09:03 +01:00
|
|
|
CHUNK_QUIET=0
|
|
|
|
PDF_OUTPUT=LFS-BOOK.pdf
|
|
|
|
NOCHUNKS_OUTPUT=LFS-BOOK.html
|
2006-12-04 04:48:25 +00:00
|
|
|
|
2004-05-03 11:33:11 +01:00
|
|
|
lfs:
|
2005-02-19 22:16:42 +00:00
|
|
|
xsltproc --xinclude --nonet -stringparam profile.condition html \
|
2006-05-26 03:10:19 +01:00
|
|
|
-stringparam chunk.quietly $(CHUNK_QUIET) -stringparam base.dir $(BASEDIR)/ \
|
2005-02-19 22:16:42 +00:00
|
|
|
stylesheets/lfs-chunked.xsl index.xml
|
2004-05-03 11:33:11 +01:00
|
|
|
|
2004-07-13 12:09:03 +01:00
|
|
|
if [ ! -e $(BASEDIR)/stylesheets ]; then \
|
|
|
|
mkdir -p $(BASEDIR)/stylesheets; \
|
|
|
|
fi;
|
|
|
|
cp stylesheets/*.css $(BASEDIR)/stylesheets
|
|
|
|
|
|
|
|
if [ ! -e $(BASEDIR)/images ]; then \
|
|
|
|
mkdir -p $(BASEDIR)/images; \
|
|
|
|
fi;
|
2007-02-09 22:04:35 +00:00
|
|
|
cp images/*.png $(BASEDIR)/images
|
2004-07-13 12:09:03 +01:00
|
|
|
cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" \
|
2004-12-19 21:17:48 +00:00
|
|
|
*.html
|
2004-07-13 12:09:03 +01:00
|
|
|
cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
|
2004-12-19 21:17:48 +00:00
|
|
|
*.html
|
2004-05-03 11:33:11 +01:00
|
|
|
|
2005-07-22 12:50:14 +01:00
|
|
|
for filename in `find $(BASEDIR) -name "*.html"`; do \
|
2005-07-26 20:42:52 +01:00
|
|
|
tidy -config tidy.conf $$filename; \
|
|
|
|
true; \
|
|
|
|
sh obfuscate.sh $$filename; \
|
2004-09-15 20:37:05 +01:00
|
|
|
sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
|
|
|
|
done;
|
2006-12-04 10:08:02 +00:00
|
|
|
|
2006-12-04 04:48:25 +00:00
|
|
|
$(MAKE) wget-list
|
|
|
|
|
|
|
|
wget-list:
|
2006-12-04 10:08:02 +00:00
|
|
|
mkdir -p $(BASEDIR)
|
|
|
|
xsltproc --xinclude --nonet stylesheets/wget-list.xsl chapter03/chapter03.xml > $(BASEDIR)/wget-list
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2005-02-21 21:19:30 +00:00
|
|
|
# Uncomment this for testing and stable versions
|
|
|
|
#pdf:
|
|
|
|
# xsltproc --xinclude --nonet --stringparam profile.condition pdf \
|
|
|
|
# --output $(BASEDIR)/lfs-pdf.xml stylesheets/lfs-profile.xsl index.xml
|
|
|
|
# xsltproc --nonet --output $(BASEDIR)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
|
|
|
|
# $(BASEDIR)/lfs-pdf.xml
|
|
|
|
# sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
|
|
|
|
# fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
|
|
|
|
# rm $(BASEDIR)/lfs-pdf.xml $(BASEDIR)/lfs-pdf.fo
|
2004-05-03 11:33:11 +01:00
|
|
|
|
2005-02-21 21:19:30 +00:00
|
|
|
# Remove this for testing and stable versions
|
2004-08-10 20:20:54 +01:00
|
|
|
pdf:
|
2007-04-15 16:52:16 +01:00
|
|
|
xsltproc --xinclude --nonet --output $(BASEDIR)/lfs-pdf.fo \
|
2005-02-21 21:19:30 +00:00
|
|
|
stylesheets/lfs-pdf.xsl index.xml
|
2007-04-15 16:52:16 +01:00
|
|
|
sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
|
|
|
|
fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
|
|
|
|
rm $(BASEDIR)/lfs-pdf.fo
|
2004-05-18 21:45:56 +01:00
|
|
|
|
|
|
|
nochunks:
|
2005-02-19 22:16:42 +00:00
|
|
|
xsltproc --xinclude --nonet -stringparam profile.condition html \
|
|
|
|
--output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
|
2004-05-18 21:45:56 +01:00
|
|
|
stylesheets/lfs-nochunks.xsl index.xml
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2004-08-10 20:20:54 +01:00
|
|
|
tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
|
2004-05-18 21:45:56 +01:00
|
|
|
|
2005-08-29 19:52:43 +01:00
|
|
|
sh obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
sed -i -e "s@text/html@application/xhtml+xml@g" \
|
|
|
|
$(BASEDIR)/$(NOCHUNKS_OUTPUT)
|
|
|
|
|
2005-08-29 20:11:10 +01:00
|
|
|
dump-commands:
|
|
|
|
xsltproc --xinclude --nonet --output $(DUMPDIR)/ \
|
|
|
|
stylesheets/dump-commands.xsl index.xml
|
|
|
|
|
2004-05-03 11:33:11 +01:00
|
|
|
validate:
|
|
|
|
xmllint --noout --nonet --xinclude --postvalid index.xml
|
2004-08-10 20:20:54 +01:00
|
|
|
|