bin-wrappers: append `.exe` to target paths if necessary
[gitweb.git] / Makefile
index 98a0588416c4f3f7a5b48ad72a6c2fd54ff94120..3716dadc08c5cc72a904e547a88320053762fba5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2717,7 +2717,7 @@ bin-wrappers/%: wrap-for-bin.sh
        @mkdir -p bin-wrappers
        $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
             -e 's|@@BUILD_DIR@@|$(shell pwd)|' \
-            -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%,$(@F))|' < $< > $@ && \
+            -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%$(X),$(@F))$(patsubst git%,$(X),$(filter $(@F),$(BINDIR_PROGRAMS_NEED_X)))|' < $< > $@ && \
        chmod +x $@
 
 # GNU make supports exporting all variables by "export" without parameters.