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

Re: [PATCH] Makefile: detect when PYTHON_PATH changes

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2012, 17:29 UTC
Message-ID
<7vehirustv.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121215140719.2409.27365.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 15 quoted lines
> @@ -2636,6 +2636,18 @@ GIT-GUI-VARS: FORCE
>              fi
>  endif
>  
> +### Detect Python interpreter path changes
> +ifndef NO_PYTHON
> +TRACK_VARS = $(subst ','\'',-DPYTHON_PATH='$(PYTHON_PATH_SQ)')
> +
> +GIT-PYTHON-VARS: FORCE
> +	@VARS='$(TRACK_VARS)'; \
> +	    if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
> +		echo 1>&2 "    * new Python interpreter location"; \
> +		echo "$$VARS" >$@; \
> +            fi
> +endif

Do we have the same issue when you decide to use /usr/local/bin/sh after building with /bin/sh set to SHELL_PATH?

 - If yes, I presume that there will be follow-up patches to this
   one, for SHELL_PATH, PERL_PATH, and TCLTK_PATH (there may be
   other languages but I didn't bother to check).  How would the use
   of language agnostic looking TRACK_VARS variable in this patch
   affect such follow-up patches?
 - If no (in other words, if we rebuild shell-scripted porcelains
   when SHELL_PATH changes), wouldn't it be better to see how it is
   done and hook into the same mechanism?
 - If no, and if the approach taken in this patch is better than the
   one used to rebuild shell scripts (it may limit the scope of
   rebuilding when path changes, or something, but again, I didn't
   bother to check), then again follow-up patches to this one to
   describe dependencies to build scripts in other languages in a
   similar way to this patch would come in the future.  The same
   question regarding TRACK_VARS applies in this case.

By the way, "1>&2" is easier to read if written as just ">&2", I think.

Thanks.
Previous: Christian CouderNext: Christian Couder
Message 2 of 3 in “Makefile: detect when PYTHON_PATH changes”
  1. Makefile: detect when PYTHON_PATH changesChristian Couder, Dec 15, 2012
  2. Junio C HamanoDec 15, 2012
  3. Christian CouderDec 15, 2012

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.