t7503: verify proper hook execution
[gitweb.git] / Makefile
index bd246f2989575a72758fd3765659f61a8aa58c8c..f9255344ae5009a192ab83a332be749632d94531 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2720,7 +2720,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.