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

Re: [git-for-windows] [PATCH] exec_cmd.c, sideband.c, Makefile: avoid multiple PREFIX definitions

From
Johannes Sixt <j6t@kdbg.org>
Date
May 6, 2016, 06:18 UTC
Message-ID
<572C3723.8010508@kdbg.org>
In-Reply-To
<1462483733-3496-2-git-send-email-philipoakley@iee.org>
Am 05.05.2016 um 23:28 schrieb Philip Oakley:
Show 7 quoted lines
> The short and sweet PREFIX can be confused when used in many places.
>
> Rename both usages to better describe their purpose.
>
> Noticed when compiling Git for Windows using MSVC/Visual Studio which
> reports the conflict beteeen the command line definition and the
> definition in sideband.c

You should describe the circumstances better under which you notice a conflict, because there is no conflict when Git is built with the Makefile and 'make':

Show 10 quoted lines
> diff --git a/Makefile b/Makefile
> index 33b0f76..bcdd3ec 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1973,7 +1973,7 @@ exec_cmd.sp exec_cmd.s exec_cmd.o: GIT-PREFIX
>   exec_cmd.sp exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \
>   	'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
>   	'-DBINDIR="$(bindir_relative_SQ)"' \
> -	'-DPREFIX="$(prefix_SQ)"'
> +	'-DEXEC_PREFIX="$(prefix_SQ)"'

Notice that PREFIX is set only for a small subset of .c files. sideband.c is not among them.

-- Hannes
Previous: Junio C HamanoNext: Philip Oakley
Message 6 of 7 in “Conflicting PREFIX usage”
  1. Conflicting PREFIX usagePhilip Oakley, May 5, 2016
  2. exec_cmd.c, sideband.c, Makefile: avoid multiple PREFIX definitionsPhilip Oakley, May 5, 2016
  3. Junio C HamanoMay 5, 2016
  4. Philip OakleyMay 6, 2016
  5. Junio C HamanoMay 6, 2016
  6. Johannes SixtMay 6, 2016
  7. Philip OakleyMay 6, 2016

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.