Date: Thu, 20 Sep 2001 22:42:47 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: tim DOT van DOT holder AT pandora DOT be Message-Id: <7263-Thu20Sep2001224246+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com, wojciech DOT galazka AT polkomtel DOT com DOT pl In-reply-to: <000501c141f1$943e01e0$33f8e0d5@pandora.be> (tim DOT van DOT holder AT pandora DOT be) Subject: Re: W2K error message documentation References: <000501c141f1$943e01e0$33f8e0d5 AT pandora DOT be> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Tim Van Holder" > Date: Thu, 20 Sep 2001 18:30:33 +0200 > > > The original problem was with a Makefile that invoked command.com > > like shown above. That Makefile does that because the command > > it wants to run is non-portable to other shells. > > So this is a makefile with > > SHELL = /bin/sh > > but with a certain rule like > > foo: bar > command.com /c some_DOS_only_command > > ? Yes. The SHELL = line is needed only for running the test suite, IIRC. > > When I said that we will need to find a way to run cmd on those > > systems, I meant the following: we need a method to detect such > > a system from the Makefile, and then run "cmd.exe /c ..." instead > > of "command.com /c ...". > > Since we can fairly easily detect NT/2K/XP (right?) No, we can't; not from a Makefile. If you know how to do that, please tell. > couldn't make > substitute '\1cmd.exe /c' for '^\([-@]*\)command\(.com\)? /c' > unconditionally in commands? If you mean that Make should do that on its own, running cmd.exe where the Makefile says command.com, then I think this would be wrong: Make has no business second-guessing the user's intent. > That only leaves more complicated > rules (eg some sh-based if-then-else that invokes command.com at > some point) without handling This particular Makefile cannot rely on Bash, since it's from the Make distriobution, and Make is one of the few basic tools which one should be able to build with onlty minimal environment.