LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-05-2006, 10:39 AM   #1
Lucky13
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Rep: Reputation: 0
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.
 
Old 12-05-2006, 01:11 PM   #2
Fadoksi
Member
 
Registered: Apr 2006
Location: Finland
Distribution: Ubuntu, Gentoo, Debian
Posts: 88

Rep: Reputation: 15
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
 
Old 12-05-2006, 02:19 PM   #3
Lucky13
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Original Poster
Rep: Reputation: 0
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 ?

Last edited by Lucky13; 12-05-2006 at 02:22 PM.
 
Old 12-05-2006, 02:35 PM   #4
Fadoksi
Member
 
Registered: Apr 2006
Location: Finland
Distribution: Ubuntu, Gentoo, Debian
Posts: 88

Rep: Reputation: 15
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.

Last edited by Fadoksi; 12-05-2006 at 02:37 PM.
 
Old 12-05-2006, 02:59 PM   #5
Lucky13
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Original Poster
Rep: Reputation: 0
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."?

Last edited by Lucky13; 12-05-2006 at 03:10 PM.
 
Old 12-05-2006, 06:21 PM   #6
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 448

Rep: Reputation: 37
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.
 
Old 12-06-2006, 09:40 AM   #7
Fadoksi
Member
 
Registered: Apr 2006
Location: Finland
Distribution: Ubuntu, Gentoo, Debian
Posts: 88

Rep: Reputation: 15
And "make oldconfig" makes it even more easy. It takes your current config. Then you can use menuconfig to tweak it.
 
Old 12-06-2006, 01:39 PM   #8
lbdgwgt
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 87

Rep: Reputation: 15
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.
 
Old 12-06-2006, 04:29 PM   #9
Lucky13
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks Daws and others. My question is answered.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for source tree location Kaao Linux - Desktop 2 08-23-2006 09:31 AM
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 12:34 AM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM
/usr/source/ missing source tree swingert Linux - Newbie 2 07-19-2003 08:48 PM
Source tree appler Slackware 2 06-20-2003 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration