From: Ferry Huberts Date: Mon, 23 Apr 2012 08:27:58 +0000 (+0200) Subject: PUD: when building from a snapshot, do not complain about git X-Git-Tag: OLSRD_0_6_3~127 X-Git-Url: http://olsr.org/git/?p=olsrd.git;a=commitdiff_plain;h=5b077ce4aba0502261e839331c0ee30dbf04b26d PUD: when building from a snapshot, do not complain about git Just set the version to 'Unknown'. Also, move getting the version into the 'ifdef linux' block. Signed-off-by: Ferry Huberts --- diff --git a/lib/pud/Makefile b/lib/pud/Makefile index 0decdd3f..f45a866a 100644 --- a/lib/pud/Makefile +++ b/lib/pud/Makefile @@ -20,9 +20,6 @@ LIBRARY_LIB = $(LIBRARY_PATH)/lib CFLAGS += -I $(LIBRARY_INC) LIBS += -L $(LIBRARY_LIB) -lnmea -lm -l$(LIBRARY_NAME) -GIT_SHA = $(shell git describe) -CFLAGS += -DGIT_SHA=\"$(GIT_SHA)\" -DPLUGIN_VER=\"$(PLUGIN_VER)\" - ifneq ($(OS),linux) .PHONY: all default_target install clean @@ -34,6 +31,9 @@ default_target install clean: else +GIT_SHA = $(shell git describe 2> /dev/null || echo "Unknown") +CFLAGS += -DGIT_SHA=\"$(GIT_SHA)\" -DPLUGIN_VER=\"$(PLUGIN_VER)\" + .PHONY: all default_target install uninstall clean doc doc-clean library java java-instal java-uninstall all: default_target diff --git a/lib/pud/wireformat-java/Makefile b/lib/pud/wireformat-java/Makefile index 9ec09b55..c270e0d7 100644 --- a/lib/pud/wireformat-java/Makefile +++ b/lib/pud/wireformat-java/Makefile @@ -61,8 +61,6 @@ JAVA_PKG = org.olsr.plugin.pud JAVA_PKG_DIR = $(subst .,/,$(JAVA_PKG)) JAVA_PKG_UNDER = $(subst .,_,$(JAVA_PKG)) -GIT_SHA = $(shell git describe) - ifneq ($(OS),linux) @@ -75,6 +73,8 @@ default_target install clean: else +GIT_SHA = $(shell git describe 2> /dev/null || echo "Unknown") + .PHONY: all default_target java prepare clean doc doc-clean install uninstall #