Whamcloud - gitweb
Fix symlinks when building a new tree outside the source tree.
[fs/lustre-release.git] / lustre / obdfilter / Makefile.am
index fc10f59..f4c98f7 100644 (file)
@@ -3,12 +3,20 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
+DEFS:= 
 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