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

Re: [msysGit] [PATCH] Embed an application manifest on MinGW

From
Cesar Eduardo Barros <cesarb@cesarb.net>
Date
May 28, 2011, 21:07 UTC
Message-ID
<4DE16418.4020002@cesarb.net>
In-Reply-To
<alpine.DEB.1.00.1105282241510.11411@bonsai2>
Em 28-05-2011 17:44, Johannes Schindelin escreveu:
Show 26 quoted lines
> On Sat, 28 May 2011, Cesar Eduardo Barros wrote:
>> [...]
>> @@ -1551,6 +1554,11 @@ ifdef USE_NED_ALLOCATOR
>>          COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
>>   endif
>>
>> +ifdef APPLICATION_MANIFEST
>> +	# Cannot be in LIB_OBJS because it must always be linked in
>> +	RESOURCE_OBJS += compat/win32/resource.o
>> +endif
>> +
>>   ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
>>   	export GIT_TEST_CMP_USE_COPIED_CONTEXT
>>   endif
>> [...]
>>
>> -git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
>> +git$X: git.o $(BUILTIN_OBJS) $(RESOURCE_OBJS) $(GITLIBS)
>> [...]
>>
>> -git-%$X: %.o $(GITLIBS)
>> +git-%$X: %.o $(RESOURCE_OBJS) $(GITLIBS)
>> [...]
>
> Is it possible that adding the resource object to GITLIBS would reduce the
> patch and be "more correct", too?
I thought about it, but it felt wrong. It is not a library, it is an object.

Also, while adding it to GITLIBS would add the object to all the right rules (in fact, I did a search for GITLIBS to find all the places to add the new object to), I believe it would get the object linked twice in some of the rules (the ones which do a $(filter %.o,$^) would get it both from GITLIBS via the filter and from GITLIBS via $(LIBS) on the command line).

-- 
Cesar Eduardo Barros
cesarb@cesarb.net
cesar.barros@gmail.com
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 5 in “Embed an application manifest on MinGW”
  1. Embed an application manifest on MinGWCesar Eduardo Barros, May 28, 2011
  2. Johannes SchindelinMay 28, 2011
  3. Cesar Eduardo BarrosMay 28, 2011
  4. Johannes SchindelinMay 28, 2011
  5. Cesar Eduardo BarrosMay 28, 2011

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.