]> rtime.felk.cvut.cz Git - orte.git/blob - Makefile.git
Remove dist from OMK makefile
[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_FLAGS = --enable-orte-idl
18
19 configure: git
20
21 check: configure
22         $(MAKE) -f Makefile.git check-windows check-autotools check-java
23
24 check-windows:
25         mkdir -p _check-win
26         $(MAKE) -C _check-win -f ../Makefile.git $@.real
27
28 check-windows.real:
29 # We don't have libIDL for mingw, so we check without --enable-orte-idl
30         ../configure --host=i586-mingw32msvc CC=i586-mingw32msvc-gcc || \
31         ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc
32         $(MAKE)
33         find -name 'liborte*.dll'
34
35 check-autotools:
36         mkdir -p _check-autotools
37         cd _check-autotools && ../configure $(CONFIGURE_FLAGS)
38         cd _check-autotools && $(MAKE)
39
40 check-java: JAVAC=$(shell readlink -f $(which javac))
41 check-java: JAVA_HOME=$(JAVAC:%/bin/javac=%)
42 check-java:
43         mkdir -p _check-java
44         cd _check-java && ../configure --with-java=$(JAVA_HOME)
45         cd _check-java && $(MAKE)
46         false # Java is not compiled - either fix it or update README
47
48 dist:
49         $(MAKE) VER=$(VER) dist-tarball dist-check
50         @echo "Tarball stored as orte-$(VER).tar.gz"
51
52 dist-tarball: orte-$(VER).tar.gz
53
54 orte-$(VER).tar.gz: $(shell git ls-files)
55 # Export clean sources and run autoreconf
56         test ! -d orte-$(VER)
57         git archive --format=tar --prefix=orte-$(VER)/ HEAD | tar x
58         make -C orte-$(VER) -f Makefile.cvs
59         rm -rf orte-$(VER)/autom4te.cache
60 # Export sources again for building of documentation and copy generated orte manual to release dir
61         test ! -d orte-$(VER)-doc
62         git archive --format=tar --prefix=orte-$(VER)-doc/ HEAD | tar x
63         make -C orte-$(VER)-doc/doc
64         cp orte-$(VER)-doc/doc/orteman.pdf orte-$(VER)/doc
65         rm -rf orte-$(VER)-doc
66 # Create tarball
67         tar czf $@ orte-$(VER)
68         rm -rf orte-$(VER)
69         @echo "Tarball stored as orte-$(VER).tar.gz"
70
71 dist-check: orte-$(VER).tar.gz
72         tar xf $<
73 # Check that we can compile the content of the tarball
74         mkdir orte-$(VER)/_build
75         cd orte-$(VER)/_build && ../configure $(CONFIGURE_FLAGS) && make V=0
76         mkdir orte-$(VER)/_win
77         cd orte-$(VER)/_win && ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc $(CONFIGURE_FLAGS) && make V=0
78         rm -rf orte-$(VER)