2 @echo "Now you can run './configure'"
13 .PHONY: default git all dist dist-tarball
15 VER=$(shell git describe --match='v[0-9]*' | sed -e 's/^v\(.*\)/\1/')
17 CONFIGURE_FLAGS = --enable-orte-idl
22 $(MAKE) check-windows check-autotools check-java
27 $(MAKE) -C _$@ -f ../Makefile.git $@.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
34 make install DESTDIR=$(CURDIR)/_install
35 test -f _install/bin/liborte-*.dll
39 ../configure $(CONFIGURE_FLAGS)
42 check-java.real: JAVAC=$(shell readlink -f $(which javac))
43 check-java.real: JAVA_HOME=$(JAVAC:%/bin/javac=%)
45 ../configure --with-java=$(JAVA_HOME)
47 false # Java is not compiled - either fix it or update README
50 $(MAKE) VER=$(VER) dist-tarball dist-check
51 @echo "Tarball stored as orte-$(VER).tar.gz"
53 dist-tarball: orte-$(VER).tar.gz
55 orte-$(VER).tar.gz: $(shell git ls-files)
56 # Export clean sources and run autoreconf
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
68 tar czf $@ orte-$(VER)
70 @echo "Tarball stored as orte-$(VER).tar.gz"
72 dist-check: orte-$(VER).tar.gz
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