/[volute]/trunk/projects/note-urifragments/Makefile
ViewVC logotype

Contents of /trunk/projects/note-urifragments/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1775 - (show annotations)
Fri May 25 17:32:48 2012 UTC (8 years, 6 months ago) by norman.x.gray@gmail.com
File size: 4086 byte(s)
Tidyups for v1.0, to be posted on ivoa.net
1 # Makefile to drive ivoadoc.
2 #
3 # To use this, you must have checked out ivoadoc as svn:externals into
4 # your document directory. Copy this Makefile into that directory and
5 # edit it as necessary.
6 #
7 # The Makefile assumes you have xalanb-xslt and fop in your path. On
8 # Debian-derived systems, you could say
9 #
10 # sudo aptitude install xalan fop w3c-dtd-xhtml
11 #
12 # You most likely want the hyphenation patterns for fop (the PDF
13 # formatter), too. Presumably for licensing reasons, you have to
14 # get them manually from http://offo.sourceforge.net. Drop them
15 # into your working directory as fop-hyph.jar.
16 #
17 # Edit your source as $(STDNAME).html; available targets then are:
18 #
19 # * default: format the html, expanding the magic things explained in
20 # README
21 # * $(STDNAME).pdf: same, but make a pdf
22 # * package: package the docs, css, all pngs and whatever is in
23 # PACKAGE_EXTRAS into an aptly-named zip that expands into a
24 # nicely-named subdirectory.
25 #
26 # Contact for this Makefile: Markus Demleitner (gavo@ari.uni-heidelberg.de)
27 #
28 # Fix (and maintain, as you go on) the following set of variables:
29 #
30 # The base name of the files (a sensible abbreviation of your standard's
31 # title; this is case sensitive)
32 STDNAME=uri-fragments
33 # The current version
34 DOCVERSION=1.0
35 # YYYY-MM-DD of the current release
36 DOCDATE=20120525
37 # One of NOTE, WD, PR, REC
38 PUBSTATUS=NOTE
39 # Extra files that need to end up in the final package
40 # (pngs are included automatically)
41 #PACKAGE_EXTRAS=TAPRegExt-v1.0.xsd tre-vor.xml
42 PACKAGE_EXTRAS=
43
44 DOCBASE=http://www.ivoa.net/Documents/
45 #DOCBASE=http://www.astro.gla.ac.uk/users/norman/temp/
46
47
48 # You probably want to configure your system so the following works
49 SAXON=saxonb-xslt
50 FOP=FOP_HYPHENATION_PATH=./fop-hyph.jar fop
51 HTMLSTYLE=ivoadoc/ivoarestructure.xslt
52 FOSTYLE=ivoadoc/ivoa-fo.xsl
53 TAR=tar
54
55 # You should not need to edit anything below this line
56
57 versionedName:=$(PUBSTATUS)-$(STDNAME)-$(DOCVERSION)
58 ifneq "$(PUBSTATUS)" "REC"
59 versionedName:=$(versionedName)-$(subst -,,$(DOCDATE))
60 endif
61
62 .PHONY: package
63
64 %-fmt.html: %.html $(HTMLSTYLE)
65 rm -f $@
66 $(SAXON) -o $@.tmp -s $< $(HTMLSTYLE) docdate=$(DOCDATE) document-id=$< \
67 docversion=$(DOCVERSION) pubstatus=$(PUBSTATUS) ivoname=$(STDNAME) \
68 docbase=$(DOCBASE) && mv $@.tmp $@
69 # $(SAXON) -o:$@.tmp -s:$< -xsl:$(HTMLSTYLE) docdate=$(DOCDATE) document-id=$< \
70 # docversion=$(DOCVERSION) pubstatus=$(PUBSTATUS) ivoname=$(STDNAME) \
71 # docbase=$(DOCBASE) && mv $@.tmp $@
72
73 %.fo: %-fmt.html
74 $(SAXON) -o $@ $< $(FOSTYLE) docdate=$(DOCDATE)\
75 docversion=$(DOCVERSION) pubstatus=$(PUBSTATUS) ivoname=$(STDNAME)
76
77 %.pdf: %.fo
78 $(FOP) -pdf $@ -fo $<
79
80 %.bbl: %.html
81 rm -f $@
82 $(SAXON) -o ${@:.bbl=.aux} -s $< ivoadoc/extractcite.xslt document-id=$<
83 # $(SAXON) -o:${@:.bbl=.aux} -s:$< -xsl:ivoadoc/extractcite.xslt document-id=$<
84 bibtex ${<:.html=}
85 rm -f ${<:.html=.aux}
86 sed -f ivoadoc/detex.sed $@ >$@.tmp && mv $@.tmp $@
87
88 %.gz: %
89 rm -f $@
90 gzip --best $<
91 %.tar: %
92 rm -f $@
93 $(TAR) cf $@ $<
94
95
96 all: $(STDNAME)-fmt.html
97
98 dist: $(versionedName).tar.gz
99
100 uri-fragments.bbl: note.bib
101
102 # This must create a directory, the layout of which matches the
103 # 'current version' link generated by the stylesheet:
104 # http://www.ivoa.net/Documents/$(STDNAME)/$(DOCDATE)
105 $(versionedName): $(STDNAME)-fmt.html
106 rm -Rf -- $(versionedName)
107 D=$(versionedName)/$(STDNAME)/`echo $(DOCDATE) | sed 's/-//g'`; \
108 mkdir -p $$D; \
109 cp $(STDNAME)-fmt.html $$D/index.html; \
110 cp ivoadoc/*.css $(SCHEMA_FILE) $(PACKAGE_EXTRAS) $$D
111 # cp $(STDNAME).pdf $(versionedName)/$(versionedName).pdf
112
113 # package: $(STDNAME)-fmt.html $(STDNAME).pdf
114 # rm -rf -- $(versionedName)
115 # mkdir $(versionedName)
116 # cp $(STDNAME)-fmt.html $(versionedName)/$(versionedName).html
117 # cp $(STDNAME).pdf $(versionedName)/$(versionedName).pdf
118 # cp ivoadoc/*.css *.png $(SCHEMA_FILE) $(PACKAGE_EXTRAS) $(versionedName)
119 # zip -r $(versionedName).zip $(versionedName)
120 # rm -rf -- $(versionedName)
121
122 clean:
123 rm -f $(PUBSTATUS)-$(STDNAME)-*.html $(PUBSTATUS)-$(STDNAME)-*.pdf $(STDNAME).pdf
124 rm -f $(STDNAME)-fmt.html $(STDNAME).bbl
125 rm -Rf $(versionedName)*

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26