git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Nicolas Pitre <nico@fluxnic.net>
Subject: [PATCH 8/3] Move build helpers to scripts/ subdirectory
Date: Thu, 17 Feb 2011 22:55:26 -0600	[thread overview]
Message-ID: <20110218045526.GI15643@elie> (raw)
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

  parent reply	other threads:[~2011-02-18  4:55 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09 15:14 [PATCH/RFC] Move test-*.c to test/ subdirectory Nguyễn Thái Ngọc Duy
2011-02-09 15:23 ` Nguyen Thai Ngoc Duy
2011-02-09 22:15 ` Junio C Hamano
2011-02-10  2:14   ` [PATCH] Move test-* to t/helper/ subdirectory Nguyễn Thái Ngọc Duy
2011-02-18  2:27     ` [RFC/PATCH 0/3] Thinning the git toplevel directory Jonathan Nieder
2011-02-18  2:31       ` [PATCH 1/3] Move libgit.a sources into a libgit/ subdirectory Jonathan Nieder
2011-02-18  3:47         ` Nguyen Thai Ngoc Duy
2011-02-18  4:14           ` Jonathan Nieder
2011-02-18  4:18             ` Jeff King
2011-02-18  5:58               ` Jonathan Nieder
2011-02-18  4:31         ` Nguyen Thai Ngoc Duy
2011-02-18  2:33       ` [PATCH 2/3] Move test-* into a test-programs/ subdirectory Jonathan Nieder
2011-02-18  2:37       ` [PATCH 3/3] Move header files into a include/ subdirectory Jonathan Nieder
2011-02-18  3:52         ` Nguyen Thai Ngoc Duy
2011-02-18  4:29           ` [RFC/PATCH 4 to 6/3] Move remaining " Jonathan Nieder
2011-02-18  4:32             ` [PATCH 4/3] compat: do not use relative paths to refer to git-compat-util.h et al Jonathan Nieder
2011-02-18  4:34             ` [PATCH 5/3] block-sha1: do not use relative path for git-compat-util.h Jonathan Nieder
2011-02-18  4:35             ` [PATCH 6/3] Move git-compat-util.h, strbuf.h, and cache.h to include/ Jonathan Nieder
2011-02-18  3:56       ` [RFC/PATCH 0/3] Thinning the git toplevel directory Nguyen Thai Ngoc Duy
2011-02-18  4:51         ` [RFC/PATCH 7 - 9/3] " Jonathan Nieder
2011-02-18  4:52           ` [PATCH 7/3] Move test-sha1.sh to test-programs/ Jonathan Nieder
2011-02-18  4:55           ` Jonathan Nieder [this message]
2011-02-18  5:04           ` [PATCH 9/3] Move non-builtin git commands and script libraries to a subdirectory Jonathan Nieder
2011-02-18  9:25         ` [RFC/PATCH 0/3] Thinning the git toplevel directory Jonathan Nieder
2011-02-18 11:08           ` Jeff King
2011-02-18 12:33             ` Jonathan Nieder
2011-02-18 12:33           ` Nguyen Thai Ngoc Duy
2011-02-18 18:55           ` Junio C Hamano
2011-02-19 11:11             ` Jonathan Nieder
2011-02-19 23:05               ` Sverre Rabbelier
2011-02-19 23:15                 ` The git_remote_helpers package (Re: [RFC/PATCH 0/3] Thinning the git toplevel directory) Jonathan Nieder
2011-02-22 15:56               ` [RFC/PATCH 0/3] Thinning the git toplevel directory Jeff King
2011-02-22 19:30                 ` Junio C Hamano
2011-02-22 19:32                   ` Sverre Rabbelier
2011-02-23  4:51                   ` Jeff King
2011-02-23  8:29                     ` Jonathan Nieder
2011-02-23  8:43                       ` Jeff King
2011-02-23  9:56                         ` Recursive make and variations on the theme Jonathan Nieder
2011-02-23 16:42                     ` [RFC/PATCH 0/3] Thinning the git toplevel directory Junio C Hamano
2011-02-23 17:18                       ` Nicolas Pitre
2011-02-23 23:09                         ` Drew Northup
2011-02-24  0:14                           ` Nicolas Pitre
2011-02-24 17:10                             ` Drew Northup
2011-02-24 18:04                               ` Nicolas Pitre
2011-02-24 19:08                                 ` Jeff King
2011-02-24 19:46                                   ` Drew Northup
2011-02-19  0:10           ` Piotr Krukowiecki
2011-02-19  0:31             ` Junio C Hamano
2011-02-19  0:50               ` Jonathan Nieder
2011-02-19  9:27                 ` Piotr Krukowiecki
2011-02-19  9:24               ` Piotr Krukowiecki
2011-02-19  9:41                 ` Advertising the prebuilt htmldocs and manpages Jonathan Nieder
2011-02-20  6:52                   ` Junio C Hamano
2011-02-20  9:40                     ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110218045526.GI15643@elie \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@fluxnic.net \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).