Handling of shell builtins in make(1)

Sergey Babkin babkin at verizon.net
Tue May 24 05:08:47 PDT 2005


>From: Harti Brandt <hartmut.brandt at dlr.de>

>On Mon, 23 May 2005, Scott Long wrote:
>

>SL>> Opinions?
>SL>> 
>SL>> harti
>SL>
>SL>4. Separate /bin/sh into a front end and back end (libsh) and include libsh
>SL>into make.
>SL>
>SL>(running and hiding as I hit the 'send' key)
>
>Would there be other uses for this?

Yes, I think it could be useful for many programs.

Or one more option: add a flag to shell that
will make it exit after any command returning non-0
status (at the ";" point, as opposed to "&&", 
"||" and such). Then make could just pass all 
the commands to the shell in one go. And it would 
be very useful for all kinds of sysadmin scripts
as well where explicitly checking for the results
of every command is a pain. Even with make it
would be a big improvement, since in the current
format a command failing inside a "for" loop
won't cause make to stop unless explicitly programmed
so, like:

target: dependencies
   for ... ;\
   do \
     cmd || exit 1; \
   done


-SB


More information about the freebsd-arch mailing list