merging work for #2008

This commit is contained in:
Tully Foote 2009-11-12 00:15:01 +00:00
parent 614797c84e
commit 0d82c61f62
2 changed files with 56 additions and 42 deletions

19
CMakeLists.txt Normal file
View File

@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
set(ROSPACK_MAKEDIST true)
# Append to CPACK_SOURCE_IGNORE_FILES a semicolon-separated list of
# directories (or patterns, but directories should suffice) that should
# be excluded from the distro. This is not the place to put things that
# should be ignored everywhere, like "build" directories; that happens in
# rosbuild/rosbuild.cmake. Here should be listed packages that aren't
# ready for inclusion in a distro.
#
# This list is combined with the list in rosbuild/rosbuild.cmake. Note
# that CMake 2.6 may be required to ensure that the two lists are combined
# properly. CMake 2.4 seems to have unpredictable scoping rules for such
# variables.
#list(APPEND CPACK_SOURCE_IGNORE_FILES /core/experimental)
rosbuild_make_distribution(0.9.1)

View File

@ -1,52 +1,47 @@
all:
minimal: core_tools
rosmake gtest pycrypto paramiko roslaunch rosout rostest
@echo "You have built the minimal set of ROS tools."
@echo "If you want to make all ROS tools type 'rosmake ros'."
@echo "Or you can rosmake any other package in your ROS_PACKAGE_PATH."
# enough for rosmake
core_tools:
@if [ ! $(ROS_ROOT) ]; then echo "Please set ROS_ROOT first"; false; fi
cd tools/rospack && make
@if test -z `which rospack`; then echo "Please add ROS_ROOT/bin to PATH"; false; fi
cd tools/rosdep && make
cd 3rdparty/gtest && make
cd core/genmsg_cpp && make
cd core/roslib && make
cd core/rospy && make
cd 3rdparty/pycrypto && make
cd 3rdparty/paramiko && make
cd 3rdparty/xmlrpcpp && make
cd tools/roslaunch && make
cd test/rostest && make
cd core/rosconsole && make
cd core/roscpp && make
cd core/rosout && make
@echo "\nHOORAY! The ROS tools are now built. Now, you can use 'rosmake' for\nrecursive builds. For example, try\n rosmake roscpp_tutorials\n"
clean:
@if test -z `which rospack`; then echo "It appears that you have already done a 'make clean' because rospack is gone."; false; fi
make -C core/genmsg_cpp clean
make -C core/roslib clean
make -C core/rospy clean
make -C 3rdparty/pycrypto clean
make -C 3rdparty/paramiko clean
make -C 3rdparty/xmlrpcpp clean
make -C core/rosconsole clean
make -C core/roscpp clean
make -C core/rosout clean
make -C 3rdparty/gtest clean
make -C tools/rosdep clean
make -C test/rostest clean
make -C tools/roslaunch clean
rm -f `find . -name *.pyc`
clean-everything:
cd tools/rospack && make
@for i in `rospack list-names` ; do if [ $$i = rospack ] ; then continue; fi; echo "cleaning $$i"; cd `rospack find $$i` && make clean; done
rosmake -r --target=clean ros
cd tools/rospack && make clean
wipe-everything:
cd tools/rospack && make
@for i in `rospack list-names` ; do if [ $$i = rospack ] ; then continue; fi; echo "wiping $$i"; cd `rospack find $$i` && make wipe; done
rm -f rosmakeall-* stderr.txt stdout.txt rosmakeall-profile build-failure test-failure
cd tools/rospack && make clean
## include $(shell rospack find mk)/cmake_stack.mk
### copied below since it can't be found before rospack is built
minimal:
cd tools/rospack && make
cd tools/rosdep && make
cd 3rdparty/gtest && make
rosmake -v genmsg_cpp
# set EXTRA_CMAKE_FLAGS in the including Makefile in order to add tweaks
#CMAKE_FLAGS= -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake $(EXTRA_CMAKE_FLAGS)
CMAKE_FLAGS= -Wdev -DCMAKE_TOOLCHAIN_FILE=../core/rosbuild/rostoolchain.cmake $(EXTRA_CMAKE_FLAGS)
# The all target does the heavy lifting, creating the build directory and
# invoking CMake
all_dist: core_tools
@mkdir -p build
-mkdir -p bin
cd build && cmake $(CMAKE_FLAGS) ..
# The clean target blows everything away
# It also removes auto-generated message/service code directories,
# to handle the case where the original .msg/.srv file has been removed,
# and thus CMake no longer knows about it.
clean_dist:
-cd build && make clean
rm -rf build
# Run the script that does the build, then do a fairly hacky cleanup, #1598
package_source: all_dist
`rospack find rosbuild`/bin/makestackdist $(CURDIR)
find build -mindepth 1 -not -name "*.bz2" | xargs rm -rf
rm -rf bin