source: Makefile@ a3115ae

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb v5_1 v5_1-pre1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since a3115ae was 3984104, checked in by Bruce Dubbs <bdubbs@…>, 20 years ago

Update to style sheets; added tidy to Makefile

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2171 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 2.8 KB
Line 
1# Makefile for BLFS Book generation.
2# By Tushar Teredesai <tushar@linuxfromscratch.org>
3# 2004-01-31
4# Adjust these to suit your installation
5OUTPUTDIR = $(HOME)/public_html/blfs-book
6INSTALL = install
7JADE = openjade
8DOCBOOK = /usr/share/sgml/docbook/dsssl-stylesheets-1.78
9BASEDIR= $(HOME)/public_html/blfs-book-xsl/
10TEXBASEDIR= $(HOME)/public_html/blfs-book-tex/
11
12SRCDIR = $(PWD)
13
14all: blfs
15
16blfs-old: index.xml
17 @if [ -z $(OUTPUTDIR) ]; then \
18 echo "Envar OUTPUTDIR is not set!" ; \
19 exit 1 ; \
20 fi
21 @echo "Generating HTML Version of BLFS Book with $(JADE)..."
22 @echo " OUTPUTDIR = $(OUTPUTDIR)"
23 @$(INSTALL) -d $(OUTPUTDIR)
24 @cd $(OUTPUTDIR) && $(INSTALL) -d introduction postlfs general \
25 connect basicnet server content x kde gnome xsoft \
26 multimedia pst preface appendices other
27 @cd $(OUTPUTDIR) && $(JADE) -t sgml -D $(DOCBOOK)/html \
28 -d $(SRCDIR)/blfs.dsl $(DOCBOOK)/dtds/decls/xml.dcl \
29 $(SRCDIR)/index.xml
30
31blfs:
32 @if [ -z $(BASEDIR) ]; then \
33 echo "Envar BASEDIR is not set!" ; \
34 exit 1 ; \
35 fi
36 @echo "Generating XHTML Version of BLFS Book with xsltproc..."
37 @echo " BASEDIR = $(BASEDIR)"
38 @$(INSTALL) -d $(BASEDIR)
39 xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR) \
40 stylesheets/blfs-chunked.xsl index.xml
41 if [ ! -e $(BASEDIR)stylesheets ]; then \
42 mkdir -p $(BASEDIR)stylesheets; \
43 fi;
44 cp stylesheets/*.css $(BASEDIR)stylesheets
45 if [ ! -e $(BASEDIR)images ]; then \
46 mkdir -p $(BASEDIR)images; \
47 fi;
48 cp images/*.png $(BASEDIR)/images
49 cd $(BASEDIR); sed -i -e "s@../stylesheets@stylesheets@" \
50 index.html
51 cd $(BASEDIR); sed -i -e "s@../images@images@g" \
52 index.html
53 sh goTidy $(BASEDIR)/
54
55pdf:
56 xsltproc --xinclude --nonet --output blfs.fo \
57 stylesheets/blfs-pdf.xsl \
58 index.xml
59 sed -i -e "s/inherit/all/" blfs.fo
60 /opt/fop/fop.sh blfs.fo blfs.pdf
61 $(INSTALL) -d $(BASEDIR)pdf
62 rm blfs.fo
63 mv blfs.pdf $(BASEDIR)pdf
64
65print:
66 xsltproc --xinclude --nonet --output blfs-print.fo \
67 stylesheets/blfs-print.xsl index.xml
68 sed -i -e "s/inherit/all/" blfs-print.fo
69 /opt/fop/fop.sh blfs-print.fo blfs-print.pdf
70 $(INSTALL) -d $(BASEDIR)print
71 rm blfs-print.fo
72 mv blfs-print.pdf $(BASEDIR)print
73
74tex:
75 @if [ -z $(TEXBASEDIR) ]; then \
76 echo "Envar TEXBASEDIR is not set!" ; \
77 exit 1 ; \
78 fi
79 @echo "Generating TeX Version of BLFS Book with xsltproc..."
80 @echo " TEXBASEDIR = $(TEXBASEDIR)"
81 @$(INSTALL) -d $(TEXBASEDIR)
82# Using profiles in book source to exclude parts of the book from TeX
83# i.e. Changelog
84 xsltproc --nonet --output $(TEXBASEDIR)index.xml \
85 --stringparam "profile.role" "book" \
86 http://docbook.sourceforge.net/release/xsl/current/profiling/profile.xsl \
87 index.xml
88 @cd $(TEXBASEDIR) && xsltproc --nonet -o blfs-book.tex \
89 $(SRCDIR)/stylesheets/blfs-tex.xsl index.xml
90
91validate:
92 xmllint --noout --nonet index.xml
Note: See TracBrowser for help on using the repository browser.