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

[PATCH 8/3] Move build helpers to scripts/ subdirectory

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Feb 18, 2011, 04:55 UTC
Message-ID
<20110218045526.GI15643@elie>
In-Reply-To
<20110218045139.GG15643@elie>

So the toplevel directory can be less cluttered and new build system hackers can know where to look to get acquainted with it.

While we're renaming things, make the names of these scripts follow a more consistent scheme (using dashes rather than underscores to separate words and including a .sh suffix).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
I think I'd prefer to omit the .sh suffix for helpers like
generate-cmdlist but this way follows the prevailing style.
 Makefile                                           |   22 ++++++++++----------
 GIT-VERSION-GEN => scripts/GIT-VERSION-GEN         |    0
 check_bindir => scripts/check-bindir.sh            |    0
 check-builtins.sh => scripts/check-builtins.sh     |    0
 fixup-builtins => scripts/fixup-builtins.sh        |    0
 generate-cmdlist.sh => scripts/generate-cmdlist.sh |    0
 unimplemented.sh => scripts/unimplemented.sh       |    0
 wrap-for-bin.sh => scripts/wrap-for-bin.sh         |    0
 8 files changed, 11 insertions(+), 11 deletions(-)
 rename GIT-VERSION-GEN => scripts/GIT-VERSION-GEN (100%)
 rename check_bindir => scripts/check-bindir.sh (100%)
 rename check-builtins.sh => scripts/check-builtins.sh (100%)
 rename fixup-builtins => scripts/fixup-builtins.sh (100%)
 rename generate-cmdlist.sh => scripts/generate-cmdlist.sh (100%)
 rename unimplemented.sh => scripts/unimplemented.sh (100%)
 rename wrap-for-bin.sh => scripts/wrap-for-bin.sh (100%)
diff --git a/Makefile b/Makefile
index 61981e5..1c10e29 100644
--- a/Makefile
+++ b/Makefile
@@ -244,7 +244,7 @@ all::
 # Define NATIVE_CRLF if your platform uses CRLF for line endings.
 
 GIT-VERSION-FILE: FORCE
-	@$(SHELL_PATH) ./GIT-VERSION-GEN
+	@$(SHELL_PATH) scripts/GIT-VERSION-GEN
 -include GIT-VERSION-FILE
 
 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
@@ -1697,10 +1697,10 @@ $(BUILT_INS): git$X
 	ln -s git$X $@ 2>/dev/null || \
 	cp git$X $@
 
-common-cmds.h: ./generate-cmdlist.sh command-list.txt
+common-cmds.h: scripts/generate-cmdlist.sh command-list.txt
 
 common-cmds.h: $(wildcard Documentation/git-*.txt)
