-
Notifications
You must be signed in to change notification settings - Fork 5
/
buildrules.make
53 lines (38 loc) · 1.44 KB
/
buildrules.make
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
## Author: Mo McRoberts <[email protected]>
##
## Copyright (c) 2014 BBC
##
## Licensed under the terms of the Open Government Licence, version 2.0.
## You may obtain a copy of the license at:
##
## https://www.nationalarchives.gov.uk/doc/open-government-licence/version/2/
XSLTPROC ?= xsltproc
WKPDF ?= wkpdf
## Book elements
XML = book.xml \
legal.xml preface.xml intro.xml lod.xml architecture.xml publishers.xml \
consumers.xml media.xml structure.xml common.xml assets.xml things.xml \
people.xml places.xml events.xml concepts.xml creative.xml tools.xml \
containers-codecs.xml vocab-index.xml class-index.xml predicate-index.xml
## Output files
HTML = index.html
PDF = inside-acropolis.pdf
## XSL transform
DBXSLT = docbook-html5/docbook-html5.xsl
NAV = docbook-html5/res-nav.xml
LINKS = docbook-html5/res-links.xml
XML2HTML = $(XSLTPROC) --nonet --xinclude --param "html.linksfile" "'file://`pwd`/$(LINKS)'" --param "html.navfile" "'file://`pwd`/$(NAV)'" --param "html.ie78css" "'//bbcarchdev.github.io/painting-by-numbers/ie78.css'" --output $@ $(DBXSLT)
## Phony targets
all: $(HTML)
pdf:
rm -f $(PDF)
$(MAKE) -f buildrules.make $(PDF)
clean:
rm -f $(HTML)
pdfclean: clean
rm -f $(PDF)
## Real targets
$(HTML): $(XML) $(XSLT) $(LINKS) $(NAV)
$(XML2HTML) $<
$(PDF):
$(WKPDF) --print-background --stylesheet-media print --paper a4 --orientation portrait --ignore-http-errors --output $@ -s http://bbcarchdev.github.io/inside-acropolis