[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in pattern rule parsing: how to handle?
From: |
Sam Ravnborg |
Subject: |
Re: Bug in pattern rule parsing: how to handle? |
Date: |
Sun, 2 Nov 2008 21:20:08 +0100 |
User-agent: |
Mutt/1.4.2.1i |
On Wed, Oct 29, 2008 at 07:24:50PM -0700, Philip Guenther wrote:
> On Wed, Oct 29, 2008 at 2:12 PM, Sam Ravnborg <address@hidden> wrote:
> > On Sun, Oct 26, 2008 at 07:12:53PM -0400, Paul Smith wrote:
> ...
> >> Makefile:442: *** mixed implicit and normal rules. Stop.
> >>
> >> config %config: scripts_basic outputmakefile FORCE
> >> $(Q)mkdir -p include/linux include/config
> >> $(Q)$(MAKE) $(build)=scripts/kconfig $@
> >
> > Here I try to catch the following:
> >
> > make config
> > make menuconfig
> > make xconfig
> > make foobarconfig
> >
> > I must admit I cannot see the problem with mixing implicit and normal
> > rules in the above. But I gues this is my simple use of it.
>
> I see at least two ways in which it's confusing:
> 1) what prerequisites does "foo" have with this rule:
> foo %.c: %.c.real
> @: cp $< $@
>
> 2) rules with multiple pattern targets have special meaning to make:
> Pattern rules may have more than one target. Unlike normal rules,
> this does not act as many different rules with the same prerequisites
> and commands. If a pattern rule has multiple targets, `make' knows
> that
> the rule's commands are responsible for making all of the targets.
> <...>
> I.e., this rule:
> %.a %.b:
> ${commands}
> says that building "bar.a" will also build "bar.b", and
> building "quux.a" will also build "quux.b". With this rule:
> foo %.a %.b:
> ${commands}
> should make assume that building "bar.a" will also build "bar.b"
> *and* "foo"?
> How about this rule:
> foo blip %.a %.b:
> ${commands}
> Will building "bar.a" also build "bar.b", "foo", and "blip"?
> How about this one:
> foo blip %.a:
> ${commands}
> ...whoops...
Thanks for the detailed explanation. I see how it is confusing in
the cases you list. I was initally wondering because the specific
usage in the kernel is simpler.
>
>
> > Do you have any god suggestion how to rewrite this?
[suggestions snipped]
Thanks. I will most likely do something along the lines of the last
suggestion.
Sam
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Bug in pattern rule parsing: how to handle?,
Sam Ravnborg <=