2004-02-01 11:47:51 +08:00
|
|
|
# Makefile for BLFS Book generation.
|
|
|
|
# By Tushar Teredesai <tushar@linuxfromscratch.org>
|
|
|
|
# 2004-01-31
|
2004-08-10 12:25:57 +08:00
|
|
|
# $LastChangedBy$
|
|
|
|
# $Date$
|
2004-02-01 11:47:51 +08:00
|
|
|
# Adjust these to suit your installation
|
|
|
|
OUTPUTDIR = $(HOME)/public_html/blfs-book
|
|
|
|
INSTALL = install
|
|
|
|
JADE = openjade
|
|
|
|
DOCBOOK = /usr/share/sgml/docbook/dsssl-stylesheets-1.78
|
2004-04-14 00:23:43 +08:00
|
|
|
BASEDIR= $(HOME)/public_html/blfs-book-xsl/
|
2004-05-16 21:45:10 +08:00
|
|
|
TEXBASEDIR= $(HOME)/public_html/blfs-book-tex/
|
2004-02-01 11:47:51 +08:00
|
|
|
|
|
|
|
SRCDIR = $(PWD)
|
|
|
|
|
2004-05-07 15:33:03 +08:00
|
|
|
all: blfs
|
2004-05-03 06:52:09 +08:00
|
|
|
|
2004-04-13 09:59:18 +08:00
|
|
|
blfs:
|
2004-04-14 00:23:43 +08:00
|
|
|
@if [ -z $(BASEDIR) ]; then \
|
|
|
|
echo "Envar BASEDIR is not set!" ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi
|
|
|
|
@echo "Generating XHTML Version of BLFS Book with xsltproc..."
|
|
|
|
@echo " BASEDIR = $(BASEDIR)"
|
|
|
|
@$(INSTALL) -d $(BASEDIR)
|
2004-04-13 09:59:18 +08:00
|
|
|
xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR) \
|
|
|
|
stylesheets/blfs-chunked.xsl index.xml
|
|
|
|
if [ ! -e $(BASEDIR)stylesheets ]; then \
|
|
|
|
mkdir -p $(BASEDIR)stylesheets; \
|
|
|
|
fi;
|
2004-05-17 14:26:42 +08:00
|
|
|
cp stylesheets/*.css $(BASEDIR)stylesheets
|
2004-04-13 09:59:18 +08:00
|
|
|
if [ ! -e $(BASEDIR)images ]; then \
|
|
|
|
mkdir -p $(BASEDIR)images; \
|
|
|
|
fi;
|
2004-05-08 10:42:12 +08:00
|
|
|
cp images/*.png $(BASEDIR)/images
|
2005-01-07 13:14:15 +08:00
|
|
|
cd $(BASEDIR); sed -i -e "s@../stylesheets@stylesheets@g" *.html
|
|
|
|
cd $(BASEDIR); sed -i -e "s@../images@images@g" *.html
|
2004-05-17 14:26:42 +08:00
|
|
|
sh goTidy $(BASEDIR)/
|
2004-04-13 09:59:18 +08:00
|
|
|
|
2005-01-07 13:14:15 +08:00
|
|
|
nochunks:
|
|
|
|
@echo "Generating nochunks version of BLFS..."
|
|
|
|
|
|
|
|
|
2004-04-13 09:59:18 +08:00
|
|
|
pdf:
|
2004-05-08 04:58:23 +08:00
|
|
|
xsltproc --xinclude --nonet --output blfs.fo \
|
2004-04-13 09:59:18 +08:00
|
|
|
stylesheets/blfs-pdf.xsl \
|
|
|
|
index.xml
|
2004-05-08 10:42:12 +08:00
|
|
|
sed -i -e "s/inherit/all/" blfs.fo
|
2004-05-16 21:45:10 +08:00
|
|
|
/opt/fop/fop.sh blfs.fo blfs.pdf
|
|
|
|
$(INSTALL) -d $(BASEDIR)pdf
|
|
|
|
rm blfs.fo
|
|
|
|
mv blfs.pdf $(BASEDIR)pdf
|
2004-04-14 00:23:43 +08:00
|
|
|
|
2004-05-08 10:42:12 +08:00
|
|
|
print:
|
|
|
|
xsltproc --xinclude --nonet --output blfs-print.fo \
|
|
|
|
stylesheets/blfs-print.xsl index.xml
|
|
|
|
sed -i -e "s/inherit/all/" blfs-print.fo
|
2004-05-16 21:45:10 +08:00
|
|
|
/opt/fop/fop.sh blfs-print.fo blfs-print.pdf
|
|
|
|
$(INSTALL) -d $(BASEDIR)print
|
|
|
|
rm blfs-print.fo
|
|
|
|
mv blfs-print.pdf $(BASEDIR)print
|
2004-05-08 10:42:12 +08:00
|
|
|
|
2004-04-14 00:23:43 +08:00
|
|
|
tex:
|
|
|
|
@if [ -z $(TEXBASEDIR) ]; then \
|
|
|
|
echo "Envar TEXBASEDIR is not set!" ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi
|
|
|
|
@echo "Generating TeX Version of BLFS Book with xsltproc..."
|
|
|
|
@echo " TEXBASEDIR = $(TEXBASEDIR)"
|
|
|
|
@$(INSTALL) -d $(TEXBASEDIR)
|
|
|
|
# Using profiles in book source to exclude parts of the book from TeX
|
2004-05-31 03:08:32 +08:00
|
|
|
# i.e., Changelog
|
2004-05-16 21:45:10 +08:00
|
|
|
xsltproc --nonet --output $(TEXBASEDIR)index.xml \
|
2004-04-14 00:23:43 +08:00
|
|
|
--stringparam "profile.role" "book" \
|
|
|
|
http://docbook.sourceforge.net/release/xsl/current/profiling/profile.xsl \
|
|
|
|
index.xml
|
|
|
|
@cd $(TEXBASEDIR) && xsltproc --nonet -o blfs-book.tex \
|
2004-05-16 21:45:10 +08:00
|
|
|
$(SRCDIR)/stylesheets/blfs-tex.xsl index.xml
|
2004-05-03 06:52:09 +08:00
|
|
|
|
2004-05-07 21:04:10 +08:00
|
|
|
validate:
|
2004-06-17 11:24:33 +08:00
|
|
|
xmllint --noout --nonet --xinclude --postvalid index.xml
|
2004-08-08 05:59:36 +08:00
|
|
|
|
|
|
|
blfs-patch-list:
|
|
|
|
@echo "Generating blfs-patch-list..."
|
|
|
|
xsltproc --xinclude --nonet \
|
|
|
|
--output blfs-patch-list stylesheets/patcheslist.xsl index.xml
|
|
|
|
sed -e "s|^.*/||" blfs-patch-list > blfs-patches
|
|
|
|
sort blfs-patches > blfs-patch-list
|
|
|
|
rm blfs-patches
|
|
|
|
|
|
|
|
.PHONY : blfs-patch-list
|