aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-06 14:24:50 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-07 07:52:11 +0900
commit95bcd6f0b709ec6e761270732946651757cc11c3 (patch)
treed8ba19942d1ca07846dbfbc547583be1b2bf1369 /Makefile
parent3f145a4fe37099c55c7596e93a4cfd850662f88a (diff)
downloadgit-95bcd6f0b709ec6e761270732946651757cc11c3.tar.xz
Makefile: allow "bin-wrappers/" directory to exist
The "bin-wrappers/" directory gets created by our build system and is populated with one script for each of our binaries. There isn't anything inherently wrong with the current layout, but it is somewhat hard to adapt for out-of-tree build systems. Adapt the layout such that our "bin-wrappers/" directory always exists and contains our "wrap-for-bin.sh" script to make things a little bit easier for subsequent steps. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 009e7d8e95..6e93319bed 100644
--- a/Makefile
+++ b/Makefile
@@ -3202,8 +3202,7 @@ test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(
all:: $(TEST_PROGRAMS) $(test_bindir_programs) $(UNIT_TEST_PROGS) $(CLAR_TEST_PROG)
-bin-wrappers/%: wrap-for-bin.sh
- $(call mkdir_p_parent_template)
+$(test_bindir_programs): bin-wrappers/%: bin-wrappers/wrap-for-bin.sh
$(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-e 's|@BUILD_DIR@|$(shell pwd)|' \
-e 's|@PROG@|$(patsubst test-%,t/helper/test-%,$(@F))$(if $(filter-out $(BINDIR_PROGRAMS_NO_X),$(@F)),$(X),)|' < $< > $@ && \
@@ -3700,7 +3699,8 @@ clean: profile-clean coverage-clean cocciclean
$(RM) $(SP_OBJ)
$(RM) $(HCC)
$(RM) version-def.h
- $(RM) -r bin-wrappers $(dep_dirs) $(compdb_dir) compile_commands.json
+ $(RM) -r $(dep_dirs) $(compdb_dir) compile_commands.json
+ $(RM) $(test_bindir_programs)
$(RM) -r po/build/
$(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope*
$(RM) -r .dist-tmp-dir .doc-tmp-dir