[Pm-utils] [patch review request] Remove hardcoded /usr/lib/pm-utils/functions dependence
Dan Nicholson
dbn.lists at gmail.com
Thu Jan 31 06:11:43 PST 2008
On Jan 31, 2008 5:08 AM, Michael Biebl <mbiebl at gmail.com> wrote:
> 2008/1/31, Victor Lowther <victor.lowther at gmail.com>:
> > On Jan 30, 2008 8:27 PM, Michael Biebl <mbiebl at gmail.com> wrote:
> > > 2008/1/31, Michael Biebl <mbiebl at gmail.com>:
> > > > One way to simplify this is as follows:
> > > >
> > > > sleep_in_scripts = foo.in bar.in baz.in
> > > > sleep_SCRIPTS=$(sleep_in_scripts:.in=)
> > > > CLEANFILES=$(sleep_SCRIPTS)
> > > > do_subst = ...
> > > > %: %.in Makefile
> > > > $(do_subst) $< > $@
> > > >
> > > > %: %.in is a gnu make extension though.
> >
> > It turns out that there is a POSIX-ish way of doing this (I think).
> >
>
> Not quite:
> $(sleep_SCRIPTS): $(sleep_sources) Makefile
>
> this means, whenever *one* of the .in files is changed, all files are
> re-processed. Not quite what we want.
>
> Maybe we should put this whole effort on hold for the moment until we
> find a better, less ugly way.
Give this a shot:
.SUFFIXES: .in
.in:
$(do_subst) $< > $@
.SUFFIXES are old-style pattern rules. This is what automake uses to
be portable across make variants when constricting pattern rules for
.c, .o, etc.
--
Dan
More information about the Pm-utils
mailing list