[prev in list] [next in list] [prev in thread] [next in thread] 

List:       crux
Subject:    Re: Errors during Compilation
From:       Markus Ackermann <maol () symlink ! ch>
Date:       2002-06-16 19:19:25
[Download RAW message or body]

On Sun 16.06.2002, 12:49:59 -0600, Andrew Green said in public:
>build() {
>    ./configure || return 1
>    make || return 1
>}

It's quite ugly. And the 'return 1' is only evaluated if the first
statements exits with a non-zero return code, so the extra return 1
statement is redundant anyway.

>It doesn't really yield much info, but perhaps if Per extended the pkgmk 
>spec to evalute the return code it could be more powerful.

>'configure' failures return 1:  "Pkgmk failed during ./configure." 
> (./configure || return 1)
[etc...]

This is pretty impossible and would make pkgmk ugly as hell. The point about
the build() function is that it can be run just as is. With your suggestion
the entire function must be parsed first, extended to include the messages
and control structure, and finally run. This would easily break if someone
uses a for loop over several lines for example. GNU make offers all we'd
ever want here, no need for Per to write his own f*cking complicated
Make^H^H^H^HPkgfile parser.

Markus.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic