#USE_SOURCE_RULES=1
-MCS = mono $(topdir)/mcs/mcs.exe
-MCS_FLAGS = --target library --noconfig
+RUNTIME = mono
+MCS = $(RUNTIME) $(topdir)/mcs/mcs.exe
+MY_MCS_FLAGS = --target library --noconfig $(MCS_FLAGS)
INSTALL = /usr/bin/install
prefix = /usr
SOURCES_CMD=find . \
! \( $(SOURCES_INCLUDE:%=! -path '%' ) \) -a \
- \( $(SOURCES_EXCLUDE:%=! -path '%' ) \) -a \
+ \( $(SOURCES_EXCLUDE:%=! -path '%' ) ! -path '/dev/null' \) -a \
! -path '*/__*.cs'
else
.response: $(LIB_LIST)
- cat $^ |egrep '\.cs$$' >$@
+ cat $^ |egrep '\.cs[[:space:]]*$$' >$@
.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" >>$@
-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
- MONO_PATH=$(MONO_PATH_PREFIX)$(MONO_PATH) $(MCS) $(MCS_FLAGS) -o $(LIBRARY) $(LIB_FLAGS) @.response
+ MONO_PATH=$(MONO_PATH_PREFIX)$(MONO_PATH) $(MCS) $(MY_MCS_FLAGS) -o $(LIBRARY) $(LIB_FLAGS) @.response
install: all
mkdir -p $(prefix)/lib/
$(INSTALL) -m 644 $(LIBRARY) $(prefix)/lib/
+ifdef TEST_DIR
+test:
+ if [ ! -z $(TEST_DIR) -a -d $(TEST_DIR) ]; then $(MAKE) -C $(TEST_DIR) -f makefile.gnu $@; fi
+else
+test:
+endif
+