Hi David This is what I got by using your your code:
======================================================= D:\data\dev\jhwcu\src\je\win>gmake compiling bitrock/hvr_bitrock.xml ... d:/perl/bin/perl "-I../../../src/jp/perl" ../../../src/jp/perl/rm.pl ../../../.. /distr/win32/*.exe 'd:\program files\BitRock InstallBuilder Enterprise 5.4.7\bin\builder.exe' build 'bitrock/hvr_bitrock.xml' windows && test -e ../../../../distr/win32/*.exe d:\program files\BitRock InstallBuilder Enterprise 5.4.7\bin\builder.exe: no suc h device or address gmake: *** [kit] Error 127 ======================================================== I guess the reason is that gmake on Windows is wrongly invoking the compiling process and was asking builder.exe to take parameter && test. However, my code does not work properly either, ======================================================== compiling bitrock/hvr_bitrock.xml ... d:/perl/bin/perl "-I../../../src/jp/perl" ../../../src/jp/perl/rm.pl ../../../.. /distr/win32/*.exe 'd:\program files\BitRock InstallBuilder Enterprise 5.4.7\bin\builder.exe' build 'bitrock/hvr_bitrock.xml' windows if test -e ../../../../distr/win32/*.exe; \ then echo ' compiling success! ...'; \ else echo ' compiling failes ...'; \ fi compiling failes ... ========================================================= The Makefile produces "compiling fails" error while the compiling procedure just succeeds .... Any help? > Date: Tue, 20 May 2008 10:18:19 -0400 > From: [EMAIL PROTECTED] > To: [email protected] > Subject: Re: How to check if a file exists? > CC: [EMAIL PROTECTED] > > On Tue, May 20, 2008 at 8:21 AM, Greg Chicares wrote: >> I see nothing wrong with your original code: > > Yes, it looks correct except for not affecting the exit status, which > after all was the original point. But that may have just been for > demonstration purposes. Personally I would go with something shorter > and simpler: > > '$(BITROCK_SYSTEM)' build '$(XML)' windows && test -e $(OUTPUT)/*.exe > > which doesn't require a lot of continuation lines. > > Also, of course, you're running a Windows executable but showing Unix > shell syntax. Again, that may be for demo purposes or due to having > Cygwin et al but it's worth noting. > > Last, I'm not sure if the *.exe wildcard is there for a good reason, > but if so one nice thing about "test -e" is that it ignores arguments > after the first so you can safely use it with a wildcard. OTOH if you > know the name of the output file it's better to write your action in > terms of [EMAIL PROTECTED] > > -David Boyce _________________________________________________________________ Connect to the next generation of MSN Messenger http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
