Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Contents of /trunk/xml/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1343 - (show annotations) (download)
Sun May 26 12:35:21 2013 UTC (11 years, 9 months ago) by amb
File size: 3038 byte(s)
Re-organise the Makefiles so that all configuration information is one of them
(Makefile.conf at the top level) rather than being spread between them.

1 # XML directory Makefile
2 #
3 # Part of the Routino routing software.
4 #
5 # This file Copyright 2010-2013 Andrew M. Bishop
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Affero General Public License for more details.
16 #
17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #
20
21 # All configuration is in the top-level Makefile.conf
22
23 include ../Makefile.conf
24
25 # Web file paths
26
27 WEBDATADIR=../$(webdatadir)
28 WEBWWWDIR=../$(webwwwdir)
29
30 # Files to install
31
32 STANDARD_FILES=profiles.xml \
33 translations.xml \
34 tagging.xml
35
36 SPECIAL_FILES=tagging-drive.xml \
37 tagging-ride.xml \
38 tagging-walk.xml
39
40 PROFILE_FILES=$(WEBWWWDIR)/profiles.pl \
41 $(WEBWWWDIR)/profiles.js
42
43 ########
44
45 all: $(SPECIAL_FILES)
46 -@for file in $(STANDARD_FILES); do \
47 if [ ! -f $(WEBDATADIR)/$$file ] || [ routino-$$file -nt $(WEBDATADIR)/$$file ]; then \
48 echo cp routino-$$file $(WEBDATADIR)/$$file ;\
49 cp -f routino-$$file $(WEBDATADIR)/$$file ;\
50 fi ;\
51 done
52 -@for file in $(SPECIAL_FILES); do \
53 if [ ! -f $(WEBDATADIR)/$$file ] || [ $$file -nt $(WEBDATADIR)/$$file ]; then \
54 echo cp $$file $(WEBDATADIR)/$$file ;\
55 cp -f $$file $(WEBDATADIR)/$$file ;\
56 fi ;\
57 done
58 -@if [ ! -f $(WEBWWWDIR)/profiles.js ] || [ ! -f $(WEBWWWDIR)/profiles.pl ] || \
59 [ $(WEBDATADIR)/profiles.xml -nt $(WEBWWWDIR)/profiles.pl ] || \
60 [ $(WEBDATADIR)/profiles.xml -nt $(WEBWWWDIR)/profiles.js ]; then \
61 echo perl update-profiles.pl ;\
62 ( cd $(WEBWWWDIR) ; perl update-profiles.pl ) ;\
63 fi
64
65 ####
66
67 tagging-drive.xml : routino-tagging.xml scripts/drive.pl
68 perl scripts/drive.pl < routino-tagging.xml > tagging-drive.xml
69
70 tagging-ride.xml : routino-tagging.xml scripts/ride.pl
71 perl scripts/ride.pl < routino-tagging.xml > tagging-ride.xml
72
73 tagging-walk.xml : routino-tagging.xml scripts/walk.pl
74 perl scripts/walk.pl < routino-tagging.xml > tagging-walk.xml
75
76 ########
77
78 test:
79
80 ########
81
82 install: all
83 -[ -d $(DESTDIR)$(datadir) ] || mkdir -p $(DESTDIR)$(datadir)
84 -@for file in $(STANDARD_FILES) ; do \
85 echo cp routino-$$file $(DESTDIR)$(datadir)/$$file ;\
86 cp -f routino-$$file $(DESTDIR)$(datadir)/$$file ;\
87 done
88 -@for file in $(SPECIAL_FILES); do \
89 echo cp $$file $(DESTDIR)$(datadir)/$$file ;\
90 cp -f $$file $(DESTDIR)$(datadir)/$$file ;\
91 done
92
93 ########
94
95 clean:
96 rm -f *~
97
98 ########
99
100 distclean: clean
101 rm -f $(WEBDATADIR)/*.xml
102 rm -f $(SPECIAL_FILES)
103 rm -f $(PROFILE_FILES)
104
105 ########
106
107 .PHONY:: all test install clean distclean

Properties

Name Value
cvs:description A Makefile for the xml directory.