Whamcloud - gitweb
Fix symlinks when building a new tree outside the source tree.
[fs/lustre-release.git] / lustre / mds / Makefile.am
index 5f676fc..2885bf4 100644 (file)
@@ -11,9 +11,10 @@ EXTRA_PROGRAMS = mds
 
 LINX=mds_updates.c simple.c
 mds_updates.c: 
 
 LINX=mds_updates.c simple.c
 mds_updates.c: 
-       ln -s ../lib/mds_updates.c .
+       test -e mds_updates.c || ln -sf $(top_srcdir)/lib/mds_updates.c
+
 simple.c: 
 simple.c: 
-       ln -s ../lib/simple.c .
+       test -e simple.c || ln -sf $(top_srcdir)/lib/simple.c
 
 mds_SOURCES = handler.c mds_reint.c mds_ext2.c mds_ext3.c $(LINX)
 
 
 mds_SOURCES = handler.c mds_reint.c mds_ext2.c mds_ext3.c $(LINX)