Commits

Anonymous committed dcdeb88

Support running tests using 'make check'.

Comments (0)

Files changed (1)

 
 DESTDIR = 
 
-.PHONY: all clean confclean configure distclean install
+.PHONY: all clean confclean configure distclean check install
 .SILENT: confclean configure $(CONFIGIN)
 .SUFFIXES: .o .c
 
 distclean: clean confclean
 	rm -f Makefile mirage-config.h
 
+check: $(PROG) tests/Makefile
+	$(MAKE) -C tests MIRAGE2ISO=../mirage2iso all
+
+tests/Makefile: tests/tests-list tests/tests-gen.awk
+	awk -f tests/tests-gen.awk < $< > $@
+
 install: $(PROG)
 	umask a+rx; mkdir -p "$(DESTDIR)$(BINDIR)"
 	cp $(PROG) "$(DESTDIR)$(BINDIR)/"