[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/64: More GNU Make 3.81 compatibility
From: |
Ludovic Courtès |
Subject: |
03/64: More GNU Make 3.81 compatibility |
Date: |
Mon, 05 Jan 2015 16:38:48 +0000 |
civodul pushed a commit to branch nix
in repository guix.
commit 79f699edca26c035a8bcd68c7d5a13b4fbcbf3be
Author: Eelco Dolstra <address@hidden>
Date: Tue Feb 18 12:57:32 2014 +0100
More GNU Make 3.81 compatibility
---
functions.mk | 3 +++
install.mk | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/functions.mk b/functions.mk
index 1287e43..c92cdbc 100644
--- a/functions.mk
+++ b/functions.mk
@@ -9,3 +9,6 @@ filename-to-dep = $(dir $1).$(notdir $1).dep
# Return the full path to a program by looking it up in $PATH, or the
# empty string if not found.
find-program = $(shell for i in $$(IFS=: ; echo $$PATH); do p=$$i/$(strip $1);
if [ -e $$p ]; then echo $$p; break; fi; done)
+
+# Remove trailing slash.
+remove-trailing-slash = $(patsubst %/,%,$(1))
diff --git a/install.mk b/install.mk
index e4bc734..0fe4cf9 100644
--- a/install.mk
+++ b/install.mk
@@ -1,7 +1,7 @@
# Add a rule for creating $(1) as a directory. This template may be
# called multiple times for the same directory.
define create-dir
- _i := $(DESTDIR)$$(strip $(1))
+ _i := $$(call remove-trailing-slash, $(DESTDIR)$$(strip $(1)))
ifndef $$(_i)_SEEN
$$(_i)_SEEN = 1
$$(_i):
- branch nix updated (0a75126 -> a1dd396), Ludovic Courtès, 2015/01/05
- 01/64: Support setting CFLAGS and CXXFLAGS for libraries/programs, Ludovic Courtès, 2015/01/05
- 02/64: Add a function for looking up programs in $PATH, Ludovic Courtès, 2015/01/05
- 03/64: More GNU Make 3.81 compatibility,
Ludovic Courtès <=
- 06/64: Add a variable GLOBAL_CXXFLAGS_PCH for use by precompiled headers, Ludovic Courtès, 2015/01/05
- 05/64: Add variable GLOBAL_COMMON_DEPS, Ludovic Courtès, 2015/01/05
- 07/64: Add support for making relocatable packages using $ORIGIN, Ludovic Courtès, 2015/01/05
- 09/64: Tweak error message, Ludovic Courtès, 2015/01/05
- 04/64: Make it work on GNU Make > 3.81 again, Ludovic Courtès, 2015/01/05
- 10/64: Support Illumos, Ludovic Courtès, 2015/01/05
- 11/64: Sync with make-rules repo, Ludovic Courtès, 2015/01/05
- 12/64: Fix compile errors on Illumos, Ludovic Courtès, 2015/01/05
- 13/64: Document that we require a C++11 compiler, Ludovic Courtès, 2015/01/05
- 16/64: Remove unnecessary quotes around file names, Ludovic Courtès, 2015/01/05