]> matita.cs.unibo.it Git - helm.git/blobdiff - Makefile
moved toplevel makefile to sfotware/
[helm.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..30ca291
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,63 @@
+
+include Makefile.defs
+
+SUBDIRS = libs matita
+
+all: $(foreach d,$(SUBDIRS),all.$(d))
+opt: $(foreach d,$(SUBDIRS),opt.$(d))
+clean: $(foreach d,$(SUBDIRS),clean.$(d))
+distclean: $(foreach d,$(SUBDIRS),distclean.$(d))
+
+all.%:
+       $(MAKE) -C $* all
+opt.%:
+       $(MAKE) -C $* opt
+clean.%:
+       $(MAKE) -C $* clean
+distclean.%:
+       $(MAKE) -C $* distclean
+install.%:
+       $(MAKE) -C $* install
+uninstall.%:
+       $(MAKE) -C $* uninstall
+
+BASENAME = matita
+NULL =
+DISTDIR = $(BASENAME)-$(MATITA_VERSION)
+CLEAN_ON_DIST =                \
+       ocaml/license           \
+       $(NULL)
+EXTRA_DIST =                   \
+       dist/AUTHORS            \
+       dist/COPYING            \
+       dist/INSTALL            \
+       dist/README             \
+       dist/ChangeLog          \
+       Makefile                \
+       Makefile.defs.in        \
+       ./configure             \
+       $(NULL)
+
+dist: dist_autotools dist_export dist_mktarball
+distcheck: dist dist_extract dist_build
+
+dist_autotools:
+       autoconf
+       ./configure
+
+dist_export:
+       rm -rf $(DISTDIR)
+       mkdir $(DISTDIR)
+       svn export ocaml $(DISTDIR)/ocaml
+       svn export matita $(DISTDIR)/matita
+       (cd $(DISTDIR) && rm -f $(CLEAN_ON_DIST))
+       ln -fs matita.conf.xml.user $(DISTDIR)/matita/matita.conf.xml
+       mv $(DISTDIR)/ocaml $(DISTDIR)/libs
+       cp -r $(EXTRA_DIST) $(DISTDIR)
+
+dist_mktarball:
+       tar czf $(DISTDIR).tar.gz $(DISTDIR)
+
+.PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_build dist_autotools
+.PHONY: all opt clean distclean
+