Re: [PATCH v4 15/23] Makefile: add a "TRACK_template" for GIT-*{FLAGS,DEFINES,...}

2 messages, 2 authors, 2021-11-19 · open the first message on its own page

Re: [PATCH v4 15/23] Makefile: add a "TRACK_template" for GIT-*{FLAGS,DEFINES,...}

From: Junio C Hamano <hidden>
Date: 2021-11-19 06:56:47

Junio C Hamano [off-list ref] writes:
Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted
@@ -2238,12 +2235,7 @@ SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):\
 	$(localedir_SQ):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
 	$(gitwebdir_SQ):$(PERL_PATH_SQ):$(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
+$(eval $(call TRACK_template,GIT-SCRIPT-DEFINES,SCRIPT_DEFINES))
 
 define cmd_munge_script
 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
Attempting to apply 1-14 on top of 'master' gets stuck here, as
"GIT-SCRIPT-DEFINES: FORCE" appears after "define cmd_munge_script".

Are you basing these patches on some unrelated work?
Ah, I figured it out.  This wants to be applied after the
ab/sh-retire-helper-functions topic graduates to 'master'.

Re: [PATCH v4 15/23] Makefile: add a "TRACK_template" for GIT-*{FLAGS,DEFINES,...}

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-11-19 07:32:50

On Thu, Nov 18 2021, Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted
@@ -2238,12 +2235,7 @@ SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):\
 	$(localedir_SQ):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
 	$(gitwebdir_SQ):$(PERL_PATH_SQ):$(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
+$(eval $(call TRACK_template,GIT-SCRIPT-DEFINES,SCRIPT_DEFINES))
 
 define cmd_munge_script
 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
Attempting to apply 1-14 on top of 'master' gets stuck here, as
"GIT-SCRIPT-DEFINES: FORCE" appears after "define cmd_munge_script".

Are you basing these patches on some unrelated work?
Ah, I figured it out.  This wants to be applied after the
ab/sh-retire-helper-functions topic graduates to 'master'.
It is noted in the v1..v3 cover letter of this series that it needs to
be on top of ab/sh-retire-helper-functions.

But I omitted it from the v4 by mistake. Sorry about wasting your time
on finding that out as a result, it really should have been noted there.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help