summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndreas Fried <andreas.fried@kit.edu>2020-04-29 15:21:07 +0200
committerAndreas Fried <andreas.fried@kit.edu>2020-04-29 15:21:07 +0200
commitb7f2ed734453a3185d07738016119544da27b9e8 (patch)
treeaaab6763bae97c2965535884ce822da6c7fc4a56
parente1adba794f197800de28ddc4b090a361989b961c (diff)
Make Makefile portable between make 4.2 and 4.3.
See https://lists.gnu.org/archive/html/bug-make/2020-01/msg00057.html for an explanation and the recommended workaround.
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 58501a9..26353d1 100644
--- a/Makefile
+++ b/Makefile
@@ -197,8 +197,9 @@ REVISION ?= $(shell git --git-dir $(top_srcdir)/.git describe --abbrev=40 --alwa
# Update revision.h if necessary
REVISIONH = $(gendir)/firm_revision.h
libfirm_INCLUDEDIRS += $(gendir)
+HASH := \#
UNUSED2 := $(shell \
- REV="\#define libfirm_VERSION_REVISION \"$(REVISION)\""; \
+ REV="$(HASH)define libfirm_VERSION_REVISION \"$(REVISION)\""; \
echo "$$REV" | cmp -s - "$(REVISIONH)" 2> /dev/null || echo "$$REV" > "$(REVISIONH)" \
)