git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/3] Makefile: rename $(SCRIPT_LIB) to $(SCRIPT_LIB_GEN)

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 1, 2021, 19:19 UTC
Message-ID
<patch-v2-1.3-0b23b8395ec-20211101T191231Z-avarab@gmail.com>
In-Reply-To
<cover-v2-0.3-00000000000-20211101T191231Z-avarab@gmail.com>

Make the $(SCRIPT_LIB) variable like the rest of its siblings, where we have an extension-less $(*_GEN) variable, but the main one has the full file name. This will be used in subsequent commits to emit the filenames in $(SCRIPT_LIB), $(SCRIPT_PERL) etc.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 12be39ac497..100658dfa43 100644
--- a/Makefile
+++ b/Makefile
@@ -608,9 +608,9 @@ SCRIPT_SH += git-request-pull.sh
 SCRIPT_SH += git-submodule.sh
 SCRIPT_SH += git-web--browse.sh
 
-SCRIPT_LIB += git-mergetool--lib
-SCRIPT_LIB += git-sh-i18n
-SCRIPT_LIB += git-sh-setup
+SCRIPT_LIB += git-mergetool--lib.sh
+SCRIPT_LIB += git-sh-i18n.sh
+SCRIPT_LIB += git-sh-setup.sh
 
 SCRIPT_PERL += git-add--interactive.perl
 SCRIPT_PERL += git-archimport.perl
@@ -624,6 +624,7 @@ SCRIPT_PYTHON += git-p4.py
 
 # Generated files for scripts
 SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
+SCRIPT_LIB_GEN = $(patsubst %.sh,%,$(SCRIPT_LIB))
 SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
 SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
 
@@ -2141,7 +2142,7 @@ profile-fast: profile-clean
 	$(MAKE) PROFILE=USE all
 
 
-all:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
+all:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB_GEN) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
 ifneq (,$X)
 	$(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)
 endif
@@ -2284,7 +2285,7 @@ $(SCRIPT_SH_GEN) : % : %.sh GIT-SCRIPT-DEFINES
 	chmod +x $@+ && \
 	mv $@+ $@
 
-$(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
+$(SCRIPT_LIB_GEN) : % : %.sh GIT-SCRIPT-DEFINES
 	$(QUIET_GEN)$(cmd_munge_script) && \
 	mv $@+ $@
 
@@ -3013,7 +3014,7 @@ install: all
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) $(INSTALL_STRIP) $(PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) $(SCRIPTS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
-	$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+	$(INSTALL) -m 644 $(SCRIPT_LIB_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) $(INSTALL_STRIP) $(install_bindir_xprograms) '$(DESTDIR_SQ)$(bindir_SQ)'
 	$(INSTALL) $(BINDIR_PROGRAMS_NO_X) '$(DESTDIR_SQ)$(bindir_SQ)'
 
@@ -3174,7 +3175,7 @@ ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),)
 OTHER_PROGRAMS += $(shell echo *.dll t/helper/*.dll)
 endif
 
-artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \
+artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB_GEN) $(OTHER_PROGRAMS) \
 		GIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \
 		$(MOFILES)
 	$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \
@@ -3232,7 +3233,7 @@ clean: profile-clean coverage-clean cocciclean
 	$(RM) *.res
 	$(RM) $(OBJECTS)
 	$(RM) $(LIB_FILE) $(XDIFF_LIB)
-	$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
+	$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB_GEN) $(BUILT_INS) git$X
 	$(RM) $(TEST_PROGRAMS)
 	$(RM) $(FUZZ_PROGRAMS)
 	$(RM) $(SP_OBJ)
-- 
2.33.1.1570.g069344fdd45
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 13 of 28 in “Makefile: replace most hardcoded object lists with $(wildcard)”
  1. Makefile: replace most hardcoded object lists with $(wildcard)Ævar Arnfjörð Bjarmason, Oct 30, 2021
  2. Paul SmithOct 30, 2021
  3. Ævar Arnfjörð BjarmasonNov 1, 2021
  4. Jeff KingOct 31, 2021
  5. Ævar Arnfjörð BjarmasonOct 31, 2021
  6. Jeff KingNov 3, 2021
  7. Ævar Arnfjörð BjarmasonNov 3, 2021
  8. Johannes SchindelinNov 4, 2021
  9. Ævar Arnfjörð BjarmasonNov 4, 2021
  10. Philip OakleyNov 4, 2021
  11. Junio C HamanoNov 4, 2021
  12. 0/3 Makefile: replace most hardcoded object lists with $(wildcard)Ævar Arnfjörð Bjarmason, Nov 1, 2021
  13. 1/3 Makefile: rename $(SCRIPT_LIB) to $(SCRIPT_LIB_GEN)Ævar Arnfjörð Bjarmason, Nov 1, 2021
  14. 2/3 Makefile: add a utility to dump variablesÆvar Arnfjörð Bjarmason, Nov 1, 2021
  15. 3/3 Makefile: replace most hardcoded object lists with $(wildcard)Ævar Arnfjörð Bjarmason, Nov 1, 2021
  16. Phillip WoodNov 6, 2021
  17. Ævar Arnfjörð BjarmasonNov 6, 2021
  18. Phillip WoodNov 6, 2021
  19. Ævar Arnfjörð BjarmasonNov 6, 2021
  20. Junio C HamanoNov 9, 2021
  21. Johannes SchindelinNov 10, 2021
  22. Ævar Arnfjörð BjarmasonNov 10, 2021
  23. Johannes SchindelinNov 10, 2021
  24. Ævar Arnfjörð BjarmasonNov 10, 2021
  25. Ævar Arnfjörð BjarmasonJan 21, 2022
  26. Phillip WoodJan 21, 2022
  27. Ævar Arnfjörð BjarmasonJan 21, 2022
  28. Junio C HamanoJan 22, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.