2002-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / library.make
index f1b4af4e6efcb71cfab7b5dd33874aa2f8700fff..ee4d743138c552199433d59b1b6d60aaa457f3b8 100644 (file)
@@ -1,5 +1,6 @@
 #USE_SOURCE_RULES=1
-MCS = mono $(topdir)/mcs/mcs.exe
+RUNTIME = mono
+MCS = $(RUNTIME) $(topdir)/mcs/mcs.exe
 MCS_FLAGS = --target library --noconfig
 INSTALL = /usr/bin/install
 prefix = /usr
@@ -7,7 +8,7 @@ prefix = /usr
 
 SOURCES_CMD=find . \
        ! \( $(SOURCES_INCLUDE:%=! -path '%' ) \) -a    \
-         \( $(SOURCES_EXCLUDE:%=! -path '%' ) \) -a    \
+         \( $(SOURCES_EXCLUDE:%=! -path '%' ) ! -path '/dev/null' \) -a        \
          ! -path '*/__*.cs'
 
 
@@ -30,7 +31,7 @@ else
        cat $^ |egrep '\.cs$$' >$@
 
 .makefrag: $(LIB_LIST) $(topdir)/class/library.make
-       echo -n "library-deps.stamp: " >$@.new
+       echo -n "library-deps.stamp: $(LIB_LIST) " >$@.new
        cat $< |egrep '\.cs$$' | sed -e 's,\.cs,.cs \\,' >>$@.new
        cat $@.new |sed -e '$$s, \\$$,,' >$@
        echo -e "\ttouch library-deps.stamp" >>$@
@@ -41,7 +42,7 @@ endif
 -include .makefrag
 
 ifdef USE_SOURCE_RULES
-$(LIBRARY): $(SOURCES) $(topdir)/class/library.make
+$(LIBRARY): makefile.gnu $(SOURCES) $(topdir)/class/library.make
 else
 $(LIBRARY): .response library-deps.stamp
 endif
@@ -51,3 +52,10 @@ install: all
        mkdir -p $(prefix)/lib/
        $(INSTALL) -m 644 $(LIBRARY) $(prefix)/lib/
 
+ifdef TEST_DIR
+test:
+       $(MAKE) -C $(TEST_DIR) -f makefile.gnu $@
+else
+test:
+endif
+