From mboxrd@z Thu Jan 1 00:00:00 1970 From: George G. Davis Date: Wed, 10 Dec 2003 11:37:24 -0500 Subject: [U-Boot-Users] tiny patch for examples/Makefile (objcopy related) In-Reply-To: <87d6awmz0c.fsf@deepthought.outer.space.org> References: <20031207200513.42B50C5F5F@atlas.denx.de> <87d6awmz0c.fsf@deepthought.outer.space.org> Message-ID: <20031210163438.GA6906@mvista.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Dec 10, 2003 at 05:13:55PM +0100, Detlev Zundel wrote: > Hi Wolfgang & Cam, > > > Dear Cam, > > > > in message <3FCDEA1B.6010306@mesias.co.uk> you wrote: > >> > >> Here is a short patch for the examples/Makefile. This improves > >> reliability in the case of a deficient toolchain. > >> > >> diff -urN u-boot-1.0.0.orig/examples/Makefile u-boot-1.0.0/examples/Makefile > >> --- u-boot-1.0.0.orig/examples/Makefile 2003-10-14 20:43:56.000000000 +0100 > >> +++ u-boot-1.0.0/examples/Makefile 2003-12-03 11:21:04.000000000 +0000 > >> @@ -104,7 +104,7 @@ > >> $(OBJCOPY) -O srec $(<:.o=) $@ > >> > >> %.bin: %.srec > >> - $(OBJCOPY) -O binary $< $@ 2>/dev/null > >> + $(OBJCOPY) -O binary $(<:.srec=) $@ 2>/dev/null > >> > >> ######################################################################### > > > Thanks, added. > > Are you aware, that you effectively have a misleading rule now? The > rule says how to generate ".bin" from ".srec" files, while in the > command pattern you explicitely use none of the prerequisites but the > hand-derived ELF file. This might potentially mess up make's rule > algorithm. > > As I am on holiday right now, I am too lazy to come up with a cleaner > fix, I just wanted to phrase my concern. This works without the side-effects too: ; P Index: examples/Makefile =================================================================== RCS file: /cvsroot/u-boot/u-boot/examples/Makefile,v retrieving revision 1.14 diff -u -r1.14 Makefile --- examples/Makefile 14 Oct 2003 19:43:56 -0000 1.14 +++ examples/Makefile 3 Dec 2003 15:29:11 -0000 @@ -104,7 +104,7 @@ $(OBJCOPY) -O srec $(<:.o=) $@ %.bin: %.srec - $(OBJCOPY) -O binary $< $@ 2>/dev/null + $(OBJCOPY) -I srec -O binary $< $@ 2>/dev/null ######################################################################### -- Regards, George