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
+13 -13
View File
@@ -70,16 +70,16 @@ endif
OCAML=$(shell which ocaml)
OCAMLRUN=$(shell which ocamlrun)
all: commands static conf
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_data/maps.conf
conf: conf/conf.xml conf/control_panel.xml conf/maps.xml
conf/%.xml :conf/%.xml.example
[ -L $@ ] || [ -f $@ ] || cp $< $@
conf/maps_data/maps.conf:
conf/maps.xml:
cd data/maps; $(MAKE)
@@ -87,10 +87,10 @@ lib:
cd $(LIB)/ocaml; $(MAKE)
center: lib
cd sw/supervision; make
cd sw/supervision; $(MAKE)
tools: lib
cd $(TOOLS); make
cd $(TOOLS); $(MAKE)
logalizer: lib
cd $(LOGALIZER); $(MAKE)
@@ -166,7 +166,7 @@ ac_h ac1 ac2 ac3 ac fbw ap: static conf
#
# call with : make bl PROC=[TINY|FBW|AP|GENERIC]
bl:
cd $(AIRBORNE)/arch/lpc21/test/bootloader; make clean; make
cd $(AIRBORNE)/arch/lpc21/test/bootloader; $(MAKE) clean; $(MAKE)
BOOTLOADER_DEV=/dev/ttyUSB0
upload_bl bl.upload: bl
@@ -181,15 +181,15 @@ upload_jtag: bl
lpc21iap:
cd sw/ground_segment/lpc21iap; make
cd sw/ground_segment/lpc21iap; $(MAKE)
upgrade_bl bl.upgrade: bl lpc21iap
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl_ram.elf
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl.elf
ms:
cd $(AIRBORNE)/arch/lpc21/lpcusb; make
cd $(AIRBORNE)/arch/lpc21/lpcusb/examples; make
cd $(AIRBORNE)/arch/lpc21/lpcusb; $(MAKE)
cd $(AIRBORNE)/arch/lpc21/lpcusb/examples; $(MAKE)
upload_ms ms.upload: ms
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/lpcusb/examples/msc.elf
@@ -205,10 +205,10 @@ run_sitl :
$(PAPARAZZI_HOME)/var/$(AIRCRAFT)/sim/simsitl
install :
make -f Makefile.install PREFIX=$(PREFIX)
$(MAKE) -f Makefile.install PREFIX=$(PREFIX)
uninstall :
make -f Makefile.install PREFIX=$(PREFIX) uninstall
$(MAKE) -f Makefile.install PREFIX=$(PREFIX) uninstall
DISTRO=lenny
deb :
@@ -218,7 +218,7 @@ deb :
dpkg-buildpackage $(DEBFLAGS) -Ivar -rfakeroot
fast_deb:
make deb OCAMLC=ocamlc.opt DEBFLAGS=-b
$(MAKE) deb OCAMLC=ocamlc.opt DEBFLAGS=-b
clean:
rm -fr dox build-stamp configure-stamp conf/%gconf.xml debian/files debian/paparazzi-arm7 debian/paparazzi-avr debian/paparazzi-base debian/paparazzi-bin debian/paparazzi-dev
@@ -237,7 +237,7 @@ cleanspaces:
distclean : dist_clean
dist_clean : clean
rm -r conf/srtm_data
rm -r conf/maps_data
rm -r conf/maps_data conf/maps.xml
ab_clean:
find sw/airborne -name '*~' -exec rm -f {} \;
-3
View File
@@ -1,3 +0,0 @@
<!DOCTYPE maps SYSTEM "maps.dtd">
<maps google_version="88"/>
+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 "" >> $(@)