From 8e327bfe965fd16280f4d17a764d93699fe76f52 Mon Sep 17 00:00:00 2001 From: Bernard Davison Date: Sun, 19 Jun 2011 23:38:17 +1000 Subject: [PATCH] Now creating conf/maps_data/maps.conf which could be read with something like http://docs.camlcity.org/docs/godipkg/3.11/godi-missinglib/lib/ocaml/pkg-lib/missinglib/configParser.mli --- Makefile | 4 ++-- data/maps/Makefile | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 836ed269f4..cb9eec3f45 100644 --- a/Makefile +++ b/Makefile @@ -72,12 +72,12 @@ all: commands static conf 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/version +conf: conf/conf.xml conf/control_panel.xml conf/maps_data/maps.conf conf/%.xml :conf/%.xml.example [ -L $@ ] || [ -f $@ ] || cp $< $@ -conf/maps_data/version: +conf/maps_data/maps.conf: cd data/maps; $(MAKE) diff --git a/data/maps/Makefile b/data/maps/Makefile index 01ca5b64ea..784efe1bf5 100644 --- a/data/maps/Makefile +++ b/data/maps/Makefile @@ -1,13 +1,16 @@ DATADIR = $(PAPARAZZI_HOME)/conf/maps_data Q=@ -all: $(DATADIR)/index $(DATADIR)/version +all: $(DATADIR)/maps.google.com $(DATADIR)/maps.conf $(DATADIR): mkdir $(DATADIR) -$(DATADIR)/index: $(DATADIR) - $(Q)wget -O $(@) http://maps.google.com/ +$(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.*##` >> $(@) + $(Q)echo "" >> $(@) -$(DATADIR)/version: $(DATADIR)/index - $(Q)grep -P "http://khm[0-9]+.google.com/kh/v=[0-9]+.x26" $(DATADIR)/index | sed -E s#.*http://khm[0-9]+.google.com/kh/v=## | sed -E s#.x26.*## > $(@)