@echo "Now you can run './configure'"
git:
- autoreconf -i
+ autoreconf -i
all:
- aclocal -I admin
+ aclocal -I admin
autoheader
automake
autoconf
-.PHONY: default cvs all dist dist-tarball
+.PHONY: default git all dist dist-tarball
VER=$(shell git describe --match='v[0-9]*' | sed -e 's/^v\(.*\)/\1/')
+CONFIGURE_FLAGS = --enable-orte-idl
+
+configure: git
+
+check: check-omk check-autotools check-windows check-windows-omk check-java check-android
+
+check-%: configure
+ rm -rf _$@
+ mkdir -p _$@
+ $(MAKE) -C _$@ -f ../Makefile.git $@.real
+
+check-windows.real:
+# We don't have libIDL for mingw, so we check without --enable-orte-idl
+ ../configure --prefix=/ --host=i586-mingw32msvc CC=i586-mingw32msvc-gcc || \
+ ../configure --prefix=/ --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc
+ make
+ make install DESTDIR=$(CURDIR)/_install
+ test -f _install/bin/liborte-*.dll
+
+check-windows-omk.real:
+ echo "TARGET_OS=win32" > config.omk
+ echo "CC=i686-w64-mingw32-gcc" >> config.omk
+ echo "CXX=i686-w64-mingw32-g++" >> config.omk
+ echo "AR=i686-w64-mingw32-ar" >> config.omk
+ echo "LD=i686-w64-mingw32-ld" >> config.omk
+ echo "TARGET_LOADLIBES=pthread" >> config.omk
+ ln -s ../orte ../Makefile ../Makefile.omk ../Makefile.rules .
+ make
+
+check-omk.real:
+ ln -s ../orte ../Makefile ../Makefile.omk ../Makefile.rules .
+ make
+
+check-autotools.real:
+ ../configure $(CONFIGURE_FLAGS)
+ make
+
+check-java.real: JAVAC=$(shell readlink -f $(shell which javac))
+check-java.real: JAVA_HOME=$(JAVAC:%/bin/javac=%)
+check-java.real:
+ test -d "$(JAVA_HOME)"
+ ../configure --with-java=$(JAVA_HOME)
+ $(MAKE)
+ ant -f ../orte/java/build.xml
+ test -f ../orte/java/lib/orte.jar
+
+check-android:
+ android update project -p orte/libaorte
+ android update project -p orte/contrib/Robot_Demo
+ cd orte/libaorte && ndk-build
+ cd orte/contrib/Robot_Demo && ant debug
+ test -f orte/contrib/Robot_Demo/bin/RoboDruid-debug.apk
+
dist:
- $(MAKE) VER=$(VER) dist-tarball dist-check
+ $(MAKE) -f Makefile.git VER=$(VER) dist-tarball dist-check
@echo "Tarball stored as orte-$(VER).tar.gz"
dist-tarball: orte-$(VER).tar.gz
# Export clean sources and run autoreconf
test ! -d orte-$(VER)
git archive --format=tar --prefix=orte-$(VER)/ HEAD | tar x
- make -C orte-$(VER) -f Makefile.cvs
+ make -C orte-$(VER) -f Makefile.git
rm -rf orte-$(VER)/autom4te.cache
# Export sources again for building of documentation and copy generated orte manual to release dir
test ! -d orte-$(VER)-doc
tar xf $<
# Check that we can compile the content of the tarball
mkdir orte-$(VER)/_build
- cd orte-$(VER)/_build && ../configure && make V=0
+ cd orte-$(VER)/_build && ../configure $(CONFIGURE_FLAGS) && make V=0
mkdir orte-$(VER)/_win
cd orte-$(VER)/_win && ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc && make V=0
rm -rf orte-$(VER)