X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=Makefile.in;h=5d29eb838405a32235fa1f4fd946c2b4f8c22269;hp=860c87717b091131da4f7c39562043926ae43d35;hb=122fdb64ba001d728d0d94245753b1d7d31cc98d;hpb=1442cbcfa262a16eac31092c0da2e59805deeaa2 diff --git a/Makefile.in b/Makefile.in index 860c877..5d29eb8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,23 +1,27 @@ CAMLP4FLAGS=@CAMLP4FLAGS@ PPOPTSFLAGS= $($CAMLP4FLAGS:%=ppopt(%)) -OCAMLBUILDFLAGS=-j 0 -use-ocamlfind @OCAMLBUILDFLAGS@ +OCAMLBUILDFLAGS=-j 0 -use-ocamlfind @OCAMLBUILDFLAGS@ OCAMLBUILD=@OCAMLBUILD@ PACKAGE = @PACKAGE_TARNAME@ -TARGETS=tatoo.native +NATIVE=$(PACKAGE).native +BYTE=$(PACKAGE).byte +TARGETS=$(NATIVE) + ifeq ($(BYTE), true) - TARGETS += tatoo.byte + TARGETS += $(BYTE) endif + INLINE=@INLINE@ -TAGS= inline($INLINE) +TAGS= -tag 'inline($(INLINE))' -.PHONY: clean distclean +.PHONY: clean distclean test test_byte test_native do_test all $(TARGETS) -all: $(TARGETS) +all: @ %: - @ $(OCAMLBUILD) $(OCAMLBUILDFLAGS) $(PPOPTFLAGS:%=-tag %) $@ + @ $(OCAMLBUILD) $(OCAMLBUILDFLAGS) $(TAGS) $(PPOPTFLAGS:%=-tag %) $@ clean: @ $(OCAMLBUILD) $(OCAMLBUILDFLAGS) -clean @@ -25,13 +29,20 @@ clean: distclean: clean @ rm -rf configure config.log config.status autom4te.cache Makefile -%.summary: - target=$@ \ - base=$* \ - test=$${base#*.xml.} \ - xml=$${base%.$$test} \ - BIN=$(TEST) \ - SPLIT=tools/split_path.native \ - XMLDIFF=tools/xml_diff.native \ - PACKAGE=$(PACKAGE) \ - . tests/$${test}.sh + +test: + ${MAKE} test_native + ${MAKE} test_byte + +test_native: PROG=$(NATIVE) +test_native: $(NATIVE) do_test + +test_byte: PROG=$(BYTE) +test_byte: $(BYTE) do_test + + +do_test: + for test in tests/test_*.sh ; \ + do \ + $${test} $(PROG) tests ; \ + done