lua-users home
lua-l archive

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


On Tue, Feb 14, 2006 at 02:50:29PM +0800, Michael T. Richter wrote:
> That, then, would fail under various UNIX environments.  Not a portable
> solution.  Of course writing a sed/awk/perl/python/whatever script to
> globally make that change on your computer will solve the problem
> nicely.  Hell, there's probably something you can do with CMD.EXE --
> there's a whole bunch of stuff it can do to files that nobody every
> looks at.

Out of curiosity, where would it fail?  Is && a bashism?  It's much
preferable to ";", since && will stop processing if the "cd" fails.
With the current makefile, if the "cd" fails, it'll nest infinitely:

08:57pm glenn@zewt/13 [~/lua-5.1] make linux
cd abc; make linux
/bin/sh: line 0: cd: abc: No such file or directory
make[1]: Entering directory `/home/glenn/lua-5.1'
cd abc; make linux
/bin/sh: line 0: cd: abc: No such file or directory
make[2]: Entering directory `/home/glenn/lua-5.1'
cd abc; make linux
/bin/sh: line 0: cd: abc: No such file or directory
make[3]: Entering directory `/home/glenn/lua-5.1'
cd abc; make linux
/bin/sh: line 0: cd: abc: No such file or directory
make[4]: Entering directory `/home/glenn/lua-5.1'

whereas && stops immediately.

09:03pm glenn@zewt/13 [~/lua-5.1] make linux
cd abc && make linux
/bin/sh: line 0: cd: abc: No such file or directory
make: *** [linux] Error 1

-- 
Glenn Maynard