bin-wrappers: append `.exe` to target paths if necessary
When compiling with Visual Studio, the projects' names are identical to the executables modulo the extensions. Read: there will exist both a directory called `git` as well as an executable called `git.exe` in the end. Which means that the bin-wrappers *need* to target the `.exe` files lest they try to execute directories. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 29, 2019 at 13:08 UTC
3a94cb31d52f061c315b00bfc005f1b1c42ac92d
1 file changed
+1
-1
Makefile
+1
-1
@@ -2717,7 +2717,7 @@ bin-wrappers/%: wrap-for-bin.sh
2717
@mkdir -p bin-wrappers
2718
$(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
2719
-e 's|@@BUILD_DIR@@|$(shell pwd)|' \
2720
- -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%,$(@F))|' < $< > $@ && \
2720
+ -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%$(X),$(@F))$(patsubst git%,$(X),$(filter $(@F),$(BINDIR_PROGRAMS_NEED_X)))|' < $< > $@ && \
2721
chmod +x $@
2722
2723
# GNU make supports exporting all variables by "export" without parameters.