source: subversion/applications/utils/maplint/Makefile @ 29269

Last change on this file since 29269 was 5210, checked in by jochen, 12 years ago

Fixed notice in autogenerated files

File size: 3.0 KB
Line 
1#-----------------------------------------------------------------------------
2#
3#  Maplint Makefile
4#
5#-----------------------------------------------------------------------------
6
7all: build
8
9#-----------------------------------------------------------------------------
10#
11#  Build stylesheets and html doc from source. You only need to do this
12#  if you changed any of the tests in the tests directory.
13#
14#-----------------------------------------------------------------------------
15.PHONY: build
16build: tests.xml tests.xsl html/index.html html
17
18# Join all test descriptions into one file
19# This is very ugly and un-xml-like, but it works for now
20tests.xml: tests/*/*xml
21        (echo '<?xml version="1.0" encoding="iso-8859-1" ?>'; echo '<maplint:tests xmlns:maplint="http://maplint.openstreetmap.org/xml/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">'; cat lib/autogenerated.txt tests/*/*xml | grep -v 'xml version'; echo '</maplint:tests>') | xmlstarlet sel --xml-decl --encoding UTF-8 --template --copy-of / - >$@
22
23tests.xsl: lib/gen-tests-xsl.xsl tests.xml
24        xsltproc $^ >$@
25
26html/index.html: lib/doc-index.xsl tests.xml
27        xsltproc lib/doc-index.xsl tests.xml >$@
28
29.PHONY: html
30html: tests.xml
31        for test in tests/*/*xml; do xsltproc --output html/`basename $$test .xml`.html --stringparam test `basename $$test .xml` lib/doc-test.xsl tests.xml; done
32
33
34#-----------------------------------------------------------------------------
35#
36#  Clean build stuff.
37#
38#-----------------------------------------------------------------------------
39.PHONY: clean
40clean:
41        rm -f tests.xml tests.xsl html/*.html
42
43
44#-----------------------------------------------------------------------------
45#
46#  Run tests on data. (Use bin/maplint shell script to run this.)
47#
48#-----------------------------------------------------------------------------
49data/%-maplint.osm: data/%.osm lib/run-tests.xsl
50        xsltproc lib/run-tests.xsl $< >$@
51
52data/%-maplint-with-tags.osm: data/%-maplint.osm lib/convert-to-tags.xsl
53        xsltproc lib/convert-to-tags.xsl $< >$@
54
55data/%-maplint-stat.txt: data/%-maplint.osm lib/stat.xsl
56        xsltproc lib/stat.xsl $< >$@
57
58data/%-maplint-report.txt: data/%-maplint.osm lib/report.xsl
59        xsltproc lib/report.xsl $< >$@
60
61data/%-maplint-waypoints.gpx: data/%-maplint.osm lib/convert-to-gpx.xsl
62        xsltproc lib/convert-to-gpx.xsl $< >$@
63
64
65#-----------------------------------------------------------------------------
66#
67# TODO: For installing maplint we need some more CODE
68#
69#-----------------------------------------------------------------------------
70distdir:
71        echo "Please add an installation routine here"
72        echo "For now this is handled in the upper directory"
73
74dist:
75        echo "Please add an installation routine here"
76        echo "For now this is handled in the upper directory"
77
78install:
79        echo "Please add an installation routine here"
80        echo "For now this is handled in the upper directory"
81
82distclean: clean
83        echo "Please add an installation routine here"
84        echo "For now this is handled in the upper directory"
85
86
87#-- THE END ------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.