- add "make test" target

This commit is contained in:
Bryce Denney 2002-10-11 16:08:43 +00:00
parent dd9f00f100
commit ba1e549490
5 changed files with 23 additions and 0 deletions

View File

@ -3,5 +3,8 @@ SUBDIRS = test1-static test2-dynamic test3-twomodules test4-interdep
all:
for i in $(SUBDIRS); do make -C $$i all; done
test:
for i in $(SUBDIRS); do make -C $$i test; done
clean:
for i in $(SUBDIRS); do make -C $$i clean; done

View File

@ -13,6 +13,11 @@ libmodule1.la: module1.lo
%.lo: %.cc
$(LIBTOOL) $(CXX) -c $<
test:
@echo "*** Running test in `pwd`"
-./uselib
@echo "*** Test done in `pwd`"
clean:
-libtool rm libmodule1.la module1.lo uselib.exe uselib
rm -rf .libs

View File

@ -17,6 +17,11 @@ libmodule1.la: module1.lo
%.lo: %.cc %.h
$(LIBTOOL) $(CXX) -c $<
test:
@echo "*** Running test in `pwd`"
-./uselib
@echo "*** Test done in `pwd`"
clean:
-libtool rm libmodule1.la module1.lo
rm -rf *.o uselib.exe bin lib uselib uselib.exe

View File

@ -21,6 +21,11 @@ libmodule2.la: module2.lo
%.lo: %.cc
$(LIBTOOL) $(CXX) -c $<
test:
@echo "*** Running test in `pwd`"
-./uselib
@echo "*** Test done in `pwd`"
clean:
-libtool rm libmodule1.la module1.lo libmodule2.la module2.lo
rm -rf *.o uselib.exe bin lib uselib uselib.exe

View File

@ -21,6 +21,11 @@ libmodule2.la: module2.lo
%.lo: %.cc
$(LIBTOOL) $(CXX) -c $<
test:
@echo "*** Running test in `pwd`"
-./uselib
@echo "*** Test done in `pwd`"
clean:
-libtool rm libmodule1.la module1.lo libmodule2.la module2.lo
rm -rf *.o uselib.exe bin lib uselib uselib.exe