[U-Boot] [PATCH v2] makefiles: fixes for building build tools

Mike Frysinger vapier at gentoo.org
Sat Nov 14 00:07:33 CET 2009


On Friday 13 November 2009 13:53:45 Scott Wood wrote:
> Mike Frysinger wrote:
> > On Wednesday 04 November 2009 19:41:41 Scott Wood wrote:
> >> --- a/rules.mk
> >> +++ b/rules.mk
> >>
> >> +$(HOSTOBJS): $(obj)%.o: %.c
> >> +	$(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR))
> >> -o $@ $< -c
> >>  +$(NOPEDOBJS): $(obj)%.o: %.c
> >> +	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F))
> >>  $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
> >
> > wouldnt these make more sense in config.mk with all the other patterns.
> 
> The static pattern rules won't work unless $(HOSTOBJS)/$(NOPEDOBJS) has
> been filled in by the makefile.  config.mk is included too early for that.
> 
> A non-static pattern won't work unless we can distinguish between
> target, host-pedantic, and host-no-pedantic from the filename or path
>  alone.
> 
> Plus, the name of the file is *rules*.mk. :-)

yes, but so far, all the rules have been in config.mk.  i'm ok with them all 
being in rules.mk ... they should just be together.

i guess a comment above them for now explaining why they arent in the same 
place as all other pattern rules would be nice ...

> > and create a pattern target for creating host executables.
> 
> That would be nice to have, but is orthogonal to what this patch does.
> One thing at a time.

the point was to avoid duplicating everything again.  declaring variables to 
contain the common steps would work as well ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091113/5366857a/attachment.pgp 


More information about the U-Boot mailing list