-	$(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
+	$(QUIET_GEN)scripts/generate-cmdlist.sh > $@+ && mv $@+ $@
 
 define cmd_munge_script
 $(RM) $@ $@+ && \
@@ -1785,11 +1785,11 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/
 	chmod +x $@+ && \
 	mv $@+ $@
 else # NO_PERL
-$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
+$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : scripts/unimplemented.sh
 	$(QUIET_GEN)$(RM) $@ $@+ && \
 	sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
 	    -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
-	    unimplemented.sh >$@+ && \
+	    $< >$@+ && \
 	chmod +x $@+ && \
 	mv $@+ $@
 endif # NO_PERL
@@ -1808,11 +1808,11 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py
 	chmod +x $@+ && \
 	mv $@+ $@
 else # NO_PYTHON
-$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh
+$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : scripts/unimplemented.sh
 	$(QUIET_GEN)$(RM) $@ $@+ && \
 	sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
 	    -e 's|@@REASON@@|NO_PYTHON=$(NO_PYTHON)|g' \
-	    unimplemented.sh >$@+ && \
+	    $< >$@+ && \
 	chmod +x $@+ && \
 	mv $@+ $@
 endif # NO_PYTHON
@@ -2111,7 +2111,7 @@ test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(
 
 all:: $(TEST_PROGRAMS) $(test_bindir_programs)
 
-bin-wrappers/%: wrap-for-bin.sh
+bin-wrappers/%: scripts/wrap-for-bin.sh
 	@mkdir -p bin-wrappers
 	$(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
 	     -e 's|@@BUILD_DIR@@|$(shell pwd)|' \
@@ -2164,7 +2164,7 @@ check: common-cmds.h
 	fi
 
 remove-dashes:
-	./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS)
+	scripts/fixup-builtins.sh $(BUILT_INS) $(PROGRAMS) $(SCRIPTS)
 
 ### Installation rules
 
@@ -2236,7 +2236,7 @@ endif
 		ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
 		cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \
 	done && \
-	./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
+	scripts/check-bindir.sh "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
 
 install-gitweb:
 	$(MAKE) -C gitweb install
@@ -2415,7 +2415,7 @@ check-docs::
 ### Make sure built-ins do not have dups and listed in git.c
 #
 check-builtins::
-	./check-builtins.sh
+	scripts/check-builtins.sh
 
 ### Test suite coverage testing
 #
diff --git a/GIT-VERSION-GEN b/scripts/GIT-VERSION-GEN
similarity index 100%
rename from GIT-VERSION-GEN
rename to scripts/GIT-VERSION-GEN
diff --git a/check_bindir b/scripts/check-bindir.sh
similarity index 100%
rename from check_bindir
rename to scripts/check-bindir.sh
diff --git a/check-builtins.sh b/scripts/check-builtins.sh
similarity index 100%
rename from check-builtins.sh
rename to scripts/check-builtins.sh
diff --git a/fixup-builtins b/scripts/fixup-builtins.sh
similarity index 100%
rename from fixup-builtins
rename to scripts/fixup-builtins.sh
diff --git a/generate-cmdlist.sh b/scripts/generate-cmdlist.sh
similarity index 100%
rename from generate-cmdlist.sh
rename to scripts/generate-cmdlist.sh
diff --git a/unimplemented.sh b/scripts/unimplemented.sh
similarity index 100%
rename from unimplemented.sh
rename to scripts/unimplemented.sh
diff --git a/wrap-for-bin.sh b/scripts/wrap-for-bin.sh
similarity index 100%
rename from wrap-for-bin.sh
rename to scripts/wrap-for-bin.sh
-- 
1.7.4.1
Previous: Jonathan NiederNext: Jonathan Nieder
Message 22 of 54 in “Move test-*.c to test/ subdirectory”
  1. Move test-*.c to test/ subdirectoryNguyễn Thái Ngọc Duy, Feb 9, 2011
  2. Nguyen Thai Ngoc DuyFeb 9, 2011
  3. Junio C HamanoFeb 9, 2011
  4. Move test-* to t/helper/ subdirectoryNguyễn Thái Ngọc Duy, Feb 10, 2011
  5. 0/3 Thinning the git toplevel directoryJonathan Nieder, Feb 18, 2011
  6. 1/3 Move libgit.a sources into a libgit/ subdirectoryJonathan Nieder, Feb 18, 2011
  7. Nguyen Thai Ngoc DuyFeb 18, 2011
  8. Jonathan NiederFeb 18, 2011
  9. Jeff KingFeb 18, 2011
  10. Jonathan NiederFeb 18, 2011
  11. Nguyen Thai Ngoc DuyFeb 18, 2011
  12. 2/3 Move test-* into a test-programs/ subdirectoryJonathan Nieder, Feb 18, 2011
  13. 3/3 Move header files into a include/ subdirectoryJonathan Nieder, Feb 18, 2011
  14. Nguyen Thai Ngoc DuyFeb 18, 2011
  15. 6/3 Move remaining header files into a include/ subdirectoryJonathan Nieder, Feb 18, 2011
  16. 4/3 compat: do not use relative paths to refer to git-compat-util.h et alJonathan Nieder, Feb 18, 2011
  17. 5/3 block-sha1: do not use relative path for git-compat-util.hJonathan Nieder, Feb 18, 2011
  18. 6/3 Move git-compat-util.h, strbuf.h, and cache.h to include/Jonathan Nieder, Feb 18, 2011
  19. Nguyen Thai Ngoc DuyFeb 18, 2011
  20. 9/3 Thinning the git toplevel directoryJonathan Nieder, Feb 18, 2011
  21. 7/3 Move test-sha1.sh to test-programs/Jonathan Nieder, Feb 18, 2011
  22. 8/3 Move build helpers to scripts/ subdirectoryJonathan Nieder, Feb 18, 2011
  23. 9/3 Move non-builtin git commands and script libraries to a subdirectoryJonathan Nieder, Feb 18, 2011
  24. Jonathan NiederFeb 18, 2011
  25. Jeff KingFeb 18, 2011
  26. Jonathan NiederFeb 18, 2011
  27. Nguyen Thai Ngoc DuyFeb 18, 2011
  28. Junio C HamanoFeb 18, 2011
  29. Jonathan NiederFeb 19, 2011
  30. Sverre RabbelierFeb 19, 2011
  31. The git_remote_helpers package (Re: [RFC/PATCH 0/3] Thinning the git toplevel directory)Jonathan Nieder, Feb 19, 2011
  32. Jeff KingFeb 22, 2011
  33. Junio C HamanoFeb 22, 2011
  34. Sverre RabbelierFeb 22, 2011
  35. Jeff KingFeb 23, 2011
  36. Jonathan NiederFeb 23, 2011
  37. Jeff KingFeb 23, 2011
  38. Recursive make and variations on the themeJonathan Nieder, Feb 23, 2011
  39. Junio C HamanoFeb 23, 2011
  40. Nicolas PitreFeb 23, 2011
  41. Drew NorthupFeb 23, 2011
  42. Nicolas PitreFeb 24, 2011
  43. Drew NorthupFeb 24, 2011
  44. Nicolas PitreFeb 24, 2011
  45. Jeff KingFeb 24, 2011
  46. Drew NorthupFeb 24, 2011
  47. Piotr KrukowieckiFeb 19, 2011
  48. Junio C HamanoFeb 19, 2011
  49. Jonathan NiederFeb 19, 2011
  50. Piotr KrukowieckiFeb 19, 2011
  51. Piotr KrukowieckiFeb 19, 2011
  52. Advertising the prebuilt htmldocs and manpagesJonathan Nieder, Feb 19, 2011
  53. Junio C HamanoFeb 20, 2011
  54. Jonathan NiederFeb 20, 2011

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.