ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Is there a rosmake clean?

asked 2011-03-22 01:25:13 -0600

baxelrod gravatar image

updated 2011-03-22 05:09:33 -0600

I know about rosmake --pre-clean. But what if you just want to clean your package and not build it? There doesn't seem to be a "don't build" flag in rosmake.

When I have a new package that I want to add to my svn repository, I develop it until it is working, then remove the bin, build, and other computer generated files, then do an svn add on the package. I typically remove all these directories by hand...

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted

answered 2011-03-22 02:43:16 -0600

arebgun gravatar image

updated 2011-03-22 03:20:04 -0600

You can just do roscd your_package_name && make clean to clean out all the generated files from just that package. I typically use rosmake only when building new package the first time to make sure all dependencies are built or when dependencies change. After the initial rosmake, plain make command is much faster and only builds the package I am currently developing.

edit flag offensive delete link more


Thanks for the tip. It still would be nice to have this functionality built into rosmake. That would allow you to clean a whole stack or all dependent packages, etc. And you wouldn't have to be inside that package dir either.
baxelrod gravatar image baxelrod  ( 2011-03-22 07:35:52 -0600 )edit

answered 2011-03-24 05:25:48 -0600

baxelrod gravatar image

I've just been informed that the --target option of rosmake will do what I want. For example:

rosmake --target=clean

Thanks tfoote!

edit flag offensive delete link more

answered 2011-03-22 05:53:33 -0600

Julius gravatar image

updated 2011-03-22 06:10:32 -0600

I think both rosmake --pre-clean <your-pkg> and make clean are sufficient for cleaning up. Note that make clean (using diamondback) won't delete your bin folder, at least that's what I am observing on my installation. You can prevent subversion from adding target directories by creating a .svnignore file and then setting the 'svn:ignore' property, check

edit flag offensive delete link more


I think you meant rosmake --pre-clean, rosclean command is used to check the size and cleanup ROS log directories.
arebgun gravatar image arebgun  ( 2011-03-22 06:05:40 -0600 )edit
You're correct, I allowed myself to correct it.
Julius gravatar image Julius  ( 2011-03-22 06:10:09 -0600 )edit

answered 2011-03-22 07:26:50 -0600

makokal gravatar image

updated 2011-03-22 07:27:25 -0600

There is also a rosmake -u option which removes the ROS_NOBUILD option from your packages.

edit flag offensive delete link more

answered 2011-03-22 02:50:41 -0600

Ugo gravatar image

You could also run "rosmake --pre-clean your_package_name" to clean and then make your package and the packages on which it depends.

edit flag offensive delete link more

Question Tools


Asked: 2011-03-22 01:25:13 -0600

Seen: 7,240 times

Last updated: Mar 24 '11