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

Re: [PATCH 3/6] git-gnu-progs-Makefile: git Makefile update

From
Bryan Larsen <bryanlarsen@yahoo.com>
Date
Jul 11, 2005, 19:21 UTC
Message-ID
<42D2C6BD.4050107@yahoo.com>
In-Reply-To
<7vk6jxupxs.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 9 quoted lines
> Bryan Larsen <bryanlarsen@yahoo.com> writes:
>>+	for file in $(SCRIPTS); do \
>>+		sed -e "s/DATE\=date/DATE=$${DATE}/" -e "s/CP\=cp/CP=$${CP}/" -e "s/XARGS\=xargs/XARGS=$${XARGS}/" -e "s/STAT\=stat/STAT=$${STAT}/" $$file > $$file.new; \
>>+		cat $$file.new > $$file; rm $$file.new; \
>>+	done
> 
> 
> I am not yet convinced "one variable per GNU program" is the
> right way to do 

My first thought was to have some type of "prefix" argument that could either be "g" or "". But xargs is called "gnuxargs" instead of "gxargs". I'm not sure where that braindamage comes from, but I have to deal with it.

To me, one variable per program makes sense: we do it in Makefiles all the time $(CC), $(LD), et cetera.

 > (I do agree it is a problem and I appreciate
> your trying to solving it; an obvious alternative cop-out would
> be to fix this in the user's environment, but there might be a
> saner solution). 

If we can move the solution into the Portfile somehow, it probably wouldn't bother me.

Show 8 quoted lines
> Assuming that this is the way to go, wouldn't
> it be saner if this sed munging is done in only one place, say
> git-sh-setup-script, and have everybody include that?  If we
> want to have some scripts usable not at the top-level GIT
> directory, then git-sh-setup-script may not be a good place; in
> which case introduce git-sh-compat-script and have everybody
> include _that_ instead?
> 

That's the way it's done in cogito: it's in cg-Xlib and nowhere else. This isn't obvious from the Makefile: perhaps I should have made it so.

I was very tempted to put it in git-sh-setup-script, but realized that was inappropriate. Introducing a gid-sh-compat-script seems more sane.

Bryan
Previous: Junio C HamanoNext: Bryan Larsen
Message 15 of 18 in “parameterize gnu tool names; add Portfile for OS X darwinports”
  1. 0/6 parameterize gnu tool names; add Portfile for OS X darwinportsBryan Larsen, Jul 11, 2005
  2. 1/6 git-gnu-progs: parameterize gitBryan Larsen, Jul 11, 2005
  3. 2/6 config-sh: find and verify utilsBryan Larsen, Jul 11, 2005
  4. 3/6 git-gnu-progs-Makefile: git Makefile updateBryan Larsen, Jul 11, 2005
  5. Junio C HamanoJul 11, 2005
  6. Linus TorvaldsJul 11, 2005
  7. Bryan LarsenJul 11, 2005
  8. Linus TorvaldsJul 11, 2005
  9. Matthias UrlichsJul 12, 2005
  10. Junio C HamanoJul 11, 2005
  11. Bryan LarsenJul 11, 2005
  12. Junio C HamanoJul 11, 2005
  13. Bryan LarsenJul 11, 2005
  14. Junio C HamanoJul 11, 2005
  15. Bryan LarsenJul 11, 2005
  16. 4/6 cogito-gnu-progs: parameterize cogitoBryan Larsen, Jul 11, 2005
  17. 5/6 cogito-gnu-progs-Makefile: cogito Makefile updateBryan Larsen, Jul 11, 2005
  18. 6/6 darwinports-Portfile: Portfile for cogitoBryan Larsen, Jul 11, 2005

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.