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