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 check-android
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 android update project -p orte/libaorte
51 android update project -p orte/contrib/Robot_Demo
52 cd orte/libaorte && ndk-build
53 cd orte/contrib/Robot_Demo && ant debug
54 test -f orte/contrib/Robot_Demo/bin/RoboDruid-debug.apk
57 $(MAKE) VER=$(VER) dist-tarball dist-check
58 @echo "Tarball stored as orte-$(VER).tar.gz"
60 dist-tarball: orte-$(VER).tar.gz
62 orte-$(VER).tar.gz: $(shell git ls-files)
63 # Export clean sources and run autoreconf
65 git archive --format=tar --prefix=orte-$(VER)/ HEAD | tar x
66 make -C orte-$(VER) -f Makefile.cvs
67 rm -rf orte-$(VER)/autom4te.cache
68 # Export sources again for building of documentation and copy generated orte manual to release dir
69 test ! -d orte-$(VER)-doc
70 git archive --format=tar --prefix=orte-$(VER)-doc/ HEAD | tar x
71 make -C orte-$(VER)-doc/doc
72 cp orte-$(VER)-doc/doc/orteman.pdf orte-$(VER)/doc
73 rm -rf orte-$(VER)-doc
75 tar czf $@ orte-$(VER)
77 @echo "Tarball stored as orte-$(VER).tar.gz"
79 dist-check: orte-$(VER).tar.gz
81 # Check that we can compile the content of the tarball
82 mkdir orte-$(VER)/_build
83 cd orte-$(VER)/_build && ../configure $(CONFIGURE_FLAGS) && make V=0
84 mkdir orte-$(VER)/_win
85 cd orte-$(VER)/_win && ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc $(CONFIGURE_FLAGS) && make V=0