[Top][All Lists]

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

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

From: Thomas Schwinge
Subject: Re: [PATCH] Don't abuse $(prefix) for finding build-time files.
Date: Fri, 19 Jun 2009 15:01:17 +0200
User-agent: Mutt/1.5.11


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) \
> > +       -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 (-).


Attachment: signature.asc
Description: Digital signature

reply via email to

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