From 755dbfe700494e3e34a0f282b399471d12be45cc Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 8 Mar 2012 15:11:02 +0000 Subject: [PATCH] Update symbolic links to sources during make. When building outside the source directory, recreate any symbolic links to the sources if they are broken or pointing to the wrong files. Signed-off-by: Ian Abbott --- comedi/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comedi/Makefile.am b/comedi/Makefile.am index 7fe641ef..426768da 100644 --- a/comedi/Makefile.am +++ b/comedi/Makefile.am @@ -14,7 +14,7 @@ all-local: for dir in . drivers kcomedilib drivers/addi-data; do \ for file in `ls @abs_srcdir@/$$dir/*\.[ch] @abs_srcdir@/$$dir/Kbuild | $(EGREP) -v \.mod\.c`; do \ LINK_NAME=$$dir/`basename "$$file"`; \ - if test ! -e $$LINK_NAME; then ln -vs $$file $$LINK_NAME; fi; \ + if test ! "$$file" -ef "$$LINK_NAME"; then ln -vsnf "$$file" "$$LINK_NAME"; fi; \ done; \ done; \ fi -- 2.26.2