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

Re: [PATCH] Makefile: fix misdetection of relative pathnames

From
A Large Angry SCM <gitzilla@gmail.com>
Date
Feb 5, 2009, 22:16 UTC
Message-ID
<498B652D.8060708@gmail.com>
In-Reply-To
<7vhc39guv2.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 43 quoted lines
> A Large Angry SCM <gitzilla@gmail.com> writes:
> 
>> In 026fa0d5ad9538ca76838070861531c037d7b9ba, "Move computation of
>> absolute paths from Makefile to runtime (in preparation for
>> RUNTIME_PREFIX)", the following change was made to the Makefile. The
>> problem is that $(abspath names...) is a relatively recent addition to
>> GNU make and when used in an older GNU make, the test always fails
>> resulting incorrect installation dirs for the templates and commands.
>>
>> The new test is also wrong; (for *nix systems) in that it really wants
>> to test if the first character is a '/'
> 
> Ok, here is the final one from me that I am considering to commit, but it
> would be nice to hear success/failure feedback from people who had trouble
> with Steffen's changes.  I'd also like to hear from people who have been
> happy with Steffen's changes that this does not break things for them.
> 
> -- >8 --
> 
> The installation rules wanted to differentiate between a template_dir that
> is given as an absolute path (e.g. /usr/share/git-core/templates) and a
> relative one (e.g. share/git-core/templates) but it was done by checking
> if $(abspath $(template_dir)) and $(template_dir) yield the same string.
> 
> This was wrong in number of ways.
> 
>  * The user can give template_dir with a trailing slash from the command
>    line to invoke make, or in the included config.mak.  A directory path
>    ought to mean the same thing with or without such a trailing slash but
>    use of $(abspath) means with an absolute path with a trailing slash
>    fails the test.
> 
>  * The compilation could be done inside /usr directory with a relative
>    pathname share/git-core/templates and it will be mistaken as an
>    absolute path.
> 
>  * Versions of GNU make older than 3.81 do not have $(abspath) to begin
>    with.
> 
> This changes the detection logic to see if the given path begins with a
> slash.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tested-by: A Large Angry SCM <gitzilla@gmail.com>
Previous: Junio C Hamano
Message 13 of 13 in “026fa0d5ad Breaks installs with absolue $(gitexecdir) and $(template_dir) variables using older GNU makes”
  1. A Large Angry SCMFeb 1, 2009
  2. Junio C HamanoFeb 5, 2009
  3. Steffen ProhaskaFeb 5, 2009
  4. Junio C HamanoFeb 5, 2009
  5. Pascal ObryFeb 5, 2009
  6. Junio C HamanoFeb 5, 2009
  7. Pascal ObryFeb 5, 2009
  8. Junio C HamanoFeb 5, 2009
  9. Junio C HamanoFeb 5, 2009
  10. Makefile: fix misdetection of relative pathnamesJunio C Hamano, Feb 5, 2009
  11. Johannes SixtFeb 5, 2009
  12. Junio C HamanoFeb 5, 2009
  13. A Large Angry SCMFeb 5, 2009

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.