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