bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] Don't abuse $(prefix) for finding build-time files.


From: Sergiu Ivanov
Subject: Re: [PATCH] Don't abuse $(prefix) for finding build-time files.
Date: Sat, 20 Jun 2009 13:33:15 +0300
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

On Fri, Jun 19, 2009 at 03:01:17PM +0200, Thomas Schwinge wrote:
> On Fri, Jun 19, 2009 at 12:21:17AM +0300, Sergiu Ivanov wrote:
> > On Wed, Jun 17, 2009 at 12:40:56AM +0200, Thomas Schwinge wrote:
> > > +%.sdefsi:
> > > + echo '#include <hurd/$*.defs>' | \
> > > +   $(CPP) \
> > > +     $(CPPFLAGS) $(MIGSFLAGS) $($*-MIGSFLAGS) -DSERVERPREFIX=S_ \
> > > +     -x c - -o $@
> > 
> > Could you please explain what this expression does? Does it somehow
> > inject the #include statement into the code of fs_notifyServer.c?..
> 
> The echo statement does the obvious, replacing $* with the so-called stem
> (see the Make info manual; the stem is the % part of the target).  I.e.,
> for ``make foo.sdefsi'' we'll get ``#include <hurd/foo.defs>''.  This
> line of code is piped into GCC (same compiler flags and output file as
> before), but additionally GCC is told to read C language source code (-x
> c) from stdin (-).

Aha, that's clear. Thanks a lot! :-)

Regards,
scolobb




reply via email to

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