Whamcloud - gitweb
Fix symlinks when building a new tree outside the source tree.
[fs/lustre-release.git] / lustre / obdfilter / Makefile.am
index 403f2ad..f4c98f7 100644 (file)
@@ -8,8 +8,15 @@ MODULE = obdfilter
 modulefs_DATA = obdfilter.o
 EXTRA_PROGRAMS = obdfilter
 
+LINX=simple.c
+simple.c: 
+       test -e simple.c || ln -sf $(top_srcdir)/lib/simple.c
+
 EXT2C = filter.c
-obdfilter_SOURCES = filter.c
+obdfilter_SOURCES = filter.c $(LINX)
+
+dist-hook:
+       list='$(LINX)'; for f in $$list; do rm -f $(distdir)/$$f; done
 
 include $(top_srcdir)/Rules