X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fmatita%2Ftemplate_makefile.in;h=7c5a40b31381736ce69c7cbab4f668ccf30f4be7;hb=447cc9c7504b6f46cf3bd707b7a54ba2784bcc36;hp=d24c75b0ff36858fa85c02248929546a73af01bd;hpb=7b3b0be4e6979c0d4393d0d0c8fc42ac3674b6db;p=helm.git diff --git a/helm/software/matita/template_makefile.in b/helm/software/matita/template_makefile.in index d24c75b0f..7c5a40b31 100644 --- a/helm/software/matita/template_makefile.in +++ b/helm/software/matita/template_makefile.in @@ -1,4 +1,4 @@ -SRC=$(shell find @ROOT@ -name "*.ma" -a -type f) +SRC=$(shell find @ROOT@ -name "*.ma" -a -type f | sed 's?^@ROOT@/??') TODO=$(SRC:%.ma=%.mo) MATITA_FLAGS= @@ -12,17 +12,23 @@ MATITAC=@CC@ MATITACLEAN=@CLEAN@ MATITADEP=@DEP@ -all: $(TODO) +all: $(TODO) clean: $(MATITACLEAN) $(MATITA_FLAGS) $(SRC) rm -f $(TODO) %.moo: - $(MATITAC) $(MATITA_FLAGS) -q -I @ROOT@ $< + if [ -z "$<" ]; then \ + echo "missing dependencies for $@"; \ + else \ + $(MATITAC) $(MATITA_FLAGS) -q -I @ROOT@ $<; \ + fi @DEPFILE@ : $(SRC) - $(MATITADEP) $(MATITA_FLAGS) -I '@ROOT@' $^ 1> @DEPFILE@ + $(MATITADEP) $(MATITA_FLAGS) -I '@ROOT@' -dot @DEPFILE@.dot $^ \ + 1> @DEPFILE@ 2>@DEPFILE@.errors \ + || (echo;cat @DEPFILE@.errors;echo;rm @DEPFILE@;false) # this is the depend for full targets like: # dir/dir/name.moo: dir/dir/name.ma dir/dep.moo