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.opt: $(H)make MATITAC="$(VERBOSEMATITAC)" MATITACLEAN="$(MATITACLEANOPT)" MATITADEP="$(MATITADEPOPT)" all verboseopt: $(H)make MATITAC="$(VERBOSEMATITACOPT)" MATITACLEAN="$(MATITACLEANOPT)" MATITADEP="$(MATITADEPOPT)" 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 $(DEPEND_NAME) make $(DEPEND_NAME) .PHONY: depend %.moo:%.ma $(H)[ ! -e $@ ] || $(MATITACLEAN) $< $(H)$(MATITAC) $< || $(MATITACLEAN) $< $(DEPEND_NAME): $(SRC) $(H)$(MATITADEP) $(SRC) > $@ include $(DEPEND_NAME)