Merge pull request #65 from scdwyer/dev

Updated dynamic google version updating to use maps.xml.example
This commit is contained in:
Felix Ruess
2011-08-02 14:29:39 -07:00
4 changed files with 10 additions and 6 deletions
+1
View File
@@ -47,6 +47,7 @@
/conf/%gconf.xml
/conf/srtm_data/*
/conf/maps_data/*
/conf/maps.xml
/conf/gps/ublox_conf
# /doc/pprz_algebra/
+5 -3
View File
@@ -74,14 +74,16 @@ all: conf commands static
static : lib center tools cockpit multimon tmtc misc logalizer lpc21iap sim_static static_h usb_lib
conf: conf/conf.xml conf/control_panel.xml conf/maps.xml
conf: conf/conf.xml conf/control_panel.xml conf/maps.xml FORCE
conf/%.xml :conf/%.xml.example
[ -L $@ ] || [ -f $@ ] || cp $< $@
conf/maps.xml:
cd data/maps; $(MAKE)
conf/maps.xml: conf/maps.xml.example FORCE
-cd data/maps; $(MAKE)
if test ! -e $@; then cp $< $@; fi
FORCE:
lib:
cd $(LIB)/ocaml; $(MAKE)
+1 -1
View File
@@ -1,3 +1,3 @@
<!DOCTYPE maps SYSTEM "maps.dtd">
<maps google_version="89"/>
<maps google_version="89"/>
+3 -2
View File
@@ -6,11 +6,12 @@ all: $(DATADIR)/maps.google.com $(PAPARAZZI_HOME)/conf/maps.xml
$(DATADIR):
mkdir $(DATADIR)
$(DATADIR)/maps.google.com: $(DATADIR)
$(DATADIR)/maps.google.com: $(DATADIR) FORCE
wget -O $(@) http://maps.google.com/
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $(@)
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">\n" > $(@)
$(Q)echo "<maps google_version=\""`grep -P "http://khm[0-9]+.google.com/kh/v=[0-9]+.x26" $(DATADIR)/maps.google.com | sed -E s#.*http://khm[0-9]+.google.com/kh/v=## | sed -E s#.x26.*##`"\"/>" >> $(@)
$(Q)echo "" >> $(@)
FORCE: