Replace a $(shell ...) by folding the check for existance of bertos/verstag.c inside...
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 4 Aug 2008 11:15:05 +0000 (11:15 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 4 Aug 2008 11:15:05 +0000 (11:15 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1533 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/rules.mk

index 23d988f78585cf4ffecaec4bbde0f1315da3dab8..d3cde94b540fc3b68d69075184575c3477e071f7 100644 (file)
@@ -279,23 +279,20 @@ $(RECURSIVE_TARGETS):
 
 BUILDREV_H = buildrev.h
 
-ifeq ($(shell [ -e bertos/verstag.c ] && echo yes),yes)
 .PHONY: bumprev
 bumprev:
-       @buildnr=0; \
-       if [ -f $(BUILDREV_H) ]; then \
-               buildnr=`sed <"$(BUILDREV_H)" -n -e 's/#define VERS_BUILD \([0-9][0-9]*\)/\1/p'`; \
+       @if [ -e bertos/verstag.c ]; then \
+               buildnr=0; \
+               if [ -f $(BUILDREV_H) ]; then \
+                       buildnr=`sed <"$(BUILDREV_H)" -n -e 's/#define VERS_BUILD \([0-9][0-9]*\)/\1/p'`; \
+               fi; \
+               buildnr=`expr $$buildnr + 1`; \
+               buildhost=`hostname | sed -n -e '1h;2,$$H;$${g;s/\n//g;p;}'`; \
+               echo "#define VERS_BUILD $$buildnr" >"$(BUILDREV_H)"; \
+               echo "#define VERS_HOST  \"$$buildhost\"" >>"$(BUILDREV_H)"; \
+               echo "Building revision $$buildnr"; \
        fi; \
-       buildnr=`expr $$buildnr + 1`; \
-       buildhost=`hostname | sed -n -e '1h;2,$$H;$${g;s/\n//g;p;}'`; \
-       echo "#define VERS_BUILD $$buildnr" >"$(BUILDREV_H)"; \
-       echo "#define VERS_HOST  \"$$buildhost\"" >>"$(BUILDREV_H)"; \
-       echo "Building revision $$buildnr"
-else
-.PHONY: bumprev
-bumprev:
-
-endif
+       #
 
 # Include dependencies
 ifneq ($(strip $(OBJ)),)