]> matita.cs.unibo.it Git - helm.git/blob - Makefile
on the fly generation of distribution configure.ac
[helm.git] / Makefile
1
2 include Makefile.defs
3
4 SUBDIRS = components matita
5
6 all: $(foreach d,$(SUBDIRS),all.$(d))
7 opt: $(foreach d,$(SUBDIRS),opt.$(d))
8 clean: $(foreach d,$(SUBDIRS),clean.$(d))
9 distclean: $(foreach d,$(SUBDIRS),distclean.$(d))
10
11 all.%:
12         $(MAKE) -C $* all
13 opt.%:
14         $(MAKE) -C $* opt
15 clean.%:
16         $(MAKE) -C $* clean
17 distclean.%:
18         $(MAKE) -C $* distclean
19 install.%:
20         $(MAKE) -C $* install
21 uninstall.%:
22         $(MAKE) -C $* uninstall
23
24 BASENAME = matita
25 NULL =
26 DISTDIR = $(BASENAME)-$(MATITA_VERSION)
27 CLEAN_ON_DIST =                 \
28         components/license      \
29         $(NULL)
30 EXTRA_DIST =                    \
31         matita/dist/AUTHORS     \
32         matita/dist/COPYING     \
33         matita/dist/INSTALL     \
34         matita/dist/README      \
35         matita/dist/ChangeLog   \
36         Makefile                \
37         Makefile.defs.in        \
38         $(NULL)
39
40 dist: dist_mktmpdir dist_export dist_mktarball dist_rmtmpdir
41 distcheck: dist dist_extract dist_build
42
43 dist/configure.ac: configure.ac matita/dist/configure.ac.sed
44         sed -f matita/dist/configure.ac.sed < $< > $@
45 dist/configure: dist/configure.ac
46         cd dist && autoconf
47 dist_mktmpdir:
48         test -d dist || mkdir dist
49 dist_rmtmpdir:
50         test -d dist && rm -rf dist/ || true
51 dist_export: dist/configure
52         rm -rf $(DISTDIR)
53         mkdir $(DISTDIR)
54         svn export components $(DISTDIR)/components
55         svn export matita $(DISTDIR)/matita
56         (cd $(DISTDIR) && rm -f $(CLEAN_ON_DIST))
57         ln -fs matita.conf.xml.user $(DISTDIR)/matita/matita.conf.xml
58         cp $< $(DISTDIR)/configure
59         cp -r $(EXTRA_DIST) $(DISTDIR)
60
61 dist_mktarball:
62         tar czf $(DISTDIR).tar.gz $(DISTDIR)
63
64 .PHONY: dist dist_export dist_mktarball distcheck dist_extract dist_build dist_autotools
65 .PHONY: all opt clean distclean
66