Changed the format of the maps config file

This commit is contained in:
Bernard Davison
2011-07-29 12:46:14 +10:00
committed by Stephen Dwyer
parent ab88268010
commit 159ee17e05
3 changed files with 17 additions and 20 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
Q=@
all: $(DATADIR)/maps.google.com $(DATADIR)/maps.conf
all: $(DATADIR)/maps.google.com $(PAPARAZZI_HOME)/conf/maps.xml
$(DATADIR):
mkdir $(DATADIR)
@@ -9,8 +9,8 @@ $(DATADIR):
$(DATADIR)/maps.google.com: $(DATADIR)
wget -O $(@) http://maps.google.com/
$(DATADIR)/maps.conf: $(DATADIR)/maps.google.com
$(Q)echo "[GOOGLE]" > $(@)
$(Q)echo "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.*##` >> $(@)
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $(@)
$(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 "" >> $(@)