rosmake vs. make
What is the difference between make and rosmake? Which one is recommended?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
What is the difference between make and rosmake? Which one is recommended?
Running rosmake
is a superset of make
. In particular, rosmake
runs make
on all of a package's dependencies (as defined in manifest.xml
), including recursive dependencies. By contrast, make
just builds the current package.
You should run rosmake
the first time you build a package (say, when you first install it), when you change a package's manifest.xml
(in case you need to recursively build a newly-added dependency), or when a package's dependency needs to be rebuilt.
My workflow goes like this:
rosinstall ~/ros /opt/ros/diamondback
(this gets all of my source packages up-to-date)rosmake foo
(where foo
is the package I'm currently developing; this makes sure the dependencies and everything else are properly dealt with)foo
, just use make
.A note: the packages that are distributed as binaries (the .deb
files) include a ROS_NOBUILD
file that causes rosmake
to skip right over them; this causes them to (appear to) build very fast.
make does finish first because it only compiles the current package that you are working on. It only works if you are in the root directory of that package.
rosmake compiles the package (or stack) named (e.g. rosmake my_package
) or if you are working in a package's root directory and don't name a package, the current package. rosmake also checks and compiles any dependencies if required.
My rule of thumb is to rosmake the first time and anytime I change the manifest or CMakeLists.txt as well as anytime I modify any of a packages dependencies. If I have only made changes to source code in the package itself, I just use make.
It seems that rosmake attempts to compile all the package's dependencies, whereas make only compiles the package, so it's faster.
Asked: 2011-07-16 10:09:35 -0600
Seen: 1,140 times
Last updated: Jul 16 '11
Moving packages to different directory
rosmake --pre-clean without svn update
Getting error message for rospack depends geometry_msgs
rosmake don't create .so file for gazebo plugins
Received 'rospack failed to build' message when executed rosmake
Create a new ROS Android package
Cleaning up when moving a stack/package to a different directory so rosmake won't complain