SRC=$(shell find @ROOT@ -name "*.ma" -a -type f) TODO=$(SRC:%.ma=%.moo) MATITAC=@CC@ MATITACLEAN=@CLEAN@ MATITADEP=@DEP@ all: $(TODO) clean: $(MATITACLEAN) $(SRC) rm -f $(TODO) %.moo:%.ma [ ! -e $@ ] || ($(MATITACLEAN) $< 1>/dev/null 2>/dev/null ; rm -f $@) ($(MATITAC) -q -I @ROOT@ $< | (grep -v "^make" || true)) || \ ($(MATITACLEAN) $< ; exit 1) @DEPFILE@ @DEPFILESHORT@: $(SRC) @DEP@ -I @ROOT@ $^ > @DEPFILE@ >@DEPFILESHORT@ for X in `cat @DEPFILE@ | cut -f 1 -d :`; do\ TMP=`basename $$X | sed s/\.moo$$//`;\ echo "$$TMP: $$X" >> @DEPFILESHORT@;\ done # this is the depend for full targets like: # dir/dir/name.moo: dir/dir/name.ma dir/dep.moo -include @DEPFILE@ # this is for short name targets like: # name: dir/dir/name.moo -include @DEPFILESHORT@