[makefile] on os x the default mktemp doesn't behave the same (older version), need to use gmktemp from the coreutils macport

This commit is contained in:
Stephen Dwyer
2013-03-26 14:10:16 -06:00
parent cf14957de8
commit e06a57717a
7 changed files with 74 additions and 25 deletions
+8 -1
View File
@@ -3,6 +3,13 @@
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
Q=@
UNAME = $(shell uname -s)
ifeq ("$(UNAME)","Darwin")
MKTEMP = gmktemp
else
MKTEMP = mktemp
endif
all: $(PAPARAZZI_HOME)/conf/maps.xml
clean:
@@ -22,7 +29,7 @@ $(DATADIR)/maps.google.com: $(DATADIR) FORCE
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
$(eval GOOGLE_VERSION := $(shell grep -E "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.*##'))
$(eval $@_TMP := $(shell mktemp))
$(eval $@_TMP := $(shell $(MKTEMP)))
@echo "Updated google maps version to $(GOOGLE_VERSION)"
@echo "-----------------------------------------------"
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $($@_TMP)