From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Fri, 13 Nov 2009 12:53:45 -0600 Subject: [U-Boot] [PATCH v2] makefiles: fixes for building build tools In-Reply-To: <200911131351.12907.vapier@gentoo.org> References: <20091105004141.GB925@loki.buserror.net> <200911131351.12907.vapier@gentoo.org> Message-ID: <4AFDAB39.1080202@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. :-) > 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. -Scott