From: Ian Abbott Date: Thu, 8 Mar 2012 15:11:02 +0000 (+0000) Subject: Update symbolic links to sources during make. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=755dbfe700494e3e34a0f282b399471d12be45cc;p=comedi.git 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 --- 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