[build2] Wildcards and pattern exclusion

Moldmann Max (DC-MA/ENG52-NA) Max.Moldmann at boschrexroth-us.com
Mon Apr 10 14:39:31 UTC 2017


Hi Boris,

The Windows platform doesn't seem to support exit codes.
Build2 is called in a script like this:

C:\build2\bin\b.exe --config-sub build\tricore-config.sub.exe %*
if errorlevel 0 goto SUCCESS
goto END

The script always tries to execute the commands after success, even when the build fails - no matter if parameters (%*) are present or not.

Max

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Saturday, April 8, 2017 12:08 PM
To: Moldmann Max (DC-MA/ENG52-NA) <Max.Moldmann at boschrexroth-us.com>
Cc: users at build2.org
Subject: Re: [build2] Wildcards and pattern exclusion

Hi Max,

Moldmann Max (DC-MA/ENG52-NA) <Max.Moldmann at boschrexroth-us.com> writes:

> exe{main}: {h c}{** -Template*}
> 
> did it for me now, cause the files all match this pattern.
> But it still would be nice if I could exclude all files below a 
> certain path as the pattern you suggested didn't work (same error 
> message as before):
> 
> exe{main}: {h c}{** -Templates/*}

Yes, right. The exclusions are currently matched against the last component of the path, I forgot about that. We will try to address this at some point.


> Build2 doesn't seem to produce exit codes >0 for a failed build which 
> would be nice when included in scripts.

Hm, that's surprising:

$ b
c++ cxx{hello}
hello.cxx: In function ‘int main(int, char**)’:
hello.cxx:7:7: error: ‘argc1’ was not declared in this scope
   if (argc1 != 2)
       ^
info: failed to update dir{./}
$ echo $?
1

Can you give more details (which platform, what's the command line, etc)?


> Concluding I can state Build2 is MUCH faster than my old parallel make 
> build! Awesome work!!!

Thanks, I am glad you have noticed.

Boris


More information about the users mailing list