]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/template_makefile.in
test branch
[helm.git] / helm / matita / template_makefile.in
diff --git a/helm/matita/template_makefile.in b/helm/matita/template_makefile.in
new file mode 100644 (file)
index 0000000..8cbef1f
--- /dev/null
@@ -0,0 +1,28 @@
+SRC=$(shell find @ROOT@ -name "*.ma" -a -type f)
+TODO=$(SRC:%.ma=%.mo)
+
+MATITA_FLAGS=-noprofile
+NODB=false
+ifeq ($(NODB),true)
+       MATITA_FLAGS += -nodb
+endif
+
+MATITAC=@CC@
+MATITACLEAN=@CLEAN@
+MATITADEP=@DEP@
+
+all: $(TODO)
+
+clean:
+       $(MATITACLEAN) $(MATITA_FLAGS) $(SRC) 
+       rm -f $(TODO)
+
+%.moo:
+       ($(MATITAC) $(MATITA_FLAGS) -q -I @ROOT@ $< | (grep -v "^make" || true))
+
+@DEPFILE@ : $(SRC)
+       $(MATITADEP) $(MATITA_FLAGS) -I '@ROOT@' $^ 1> @DEPFILE@ 
+
+# this is the depend for full targets like:
+# dir/dir/name.moo: dir/dir/name.ma dir/dep.moo
+-include @DEPFILE@