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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Johannes Sixt" <j6t@xxxxxxxx>
Am 05.05.2016 um 23:28 schrieb Philip Oakley:
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':

I haven't dug deep into the G4W make results so I can't say either way regarding the make on G4W, but it does show when creating the Git.sln project via the contrib process. It is specific to the Windows OS and how it generates the path to the exe (You will know far more than me).

see below regarding commit message


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.

The issue is in the libgit sub-project, where both reside side by side, and when sideband.c is being compiled, the PREFIX has also been declared on the command line, thus giving the unexpected conflict.

I'll bring more of the explanation into the commit message.

--
Philip
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]