From: Mike Frysinger Date: Mon, 28 Jan 2008 06:38:58 -0500 Subject: [U-Boot-Users] [PATCH] Use `ln -sf` rather than `rm -f && ln -s` In-Reply-To: <1201520254-25593-1-git-send-email-vapier@gentoo.org> References: <1201520254-25593-1-git-send-email-vapier@gentoo.org> Message-ID: <200801280638.59012.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de odd ... git-send-email ate the explanatory text ... --- The -f option to `ln` should give the same behavior as the -f option to the `rm` command. It is better to do this in one shot so as to avoid race conditions when building in parallel. I build on a quad G5 and without this change, it isn't uncommon for the build to fail when using -j8 due to this small window where the files don't actually exist. Signed-off-by: Mike Frysinger --- tools/Makefile | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index af0de47..22d9dae 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -203,19 +203,16 @@ else endif $(obj)environment.c: - @rm -f $(obj)environment.c - ln -s $(src)../common/environment.c $(obj)environment.c + ln -s -f $(src)../common/environment.c $(obj)environment.c $(obj)environment.o: $(obj)environment.c $(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $< $(obj)crc32.c: - @rm -f $(obj)crc32.c - ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c + ln -s -f $(src)../lib_generic/crc32.c $(obj)crc32.c $(obj)sha1.c: - @rm -f $(obj)sha1.c - ln -s $(src)../lib_generic/sha1.c $(obj)sha1.c + ln -s -f $(src)../lib_generic/sha1.c $(obj)sha1.c $(LOGO_H): $(obj)bmp_logo $(LOGO_BMP) $(obj)./bmp_logo $(LOGO_BMP) >$@ -- 1.5.3.8