2004-02-01 11:47:51 +08:00
|
|
|
# Makefile for BLFS Book generation.
|
|
|
|
# By Tushar Teredesai <tushar@linuxfromscratch.org>
|
|
|
|
# 2004-01-31
|
|
|
|
# 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/
|
|
|
|
TEXBASEDIR= $(HOME)/public_html/blfs-book-tex
|
2004-02-01 11:47:51 +08:00
|
|
|
|
|
|
|
SRCDIR = $(PWD)
|
|
|
|
|
2004-05-03 06:52:09 +08:00
|
|
|
all: blfs-old
|
|
|
|
|
|
|
|
blfs-old: index.xml
|
2004-02-01 11:47:51 +08:00
|
|
|
@if [ -z $(OUTPUTDIR) ]; then \
|
|
|
|
echo "Envar OUTPUTDIR is not set!" ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi
|
2004-04-14 00:23:43 +08:00
|
|
|
@echo "Generating HTML Version of BLFS Book with $(JADE)..."
|
2004-02-01 11:47:51 +08:00
|
|
|
@echo " OUTPUTDIR = $(OUTPUTDIR)"
|
|
|
|
@$(INSTALL) -d $(OUTPUTDIR)
|
|
|
|
@cd $(OUTPUTDIR) && $(INSTALL) -d introduction postlfs general \
|
|
|
|
connect basicnet server content x kde gnome xsoft \
|
|
|
|
multimedia pst preface appendices other
|
2004-05-03 06:52:09 +08:00
|
|
|
@cd $(OUTPUTDIR) && $(JADE) -t sgml -D $(DOCBOOK)/html \
|
|
|
|
-d $(SRCDIR)/blfs.dsl $(DOCBOOK)/dtds/decls/xml.dcl \
|
|
|
|
$(SRCDIR)/index.xml
|
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;
|
|
|
|
cp stylesheets/blfs.css $(BASEDIR)stylesheets
|
|
|
|
if [ ! -e $(BASEDIR)images ]; then \
|
|
|
|
mkdir -p $(BASEDIR)images; \
|
|
|
|
fi;
|
|
|
|
cp /usr/share/xml/docbook/xsl-stylesheets-1.65.1/images/*.png \
|
|
|
|
$(BASEDIR)images
|
|
|
|
cd $(BASEDIR); sed -i -e "s@../stylesheets@stylesheets@" \
|
|
|
|
index.html
|
|
|
|
cd $(BASEDIR); sed -i -e "s@../images@images@g" \
|
|
|
|
index.html
|
|
|
|
|
|
|
|
pdf:
|
2004-04-14 00:23:43 +08:00
|
|
|
xsltproc --xinclude --nonet --output blfs.fo
|
2004-04-13 09:59:18 +08:00
|
|
|
stylesheets/blfs-pdf.xsl \
|
|
|
|
index.xml
|
2004-04-14 00:23:43 +08:00
|
|
|
fop.sh blfs.fo blfs.pdf
|
|
|
|
|
|
|
|
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
|
|
|
|
# i.e. Changelog
|
|
|
|
xsltproc --nonet --output $(TEXBASEDIR)/index.xml \
|
|
|
|
--stringparam "profile.role" "book" \
|
|
|
|
http://docbook.sourceforge.net/release/xsl/current/profiling/profile.xsl \
|
|
|
|
index.xml
|
|
|
|
@cd $(TEXBASEDIR) && xsltproc --nonet -o blfs-book.tex \
|
|
|
|
$(SRCDIR)/stylesheets/blfs-tex.xsl index.xml
|
2004-05-03 06:52:09 +08:00
|
|
|
|