/[volute]/trunk/projects/ivoapub/Makefile
ViewVC logotype

Contents of /trunk/projects/ivoapub/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1681 - (show annotations)
Tue Apr 10 21:32:45 2012 UTC (8 years, 7 months ago) by harripa
File size: 3426 byte(s)
improved the PDF formatting
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=TAPRegExt
33 # The current version
34 DOCVERSION=1.0
35 # YYYYMMDD of the current release
36 DOCDATE=20111027
37 # One of NOTE, WD, PR, REC
38 PUBSTATUS=WD
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
43
44 # You probably want to configure your system so the following works
45 SAXON=saxonb-xslt
46 FOP=FOP_HYPHENATION_PATH=./fop-hyph.jar fop
47 HTMLSTYLE=ivoadoc/ivoarestructure.xslt
48 FOSTYLE=ivoadoc/ivoa-fo.xsl
49
50 # You should not need to edit anything below this line
51
52 versionedName:=$(PUBSTATUS)-$(STDNAME)-$(DOCVERSION)-$(DOCDATE)
53
54 .PHONY: package
55
56 %-fmt.html: %.html $(HTMLSTYLE)
57 $(SAXON) -o $@ $< $(HTMLSTYLE) docdate=$(DOCDATE)\
58 docversion=$(DOCVERSION) pubstatus=$(PUBSTATUS) ivoname=$(STDNAME)
59
60 %.fo: %-fmt.html
61 $(SAXON) -o $@ $< $(FOSTYLE) docdate=$(DOCDATE)\
62 docversion=$(DOCVERSION) pubstatus=$(PUBSTATUS) ivoname=$(STDNAME)
63
64 %.pdf: %.fo
65 $(FOP) -pdf $@ -fo $<
66
67
68 default: $(STDNAME)-fmt.html
69
70 package: $(STDNAME)-fmt.html $(STDNAME).pdf
71 rm -rf -- $(versionedName)
72 mkdir $(versionedName)
73 cp $(STDNAME)-fmt.html $(versionedName)/$(versionedName).html
74 cp $(STDNAME).pdf $(versionedName)/$(versionedName).pdf
75 cp ivoadoc/*.css *.png $(SCHEMA_FILE) $(PACKAGE_EXTRAS) $(versionedName)
76 zip -r $(versionedName).zip $(versionedName)
77 rm -rf -- $(versionedName)
78
79 clean:
80 rm -f $(PUBSTATUS)-$(STDNAME)-*.html
81 rm -f $(PUBSTATUS)-$(STDNAME)-*.pdf
82 rm -f $(STDNAME).pdf
83 rm -r $(PUBSTATUS)-$(STDNAME)*.zip
84
85 # Local stuff
86 SCHEMA_FILE=TAPRegExt-v1.0.xsd
87
88 tapregext-fmt.html: sample.xml $(SCHEMA_FILE)
89
90 sample.xml: dumprecord.py
91 # this rule probably only works of you have GAVO DaCHS installed,
92 # built the validator in (source_dir)schemata, and adjusted xsdclasspath
93 # in DaCHS' config.
94 python $< > $@.tmp
95 java -cp `gavo config xsdclasspath` xsdval -n -v -s -f $@.tmp
96 # some cosmetics on the namespace and schema location
97 sed -e 's/xmlns\|standardID\|xsi:type/~ &/g;s/xsi:schemaLocation="[^"]*"//' $@.tmp \
98 | tr '~' '\n ' > $@
99 # rm $@.tmp
100
101 install:
102 # local to Markus' setup
103 fixschema $(SCHEMA_FILE) > ~/gavo/trunk/schemata/$(SCHEMA_FILE)
104
105 install-doc: spec.html
106 scp spec.html TAPRegExt-arch.png alnilam:/var/www/docs/tre/

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