git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 1/6] Makefile: move git-SCRIPT-DEFINES adjacent to $(SCRIPT_DEFINES)
Date: Thu, 21 Oct 2021 21:57:55 +0200	[thread overview]
Message-ID: <patch-1.6-2a7b5de44a8-20211021T195538Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.6-00000000000-20211021T195538Z-avarab@gmail.com>

When "GIT-SCRIPT-DEFINES" was added in e4dd89ab984 (Makefile: update
scripts when build-time parameters change, 2012-06-20) the rules for
generating the scripts themselves were moved further away from the
"cmd_munge_script" added in 46bac904581 (Do not install shell
libraries executable, 2010-01-31).

Let's move these around so that the variables and defines needed by
given targets immediately precede them. This is not needed for any
subsequent changes to work, but makes the code consistent with how
GIT-PERL-DEFINES is structured.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Makefile | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 381bed2c1d2..f52402b24d8 100644
--- a/Makefile
+++ b/Makefile
@@ -2256,6 +2256,13 @@ SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
 	$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
 	$(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV):\
 	$(perllibdir_SQ)
+GIT-SCRIPT-DEFINES: FORCE
+	@FLAGS='$(SCRIPT_DEFINES)'; \
+	    if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \
+		echo >&2 "    * new script parameters"; \
+		echo "$$FLAGS" >$@; \
+            fi
+
 define cmd_munge_script
 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
     -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
@@ -2271,14 +2278,6 @@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
     $@.sh >$@+
 endef
 
-GIT-SCRIPT-DEFINES: FORCE
-	@FLAGS='$(SCRIPT_DEFINES)'; \
-	    if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \
-		echo >&2 "    * new script parameters"; \
-		echo "$$FLAGS" >$@; \
-            fi
-
-
 $(SCRIPT_SH_GEN) : % : %.sh GIT-SCRIPT-DEFINES
 	$(QUIET_GEN)$(cmd_munge_script) && \
 	chmod +x $@+ && \
-- 
2.33.1.1494.g88b39a443e1


  reply	other threads:[~2021-10-21 19:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 19:57 [PATCH 0/6] Makefile: be less eager to re-build, *.sh code cleanups Ævar Arnfjörð Bjarmason
2021-10-21 19:57 ` Ævar Arnfjörð Bjarmason [this message]
2021-10-21 19:57 ` [PATCH 2/6] Makefile: remove $(GIT_VERSION) from $(SCRIPT_DEFINES) Ævar Arnfjörð Bjarmason
2021-10-25 18:57   ` Jeff King
2021-10-21 19:57 ` [PATCH 3/6] Makefile: remove $(NO_CURL) " Ævar Arnfjörð Bjarmason
2021-10-21 19:57 ` [PATCH 4/6] git-instaweb: unconditionally assume that gitweb is mod_perl capable Ævar Arnfjörð Bjarmason
2021-10-21 19:57 ` [PATCH 5/6] git-sh-setup: remove unused sane_egrep() function Ævar Arnfjörð Bjarmason
2021-10-22  0:27   ` Junio C Hamano
2021-10-21 19:58 ` [PATCH 6/6] git-sh-setup: remove "sane_grep", it's not needed anymore Ævar Arnfjörð Bjarmason
2021-10-21 23:17   ` Junio C Hamano
2021-10-22 14:27     ` Johannes Schindelin
2021-10-24  9:08       ` Junio C Hamano
2021-10-25 13:09         ` Johannes Schindelin
2021-10-25 17:14           ` Junio C Hamano
2021-10-25 19:08 ` [PATCH 0/6] Makefile: be less eager to re-build, *.sh code cleanups Jeff King

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=patch-1.6-2a7b5de44a8-20211021T195538Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).