Results 1 to 7 of 7
Hello guys,
I am new to linux. I am trying to reinstall a linux program, I used "make clean". But when I tried this command "make clean all", it was ...
- 02-24-2011 #1Just Joined!
- Join Date
- Feb 2011
- Location
- Canada
- Posts
- 10
[SOLVED] make clean vs. make clean al. Any difference?
Hello guys,
I am new to linux. I am trying to reinstall a linux program, I used "make clean". But when I tried this command "make clean all", it was also excuting but with different output though. Could anyone please explain the difference between these two commands? So I can sure of a way out when I reinstall my files.
Maybe obvious to everyone else, please excuse my dumbness.
Thank you
- 02-24-2011 #2
In the top level directory of your source code there is
a file called makefile. It will define what is done
when you issue those commands. There is no standard
definition. It is what the programmer decided to do.
Normally "make clean" deletes any files generated
by previous attempts, leaving you with clean source code.
I haven't heard of "make clean all".
- 02-24-2011 #3Just Joined!
- Join Date
- Feb 2011
- Location
- Canada
- Posts
- 10
Thanks, that helps~ Too many questions were confusing me. Now it feels a little better to me.
But still a question here.
I checked the makefile and some other makefiles in other programs as well. Some of them defined "make cleanall" and I didnt see any "make clean all" defined there. However, "make clean all" can be excuted. I checked the output in the terminal. It looked like the output for "make". So I am guessing maybe when I typed "make clean all", the "clean all" was ignored by the make command.
Any idea about this is much appreciated.
- 02-26-2011 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
make [target]*
Basically, the targets you specify to make are built in order found on the command line. The 'clean' target usually is to clean up any artifacts that have been generated as a result of other make targets. Ie, it will generally delete objects, temporary libraries and other files that the build generates. The 'all' target generally is to build everything except 'install'. So, the command "make clean" will usually clean up the build tree, "make all" will build everything that hasn't already been built, and "make clean all" will remove all temporary artifacts so that the 'all' target will rebuild everything. So, executing "make clean" and then "make all" is effectively the same as executing "make clean all". Clearer?
Finally, you will usually execute "make install" to install the application in the system, though generally you would do it as "sudo make install" so it will be installed as the root user (system administrator), otherwise you are likely to get permissions errors. This assumes of course that you have sudoer permissions.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-27-2011 #5Just Joined!
- Join Date
- Feb 2011
- Location
- Canada
- Posts
- 10
- 02-27-2011 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
You wouldn't be here if you didn't want to mess with your mind...
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-27-2011 #7Just Joined!
- Join Date
- Feb 2011
- Location
- Canada
- Posts
- 10



