X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=Makefile;h=a4c4f179c3f3b55ede0fc13040dca54220a978ac;hb=0579a7526917df6d4e1dde40c3811acce77ab52c;hp=5b069ddf86ccedc87c48d069a7a9a5e16d870024;hpb=5cb95a2e44f979183a8c3e39baa3b4e7cfaf8182;p=helm.git diff --git a/Makefile b/Makefile index 5b069ddf8..a4c4f179c 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,44 @@ +H=@ include Makefile.defs SUBDIRS = components matita +ifeq ($(DISTRIBUTED),yes) +# 'world' is the default target when distributed, otherwise 'all' is +world: depend $(foreach d,$(SUBDIRS),rec@world@$(d)) +all: depend $(foreach d,$(SUBDIRS),rec@all@$(d)) +opt: depend $(foreach d,$(SUBDIRS),rec@opt@$(d)) +else all: $(foreach d,$(SUBDIRS),rec@all@$(d)) opt: $(foreach d,$(SUBDIRS),rec@opt@$(d)) -world: $(foreach d,$(SUBDIRS),rec@world@$(d)) -clean: $(foreach d,$(SUBDIRS),rec@clean@$(d)) -distclean: $(foreach d,$(SUBDIRS),rec@distclean@$(d)) - rm -rf .matita library-stamp -install: $(foreach d,$(SUBDIRS),rec@install@$(d)) +world: depend $(foreach d,$(SUBDIRS),rec@world@$(d)) +endif +depend: depend-stamp +depend-stamp: +ifeq ($(HAVE_OCAMLOPT),yes) + ifeq ($(DISTRIBUTED),yes) + $(MAKE) $(foreach d,$(SUBDIRS),rec@depend.opt@$(d)) + else + $(MAKE) $(foreach d,$(SUBDIRS),rec@depend@$(d)) + endif +else + $(MAKE) $(foreach d,$(SUBDIRS),rec@depend@$(d)) +endif + $(H)touch depend-stamp + +clean: + $(H)make $(foreach d,$(SUBDIRS),rec@clean@$(d)) || true +distclean: + $(H)make $(foreach d,$(SUBDIRS),rec@distclean@$(d)) || true + $(H)rm -rf .matita library-stamp depend-stamp +install-indep: $(foreach d,$(SUBDIRS),rec@install-indep@$(d)) +install-arch: $(foreach d,$(SUBDIRS),rec@install-arch@$(d)) +install: install-indep install-arch uninstall: $(foreach d,$(SUBDIRS),rec@uninstall@$(d)) rec@%: - $(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*)) + $(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*)) DESTDIR=$(shell pwd)/$(DESTDIR) # {{{ Distribution stuff @@ -29,21 +54,31 @@ NULL = DISTDIR = $(BASENAME)-$(MATITA_VERSION) CLEAN_ON_DIST = \ components/license \ + matita/TPTP/ \ + matita/dama/ \ + matita/dama_didactic/ \ + matita/contribs/ \ + matita/library_auto/ \ + matita/library/assempbly/ \ $(NULL) EXTRA_DIST = \ matita/AUTHORS \ matita/LICENSE \ + matita/dist/BUGS \ + matita/dist/ChangeLog \ matita/dist/COPYING \ matita/dist/INSTALL \ matita/dist/README \ - matita/dist/ChangeLog \ Makefile \ Makefile.defs.in \ $(NULL) +EXTRA_DIST_matita = \ + matita/matitaGeneratedGui.ml \ + $(NULL) distcheck: dist dist_extract dist_test -dist: dist_mktmpdir dist_export dist_mktarball dist_rmtmpdir +dist: dist_mktmpdir dist_pre dist_export dist_mktarball dist_rmtmpdir dist/configure.ac: configure.ac matita/dist/configure.ac.sed sed -f matita/dist/configure.ac.sed < $< > $@ dist/configure: dist/configure.ac @@ -52,16 +87,25 @@ dist_mktmpdir: test -d dist || mkdir dist dist_rmtmpdir: test -d dist && rm -rf dist/ || true +dist_pre: + $(MAKE) -C matita dist_pre dist_export: dist/configure rm -rf $(DISTDIR) mkdir $(DISTDIR) svn export components $(DISTDIR)/components svn export matita $(DISTDIR)/matita - (cd $(DISTDIR) && rm -f $(CLEAN_ON_DIST)) + (cd $(DISTDIR) && find . -name .depend -exec rm \{\} \;) + (cd $(DISTDIR) && find . -name .depend.opt -exec rm \{\} \;) + (cd $(DISTDIR) && rm -rf $(CLEAN_ON_DIST)) cp $< $(DISTDIR)/configure cp -r $(EXTRA_DIST) $(DISTDIR) + cp -r $(EXTRA_DIST_matita) $(DISTDIR)/matita + # distribute HTML version of the manual + mkdir -p $(DISTDIR)/docs/manual/ + $(MAKE) -C matita/help/C/ install DESTDIR=$(CURDIR)/$(DISTDIR)/docs/manual/ dist_mktarball: tar czf $(DISTDIR).tar.gz $(DISTDIR) + #tar cjf $(DISTDIR).tar.bz2 $(DISTDIR) rm -rf $(DISTDIR) dist_extract: