[U-Boot-Users] [PATCH] Use `ln -sf` rather than `rm -f && ln -s`
Mike Frysinger
vapier at gentoo.org
Mon Jan 28 12:38:58 CET 2008
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 <vapier at gentoo.org>
---
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
More information about the U-Boot
mailing list