bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Should use backslashes in depend2.am


From: Ralf Wildenhues
Subject: Re: [PATCH] Should use backslashes in depend2.am
Date: Sun, 21 Oct 2007 21:22:18 +0200
User-agent: Mutt/1.5.16 (2007-10-11)

* Jan Engelhardt wrote on Sun, Oct 21, 2007 at 09:13:43PM CEST:
> On Oct 21 2007 21:01, Ralf Wildenhues wrote:
> >* Jan Engelhardt wrote on Sun, Oct 21, 2007 at 08:53:40PM CEST:
> >> 
> >>  ?!GENERIC?        %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o 
> >> %OBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
> >> -?GENERIC??!SUBDIROBJ?     %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo 
> >> %-c% -o %OBJ% %SOURCE%
> >> +?GENERIC??!SUBDIROBJ?     %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo 
> >> %-c% -o %OBJ% %SOURCE% && \
> >>  ?GENERIC??SUBDIROBJ?      depbase=`echo %OBJ% | sed 
> >> 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
> >>  ?GENERIC??SUBDIROBJ?      %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo 
> >> %-c% -o %OBJ% %SOURCE% &&\
> >>    mv -f %DEPBASE%.Tpo %DEPBASE%.Po
> >[...]
> >
> >Thanks for the patch.  Could you please show what it is supposed to fix?
> 
> My "don't be so verbose" patch (now posix compliant as it seems to
> have turned out) - where the full command needs to be (read: should
> be, preferably, but not striclty necessary) on one line, as @echo is
> used.

Hmm, can't you just push that onto your patch?  The way the code is
written now it saves one shell invocation per compilation, which is
a nice speedup for gcc users.  GNU make implements this optimization:
in case the rule command does not contain shell active characters,
it execs the compiler right away instead of `sh -c ...'.

> Since ?SUBDIROBJ? uses &&\ I thought it would not hurt too much to also
> use it in the ?!SUBDIROBJ? case.

Well, in the ?SUBDIROBJ? case there is a shell command substitution
`cmd`, so in that case the shell will be invoked anyway.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]