]> rtime.felk.cvut.cz Git - orte.git/blob - Makefile.git
JORTE: add missing constants from "typedefs_api.h"
[orte.git] / Makefile.git
1 default: git
2         @echo "Now you can run './configure'"
3
4 git:
5         autoreconf -i
6
7 all:
8         aclocal -I admin
9         autoheader
10         automake
11         autoconf
12
13 .PHONY: default git all dist dist-tarball
14
15 VER=$(shell git describe --match='v[0-9]*' | sed -e 's/^v\(.*\)/\1/')
16
17 configure: git
18
19 check: configure
20         $(MAKE) -f Makefile.git check-windows check-autotools check-java
21
22 check-windows:
23         mkdir -p _check-win
24         cd _check-win && ../configure --host=i586-mingw32msvc CC=i586-mingw32msvc-gcc || \
25                          ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc
26         cd _check-win && $(MAKE)
27
28 check-autotools:
29         mkdir -p _check-autotools
30         cd _check-autotools && ../configure
31         cd _check-autotools && $(MAKE)
32
33 check-java: JAVAC=$(shell readlink -f $(which javac))
34 check-java: JAVA_HOME=$(JAVAC:%/bin/javac=%)
35 check-java:
36         mkdir -p _check-java
37         cd _check-java && ../configure --with-java=$(JAVA_HOME)
38         cd _check-java && $(MAKE)
39         false # Java is not compiled - either fix it or update README
40
41 dist:
42         $(MAKE) VER=$(VER) dist-tarball dist-check
43         @echo "Tarball stored as orte-$(VER).tar.gz"
44
45 dist-tarball: orte-$(VER).tar.gz
46
47 orte-$(VER).tar.gz: $(shell git ls-files)
48 # Export clean sources and run autoreconf
49         test ! -d orte-$(VER)
50         git archive --format=tar --prefix=orte-$(VER)/ HEAD | tar x
51         make -C orte-$(VER) -f Makefile.cvs
52         rm -rf orte-$(VER)/autom4te.cache
53 # Export sources again for building of documentation and copy generated orte manual to release dir
54         test ! -d orte-$(VER)-doc
55         git archive --format=tar --prefix=orte-$(VER)-doc/ HEAD | tar x
56         make -C orte-$(VER)-doc/doc
57         cp orte-$(VER)-doc/doc/orteman.pdf orte-$(VER)/doc
58         rm -rf orte-$(VER)-doc
59 # Create tarball
60         tar czf $@ orte-$(VER)
61         rm -rf orte-$(VER)
62         @echo "Tarball stored as orte-$(VER).tar.gz"
63
64 dist-check: orte-$(VER).tar.gz
65         tar xf $<
66 # Check that we can compile the content of the tarball
67         mkdir orte-$(VER)/_build
68         cd orte-$(VER)/_build && ../configure && make V=0
69         mkdir orte-$(VER)/_win
70         cd orte-$(VER)/_win && ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc && make V=0
71         rm -rf orte-$(VER)