Thanks a lot all of you for making this so clear.

With warm regards,
-Payal
-- 



On Wed, Mar 31, 2010 at 07:17:16AM -0400, David Boyce wrote:
> On Wed, Mar 31, 2010 at 7:03 AM, Payal <[email protected]> wrote:
> > On the same line how do I turn OFF echoing of cmd2 and cmd3 only.
> 
> Impossible. It's important to understand the boundary between make and
> the shell, which can cause a great deal of confusion. Make does not
> see this line as a sequence of 3 commands; it sees it as, well, a
> line. Make has no understanding of the semantics of the text, or even
> what language it's written in. It simply passes the line to the shell,
> which does all the processing. You can tell make to echo all or
> nothing but the rest is up to the shell. And the shell is not capable
> of doing this either, though it's possible to fake it via
> 
>         @echo "cmd1 && cmd3"; cmd1 && cmd2 && cmd3
> 
> This may seem inconsistent with my previous response but that's
> because the shell supports a -e flag which says "exit on any command
> failure". POSIX says that make must behave as if it had passed -e to
> the shell, which in almost all cases means the same as actually
> passing -e to the shell. So this is an area where make can have some
> effect on the behavior of the shell, but that's about the limit.
> 
> > So, to ignore errors from cmd3, I have to do,
> >
> >     cmd1 ; cmd2 ; cmd3 || true
> >
> > right?
> 
> Yes, modulo the discussion about ':'. Again, note that this is not a
> make issue; the same would apply if you were running the command line
> at a shell prompt.
> 
> David Boyce


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to