source: Makefile@ cdd254a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since cdd254a was cdd254a, checked in by Dan Nichilson <dnicholson@…>, 17 years ago

Fix Makefile typos

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

  • Property mode set to 100644
File size: 4.5 KB
Line 
1# Makefile for BLFS Book generation.
2# By Tushar Teredesai <tushar@linuxfromscratch.org>
3# 2004-01-31
4# $LastChangedBy$
5# $Date$
6
7# Adjust these to suit your installation
8BASEDIR= $(HOME)/public_html/blfs-book-xsl
9DUMPDIR= $(HOME)/blfs-commands
10CHUNK_QUIET=1
11ROOT_ID=""
12PDF_OUTPUT=BLFS-BOOK.pdf
13NOCHUNKS_OUTPUT=BLFS-BOOK.html
14
15ifdef V
16 Q =
17else
18 Q = @
19endif
20
21blfs: validxml profile-html
22 @echo "Generating chunked XHTML files..."
23 $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
24 -stringparam rootid $(ROOT_ID) -stringparam base.dir $(BASEDIR)/ \
25 stylesheets/blfs-chunked.xsl /tmp/blfs-html.xml
26
27 @echo "Copying CSS code and images..."
28 $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
29 mkdir -p $(BASEDIR)/stylesheets; \
30 fi;
31 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
32 $(Q)if [ ! -e $(BASEDIR)/images ]; then \
33 mkdir -p $(BASEDIR)/images; \
34 fi;
35 $(Q)cp images/*.png $(BASEDIR)/images
36 $(Q)cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" *.html
37 $(Q)cd $(BASEDIR)/; sed -i -e "s@../images@images@g" *.html
38
39 @echo "Running Tidy and obfuscate.sh..."
40 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
41 tidy -config tidy.conf $$filename; \
42 true; \
43 sh obfuscate.sh $$filename; \
44 sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
45 done;
46
47pdf: validxml
48 @echo "Generating profiled XML for PDF..."
49 $(Q)xsltproc --nonet --stringparam profile.condition pdf \
50 --output /tmp/blfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \
51 /tmp/blfs-full.xml
52
53 @echo "Generating FO file..."
54 $(Q)xsltproc --nonet -stringparam rootid $(ROOT_ID) \
55 --output /tmp//blfs-pdf.fo stylesheets/blfs-pdf.xsl /tmp/blfs-pdf.xml
56 $(Q)sed -i -e 's/span="inherit"/span="all"/' /tmp/blfs-pdf.fo
57
58 @echo "Generating PDF file..."
59 $(Q)if [ ! -e $(BASEDIR) ]; then \
60 mkdir -p $(BASEDIR); \
61 fi;
62 $(Q)fop /tmp/blfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
63
64nochunks: validxml profile-html
65 @echo "Generating non chunked XHTML file..."
66 $(Q)xsltproc --nonet -stringparam profile.condition html \
67 -stringparam rootid $(ROOT_ID) --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
68 stylesheets/blfs-nochunks.xsl /tmp/blfs-html.xml
69
70 @echo "Running Tidy..."
71 $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
72 @echo "Running obfuscate.sh..."
73 $(Q)sh obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
74 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" \
75 $(BASEDIR)/$(NOCHUNKS_OUTPUT)
76
77validxml:
78 @echo "Validating the book..."
79 $(Q)xmllint --nonet --noent --xinclude --postvalid \
80 -o /tmp/blfs-full.xml index.xml
81
82profile-html: validxml
83 @echo "Generating profiled XML for XHTML..."
84 $(Q)xsltproc --nonet --stringparam profile.condition html \
85 --output /tmp/blfs-html.xml stylesheets/lfs-xsl/profile.xsl \
86 /tmp/blfs-full.xml
87
88blfs-patch-list: validxml
89 @echo "Generating blfs-patch-list..."
90 $(Q)xsltproc --nonet --output /tmp/blfs-patch-list \
91 stylesheets/patcheslist.xsl /tmp/blfs-full.xml
92 $(Q)sed -e "s|^.*/||" /tmp/blfs-patch-list > /tmp/blfs-patches
93 $(Q)sort /tmp/blfs-patches > blfs-patch-list
94
95wget-list: validxml
96 @echo "Generating wget list..."
97 $(Q)mkdir -p $(BASEDIR)
98 $(Q)xsltproc --nonet --output $(BASEDIR)/wget-list \
99 stylesheets/wget-list.xsl /tmp/lfs-full.xml
100
101test-links: validxml
102 @echo "Generating test-links file..."
103 $(Q)mkdir -p $(BASEDIR)
104 $(Q)xsltproc --nonet --stringparam list_mode full \
105 --output $(BASEDIR)/test-links stylesheets/wget-list.xsl \
106 /tmp/lfs-full.xml
107
108 @echo "Checking URLs, first pass..."
109 $(Q)rm -f $(BASEDIR)/{good,bad,true_bad}_urls
110 $(Q)for URL in `cat $(BASEDIR)/test-links`; do \
111 wget --spider --tries=2 --timeout=60 $$URL >>/dev/null 2>&1; \
112 if test $$? -ne 0 ; then echo $$URL >> $(BASEDIR)/bad_urls ; \
113 else echo $$URL >> $(BASEDIR)/good_urls 2>&1; \
114 fi; \
115 done
116
117 @echo "Checking URLs, second pass..."
118 $(Q)for URL2 in `cat $(BASEDIR)/bad_urls`; do \
119 wget --spider --tries=2 --timeout=60 $$URL2 >>/dev/null 2>&1; \
120 if test $$? -ne 0 ; then echo $$URL2 >> $(BASEDIR)/true_bad_urls ; \
121 else echo $$URL2 >> $(BASEDIR)/good_urls 2>&1; \
122 fi; \
123 done
124
125dump-commands: validxml
126 @echo "Dumping book commands..."
127 $(Q)xsltproc --output $(DUMPDIR)/ \
128 stylesheets/dump-commands.xsl /tmp/lfs-full.xml
129
130validate:
131 @echo "Validating the book..."
132 $(Q)xmllint --noout --nonet --xinclude --postvalid index.xml
133
134all: blfs nochunks pdf
135
136world: all blfs-patch-list dump-commands wget-list test-links
137
138.PHONY : all blfs blfs-patch-list dump-commands nochunks pdf profile-html \
139 test-links validate validxml wget-list world
Note: See TracBrowser for help on using the repository browser.