SRC=$(wildcard *.ma) MATITAC=../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac ../matitaclean /dev/null MATITACOPT=../scripts/do_tests.sh $(DO_TESTS_OPTS) ../matitac.opt ../matitaclean.opt /dev/null VERBOSEMATITAC=../matitac VERBOSEMATITACOPT=../matitac.opt MATITACLEAN=../matitaclean MATITACLEANOPT=../matitaclean.opt MATITADEP=../matitadep MATITADEPOPT=../matitadep.opt DEPEND_NAME=.depend H=@ all: $(SRC:%.ma=%.moo) opt: $(H)make MATITAC="$(MATITACOPT)" MATITACLEAN="$(MATITACLEANOPT)" MATITADEP="$(MATITADEPOPT)" all verbose: $(H)make MATITAC="$(VERBOSEMATITAC)" MATITACLEAN="$(MATITACLEAN)" MATITADEP="$(MATITADEP)" all %.opt: $(H)make MATITAC="$(MATITACOPT)" MATITACLEAN="$(MATITACLEANOPT)" MATITADEP="$(MATITADEPOPT)" $(@:%.opt=%) clean: $(H)$(MATITACLEAN) $(SRC) cleanall: $(H)rm -f $(SRC:%.ma=%.moo) $(MATITACLEAN) all depend: rm -f $(DEPEND_NAME) make $(DEPEND_NAME) .PHONY: depend %.moo:%.ma $(H)$(MATITAC) $< $(DEPEND_NAME): $(SRC) $(H)$(MATITADEP) $(SRC) > $@ || rm -f $@ include $(DEPEND_NAME)