5 SUBDIRS = components matita
7 ifeq ($(DISTRIBUTED),yes)
8 # 'world' is the default target when distributed, otherwise 'all' is
9 world: depend $(foreach d,$(SUBDIRS),rec@world@$(d))
10 all: depend $(foreach d,$(SUBDIRS),rec@all@$(d))
11 opt: depend $(foreach d,$(SUBDIRS),rec@opt@$(d))
13 all: $(foreach d,$(SUBDIRS),rec@all@$(d))
14 opt: $(foreach d,$(SUBDIRS),rec@opt@$(d))
15 world: depend $(foreach d,$(SUBDIRS),rec@world@$(d))
19 ifeq ($(HAVE_OCAMLOPT),yes)
20 ifeq ($(DISTRIBUTED),yes)
21 $(MAKE) $(foreach d,$(SUBDIRS),rec@depend.opt@$(d))
23 $(MAKE) $(foreach d,$(SUBDIRS),rec@depend@$(d))
26 $(MAKE) $(foreach d,$(SUBDIRS),rec@depend@$(d))
28 $(H)touch depend-stamp
31 $(H)make $(foreach d,$(SUBDIRS),rec@clean@$(d)) || true
33 $(H)make $(foreach d,$(SUBDIRS),rec@distclean@$(d)) || true
34 $(H)rm -rf .matita library-stamp depend-stamp
35 install-indep: $(foreach d,$(SUBDIRS),rec@install-indep@$(d))
36 install-arch: $(foreach d,$(SUBDIRS),rec@install-arch@$(d))
37 install: install-indep install-arch
38 uninstall: $(foreach d,$(SUBDIRS),rec@uninstall@$(d))
41 $(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*)) DESTDIR=$(shell pwd)/$(DESTDIR)
43 # {{{ Distribution stuff
45 ifeq ($(DISTRIBUTED),yes)
46 library: library-stamp
48 $(MAKE) -C matita/ dist_library
54 DISTDIR = $(BASENAME)-$(MATITA_VERSION)
60 matita/library_auto/ \
66 matita/dist/ChangeLog \
74 matita/matitaGeneratedGui.ml \
77 distcheck: dist dist_extract dist_test
79 dist: dist_mktmpdir dist_pre dist_export dist_mktarball dist_rmtmpdir
80 dist/configure.ac: configure.ac matita/dist/configure.ac.sed
81 sed -f matita/dist/configure.ac.sed < $< > $@
82 dist/configure: dist/configure.ac
85 test -d dist || mkdir dist
87 test -d dist && rm -rf dist/ || true
89 $(MAKE) -C matita dist_pre
90 dist_export: dist/configure
93 svn export components $(DISTDIR)/components
94 svn export matita $(DISTDIR)/matita
95 (cd $(DISTDIR) && find . -name .depend -exec rm \{\} \;)
96 (cd $(DISTDIR) && find . -name .depend.opt -exec rm \{\} \;)
97 (cd $(DISTDIR) && rm -rf $(CLEAN_ON_DIST))
98 cp $< $(DISTDIR)/configure
99 cp -r $(EXTRA_DIST) $(DISTDIR)
100 cp -r $(EXTRA_DIST_matita) $(DISTDIR)/matita
101 # distribute HTML version of the manual
102 mkdir -p $(DISTDIR)/docs/manual/
103 $(MAKE) -C matita/help/C/ install DESTDIR=$(CURDIR)/$(DISTDIR)/docs/manual/
105 tar czf $(DISTDIR).tar.gz $(DISTDIR)
106 #tar cjf $(DISTDIR).tar.bz2 $(DISTDIR)
110 tar xzf $(DISTDIR).tar.gz
115 && $(MAKE) install DESTDIR=`pwd`/install)
117 .PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_test dist_autotools
119 # }}} End of distribution stuff
121 .PHONY: all opt clean distclean
123 # vim: set foldmethod=marker: