-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (39 loc) · 1.3 KB
/
Makefile
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
XSLTPROC = /usr/bin/xsltproc
WEBSITE=/usr/share/xml/docbook/stylesheet/nwalsh/website
XML_CATALOG_FILES=/usr/share/xml/docbook/stylesheet/nwalsh/catalog.xml \
WORKSPACE=~/workspace
PUBLIC_HTML=~/public_html
PROC = XML_CATALOG_FILES=../catalog.xml xsltproc
all: git website
git:
@git pull
@git submodule init
@git submodule update
#include depends.tabular
autolayout.xml: layout.xml
$(PROC) \
--output $@ \
autolayout.xsl $<
make depends
depends: autolayout.xml
$(PROC) \
--output depends.tabular \
--stringparam output-root htdocs \
makefile-dep.xsl $<
%.html: autolayout.xml
$(PROC) \
--output $@ \
--stringparam website.database.document website.database.xml \
--stringparam output-root htdocs \
tabular.xsl \
$(filter-out autolayout.xml website.database.xml %xsl,$^)
website: git
@xsltproc --output autolayout.xml ${WEBSITE}/autolayout.xsl layout.xml
@xsltproc --stringparam output-root $(PUBLIC_HTML) \
--stringparam chunker.output.encoding utf-8 \
template.xsl autolayout.xml
@mkdir -p ${PUBLIC_HTML}/images
@cp stylesheet.css $(PUBLIC_HTML)
@rsync -au --delete --exclude=.svn graphics ${PUBLIC_HTML}/
@rsync -au --delete --exclude=.svn images ${PUBLIC_HTML}/
@rsync -au --delete --exclude=.svn html/* ${PUBLIC_HTML}/