LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cleaning the Source Tree (https://www.linuxquestions.org/questions/linux-newbie-8/cleaning-the-source-tree-507645/)

Lucky13 12-05-2006 10:39 AM

Cleaning the Source Tree
 
Hi,

After preparing the source code and installing the source code I am trying configuring and compiling the linux kernel by first cleaning the source tree.

When I type the command "make mrproper" to clean the source tree I get the following message: "make: *** No rule to make target `mrproper'. Stop.".

Can anyone explain to me what I should do for this command to work.

Thank you.

Fadoksi 12-05-2006 01:11 PM

Try "make clean" or "make distclean"
The differences:
Code:

If you type `make clean', then make removes the `.o' files, and the `tar', `rmt', `testpad', `testpad.h', and `core' files.

If you type `make distclean', then make not only removes the same files as does `make clean' but also the `TAGS', `Makefile', and `config.status' files. (Although it is not evident, this makefile (and `config.status') is generated by the user with the configure program


Lucky13 12-05-2006 02:19 PM

I get the same message : "make: *** No rule to make target `clean'. Stop.
"
I am assuming that any "make" command that I type doesn't seem to be accepted.

Is it possible that the package is not installed ?

What can I do to make the "make" command to work ?

Fadoksi 12-05-2006 02:35 PM

Are you sure you are doing the command in the kernel source folder (where you unpacked it)?
The error looks like the tree haven't been compiled, or it is already cleaned.

EDIT: Have you compiled the source already? If not, then you don't have to do cleaning.

Lucky13 12-05-2006 02:59 PM

YOU: Are you sure you are doing the command in the kernel source folder (where you unpacked it)?

ME: I think. This is the path: file:/usr/src/linux-2.6.5-1.358/configs

YOU: The error looks like the tree haven't been compiled, or it is already cleaned.

ME: I'm not sure if it's compliled but I know it is installed.

YOU: EDIT: Have you compiled the source already?

ME: I believe not.

YOU: If not, then you don't have to do cleaning.

ME: The reason why I'm cleaning the source is as an exercise. I want to know how to do it even if it's not necessary because maybe one day I will have to do it again.

ME: The step after cleaning the source code is configuring the Linux Kernel. To do so I have to type "make config" but I get same message "make: *** No rule to make target `config'. Stop."




IMPORTANT: As I'm reading more and more, I now know that every "make" command that I type (i.e. make install) does not work. I strongly think that the problem is from the "make" command. How can I make my make commands work without getting the following message:"make: *** No rule to make target '' Stop."?

Daws 12-05-2006 06:21 PM

You want to be doing "make mrproper" in /usr/src/linux-2.6.5-1.358/ not /usr/src/linux-2.6.5-1.358/configs

Also you dont want to do "make config" unless you want to die. At the very least you want "make menuconfig" or if you have X "make xconfig". Makes things alot easier.

Fadoksi 12-06-2006 09:40 AM

And "make oldconfig" makes it even more easy. It takes your current config. Then you can use menuconfig to tweak it.

lbdgwgt 12-06-2006 01:39 PM

Is there any file with the name Makefile, makefile, or Imakefile in the directory?
make wont work if there is no such file i think.

Lucky13 12-06-2006 04:29 PM

Thanks Daws and others. My question is answered.


All times are GMT -5. The time now is 12:21 PM.