Skip to contentSkip to conversation

Explicitly set X to avoid potential build breakage

PATCH In review Michael 2 participants 2 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore

Michael

author
#0 lore raw

PATCH v2 1/1 Explicitly set X to avoid potential build breakage

$X is appended to binary names for Windows builds (ie. git.exe). Pollution from the environment can inadvertently trigger this behaviour, resulting in 'git' turning into 'gitwhatever' without warning.

---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Makefile +3 -0
index 87fb30a..b21d40c 100644
@@ -460,6 +460,9 @@ PROGRAM_OBJS += http-backend.o
 PROGRAM_OBJS += sh-i18n--envsubst.o
 PROGRAM_OBJS += credential-store.o
 
+# Binary suffix used for Windows builds
+X =
+
 PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
 
 TEST_PROGRAMS_NEED_X += test-chmtime
Signature · 1 line
1.7.8.4