Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15
STALE3714d

[PATCH] Makefile: use backticks rather than $() notation to support ancient shells

From: Brandon Casey <hidden>
Date: 2016-06-15 22:45:06
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Since make is using /bin/sh to execute shell code, avoid the newish
shell construct $() so older (ancient) shells can execute the shell
code in the Makefile.

Signed-off-by: Brandon Casey <redacted>
---


I know that $() is preferred in the main scripts, but the Makefile
is using /bin/sh to execute shell code and there are already a few
places in the Makefile using back-ticks, so it doesn't seem like
going against the flow too much.

Otherwise, should we set the SHELL variable to the configured SHELL_PATH
at some point in the Makefile?

-brandon


 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 608a185..421af24 100644
--- a/Makefile
+++ b/Makefile
@@ -1366,8 +1366,8 @@ endif
 ifneq (,$X)
 	$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';)
 endif
-	bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
-	execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
+	bindir=`cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd` && \
+	execdir=`cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd` && \
 	if test "z$$bindir" != "z$$execdir"; \
 	then \
 		ln -f "$$bindir/git$X" "$$execdir/git$X" || \
-- 
1.6.0.rc1.87.g56c9f.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help