Rebuild tests when library changes.
[whenjobs.git] / tests / parsing / Makefile.am
index 021a365..04681cb 100644 (file)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-tests = t010_load.cmo t020_simple.cmo t030_jobnames.cmo
+EXTRA_DIST = $(SOURCES) test_load.ml
+
+SOURCES = \
+       t010_load.ml \
+       t020_simple.ml \
+       t030_jobnames.ml \
+       t040_ocaml_jobnames.ml \
+       t050_cleanups.ml
+
+tests = $(SOURCES:.ml=.cmo)
 
 check_SCRIPTS = test_load $(tests)
 
@@ -35,7 +44,7 @@ test_load: test_load.cmo ../../lib/whenlib.cma
 # Rules for all OCaml files.
 %.cmi: %.mli
        $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(PP) -c $< -o $@
-%.cmo: %.ml
+%.cmo: %.ml ../../lib/whenlib.cma
        $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(PP) -c $< -o $@
 #%.cmx: %.ml
 #      $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(PP) -c $< -o $@