aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile33
1 files changed, 30 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d293047ce..e024d1cb1 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ RENDERTMP = $(HOME)/tmp
CHUNK_QUIET = 1
ROOT_ID =
PDF_OUTPUT = LFS-BOOK.pdf
+PDF_SYSD_OUTPUT = LFS-SYSD-BOOK.pdf
NOCHUNKS_OUTPUT = LFS-BOOK.html
NOCHUNKS_SYSD_FILE = LFS-SYSD-BOOK.html
SHELL = /bin/bash
@@ -97,6 +98,32 @@ pdf: validate
@echo "Generating FO file..."
$(Q)xsltproc --nonet \
+ --stringparam rootid "$(ROOT_ID)" \
+ --output $(RENDERTMP)/lfs-pdf.fo \
+ stylesheets/lfs-pdf.xsl \
+ $(RENDERTMP)/lfs-pdf.xml
+
+ $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/lfs-pdf.fo
+ $(Q)bash pdf-fixups.sh $(RENDERTMP)/lfs-pdf.fo
+
+ @echo "Generating PDF file..."
+ $(Q)mkdir -p $(BASEDIR)
+
+ $(Q)fop -q $(RENDERTMP)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 2>fop.log
+ @echo "$(BASEDIR)/$(PDF_OUTPUT) created"
+ @echo "fop.log created"
+
+pdfd: validated
+ @echo "Generating profiled XML for PDF..."
+ $(Q)xsltproc --nonet \
+ --stringparam profile.condition pdf \
+ --stringparam profile.revision systemd \
+ --output $(RENDERTMP)/lfs-pdf.xml \
+ stylesheets/lfs-xsl/profile.xsl \
+ $(RENDERTMP)/lfs-full.xml
+
+ @echo "Generating FO file..."
+ $(Q)xsltproc --nonet \
--stringparam rootid "$(ROOT_ID)" \
--output $(RENDERTMP)/lfs-pdf.fo \
stylesheets/lfs-pdf.xsl \
@@ -106,10 +133,10 @@ pdf: validate
$(Q)bash pdf-fixups.sh $(RENDERTMP)/lfs-pdf.fo
@echo "Generating PDF file..."
- $(Q)mkdir -p $(BASEDIR)
+ $(Q)mkdir -p $(SYSDDIR)
- $(Q)fop -q $(RENDERTMP)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 2>fop.log
- @echo "$(BASEDIR)/$(PDF_OUTPUT) created"
+ $(Q)fop -q $(RENDERTMP)/lfs-pdf.fo $(SYSDDIR)/$(PDF_SYSD_OUTPUT) 2>fop.log
+ @echo "$(SYSDDIR)/$(PDF_SYSD_OUTPUT) created"
@echo "fop.log created"
nochunks: validate profile-html