delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/10/21/09:25:25

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Thu, 21 Oct 2004 09:24:48 -0400
Message-Id: <200410211324.i9LDOm08011138@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <01c4b72d$Blat.v2.2.2$08f4f8a0@zahav.net.il> (eliz@gnu.org)
Subject: Re: tar.exe problem
References: <DvKcd.15034$nj DOT 12695 AT newssvr13 DOT news DOT prodigy DOT com> <2thjecF1urnn1U1 AT uni-berlin DOT de> <48Fdd.16708$nj DOT 14914 AT newssvr13 DOT news DOT prodigy DOT com> <01c4b72d$Blat.v2.2.2$08f4f8a0 AT zahav DOT net DOT il>
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Using a batch file does not change the command-line length
> limitations in any way.

Ah, but using a Makefile does!  Try this:

---- \/ foo \/ ---
#!make -f
.PHONY: command
command:
	@echo long command line
---- /\ foo /\ ----

Then, "make -f foo".  You can put *that* in a batch file, or if you're
running bash, you should be able to just run "./foo" ("./" optional if
PATH includes ".")  and it should use the first line to figure out
what to run.

You can even have "foo" accept parameters to choose which command to run:

---- \/ foo \/ ---
#!make -f
.PHONY: command bar
command:
	@echo long command line
bar:
	@echo second line
---- /\ foo /\ ----

then "foo" runs the first line, and "foo bar" runs the second.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019