mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[build system] clean up makefiles and fix dependencies, parallel build with make -j 8 seems to work now
This commit is contained in:
+18
-7
@@ -1,23 +1,34 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
|
||||
Q=@
|
||||
|
||||
all: $(DATADIR)/maps.google.com $(PAPARAZZI_HOME)/conf/maps.xml
|
||||
all: $(PAPARAZZI_HOME)/conf/maps.xml
|
||||
|
||||
clean:
|
||||
|
||||
rm -f $(DATADIR)/maps.google.com
|
||||
|
||||
$(DATADIR):
|
||||
mkdir $(DATADIR)
|
||||
|
||||
$(DATADIR)/maps.google.com: $(DATADIR) FORCE
|
||||
@echo "-----------------------------------------------"
|
||||
@echo "DOWNLOAD: google maps version code";
|
||||
$(Q)wget -q -O $(@) http://maps.google.com/ || \
|
||||
(rm -f $(@) && echo "Could not download google maps version code" && exit 1)
|
||||
(rm -f $(@) && \
|
||||
echo "Could not download google maps version code" && \
|
||||
echo "-----------------------------------------------" && \
|
||||
exit 1)
|
||||
|
||||
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
|
||||
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $(@)
|
||||
$(Q)echo "" >> $(@)
|
||||
$(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=##;s#.x26.*##'`"\"/>" >> $(@)
|
||||
$(Q)echo "" >> $(@)
|
||||
$(eval GOOGLE_VERSION := $(shell 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=##;s#.x26.*##'))
|
||||
@echo "Updated google maps version to $(GOOGLE_VERSION)"
|
||||
@echo "-----------------------------------------------"
|
||||
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > /tmp/maps.xml
|
||||
$(Q)echo "" >> /tmp/maps.xml
|
||||
$(Q)echo "<maps google_version=\"$(GOOGLE_VERSION)\"/>" >> /tmp/maps.xml
|
||||
$(Q)echo "" >> /tmp/maps.xml
|
||||
$(Q)mv /tmp/maps.xml $@
|
||||
|
||||
FORCE:
|
||||
.PHONY: all clean
|
||||
|
||||
Reference in New Issue
Block a user