Skip to content

Commit 7212f28

Browse files
avargitster
authored andcommitted
Makefile: move git-SCRIPT-DEFINES adjacent to $(SCRIPT_DEFINES)
When "GIT-SCRIPT-DEFINES" was added in e4dd89a (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 46bac90 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9d530dc commit 7212f28

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Makefile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,6 +2256,13 @@ SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
22562256
$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
22572257
$(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV):\
22582258
$(perllibdir_SQ)
2259+
GIT-SCRIPT-DEFINES: FORCE
2260+
@FLAGS='$(SCRIPT_DEFINES)'; \
2261+
if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \
2262+
echo >&2 " * new script parameters"; \
2263+
echo "$$FLAGS" >$@; \
2264+
fi
2265+
22592266
define cmd_munge_script
22602267
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
22612268
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
@@ -2271,14 +2278,6 @@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
22712278
22722279
endef
22732280

2274-
GIT-SCRIPT-DEFINES: FORCE
2275-
@FLAGS='$(SCRIPT_DEFINES)'; \
2276-
if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \
2277-
echo >&2 " * new script parameters"; \
2278-
echo "$$FLAGS" >$@; \
2279-
fi
2280-
2281-
22822281
$(SCRIPT_SH_GEN) : % : %.sh GIT-SCRIPT-DEFINES
22832282
$(QUIET_GEN)$(cmd_munge_script) && \
22842283
chmod +x $@+ && \

0 commit comments

Comments
 (0)