X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2FMakefile;h=c3ce697ffe8f55b1e9277dbb085d24e22f8c5fd3;hb=780561e45e8de50dd0063a0e369458ba67479872;hp=6daf814f63ac27f596e10b291345193382e8bbf6;hpb=c1850635a5915a9e45e469e5cb433f3cd20e454a;p=helm.git diff --git a/helm/software/Makefile b/helm/software/Makefile index 6daf814f6..c3ce697ff 100644 --- a/helm/software/Makefile +++ b/helm/software/Makefile @@ -1,25 +1,47 @@ +H=@ include Makefile.defs SUBDIRS = components 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 +ifeq ($(DISTRIBUTED),yes) +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)) +endif +world: depend $(foreach d,$(SUBDIRS),rec@world@$(d)) +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: $(foreach d,$(SUBDIRS),rec@clean@$(d)) +distclean: $(foreach d,$(SUBDIRS),rec@distclean@$(d)) + $(H)rm -rf .matita library-stamp depend-stamp +install: $(foreach d,$(SUBDIRS),rec@install@$(d)) +uninstall: $(foreach d,$(SUBDIRS),rec@uninstall@$(d)) + +rec@%: + $(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*)) + +# {{{ Distribution stuff + +ifeq ($(DISTRIBUTED),yes) +library: library-stamp +library-stamp: + $(MAKE) -C matita/ dist_library + touch $@ +endif BASENAME = matita NULL = @@ -28,35 +50,52 @@ CLEAN_ON_DIST = \ components/license \ $(NULL) EXTRA_DIST = \ - dist/AUTHORS \ - dist/COPYING \ - dist/INSTALL \ - dist/README \ - dist/ChangeLog \ + matita/AUTHORS \ + matita/LICENSE \ + matita/dist/COPYING \ + matita/dist/INSTALL \ + matita/dist/README \ + matita/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 +distcheck: dist dist_extract dist_test -dist_export: +dist: dist_mktmpdir 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 + cd dist && autoconf +dist_mktmpdir: + test -d dist || mkdir dist +dist_rmtmpdir: + test -d dist && rm -rf dist/ || true +dist_export: dist/configure rm -rf $(DISTDIR) mkdir $(DISTDIR) svn export components $(DISTDIR)/components svn export matita $(DISTDIR)/matita + (cd $(DISTDIR) && find . -name .depend -exec rm \{\} \;) (cd $(DISTDIR) && rm -f $(CLEAN_ON_DIST)) - ln -fs matita.conf.xml.user $(DISTDIR)/matita/matita.conf.xml + cp $< $(DISTDIR)/configure cp -r $(EXTRA_DIST) $(DISTDIR) - dist_mktarball: tar czf $(DISTDIR).tar.gz $(DISTDIR) + rm -rf $(DISTDIR) + +dist_extract: + tar xzf $(DISTDIR).tar.gz +dist_test: + (cd $(DISTDIR)/ \ + && ./configure \ + && $(MAKE) world \ + && $(MAKE) install DESTDIR=`pwd`/install) + +.PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_test dist_autotools + +# }}} End of distribution stuff -.PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_build dist_autotools .PHONY: all opt clean distclean +# vim: set foldmethod=marker: