Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 23rd May 2009, 10:00 PM
shri19 Offline
Registered User
 
Join Date: Feb 2008
Posts: 41
Error: "make: *** No rule to make target `folder'. Stop. "

hello all,

i am a fedora10 user and i am getting this no rule to make target error while compiling a simple hello world program.

here is the output when i try to compile the program.

Quote:
[root@localhost untitled folder]# make -C /lib/modules/2.6.27.21-170.2.56.fc10.i686/build/ M=`pwd` modules
make: Entering directory `/usr/src/kernels/2.6.27.21-170.2.56.fc10.i686'
make: *** No rule to make target `folder'. Stop.
make: Leaving directory `/usr/src/kernels/2.6.27.21-170.2.56.fc10.i686'
I googled this topic a lot but still the problems remains and i am totally stuck with this for the last few days. Please help me out.
Reply With Quote
  #2  
Old 23rd May 2009, 10:06 PM
sidebrnz's Avatar
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 63
Posts: 2,145
Is there an appropriate makefile?
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #3  
Old 23rd May 2009, 10:38 PM
shri19 Offline
Registered User
 
Join Date: Feb 2008
Posts: 41
nope. i haven't used any makefile for this. I also tried compiling with a Makefile. Again i came across the same thing but this time there was an additional Error 2. here's the output.

Quote:
[root@localhost untitled folder]# make
'make -C /lib/modules/2.6.27.21-170.2.56.fc10.i686/build M=/root/untitled folder modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.21-170.2.56.fc10.i686'
make[1]: *** No rule to make target `folder'. Stop.
make[1]: Leaving directory `/usr/src/kernels/2.6.27.21-170.2.56.fc10.i686'
make: *** [all] Error 2
the makefile that i used is as follows.

Quote:
obj-m += hello-1.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Reply With Quote
  #4  
Old 23rd May 2009, 10:49 PM
sidebrnz's Avatar
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 63
Posts: 2,145
I'm no expert on such things, but that doesn't look like a valid makefile to me. Instead of listing the commands needed to make the program, you're just calling make recursively. You might want to check with this tutorial to see what a proper makefile looks like: http://www.opussoftware.com/tutorial/TutMakefile.htm
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #5  
Old 23rd May 2009, 11:08 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,075
Quote:
Originally Posted by shri19 View Post
here is the output when i try to compile the program.
Code:
[root@localhost untitled folder]#
The prompt shows that you have a space in your directory name. Don't do that, it breaks a lot of programs. Additionally, don't build software as root. Build it as a regular user and switch to root only for installation.
Reply With Quote
  #6  
Old 23rd May 2009, 11:11 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,075
Quote:
Originally Posted by sidebrnz View Post
I'm no expert on such things, but that doesn't look like a valid makefile to me.
It's the standard kind of makefile for building kernel modules, there's nothing wrong with it. See: http://tldp.org/LDP/lkmpg/2.6/html/x181.html
Reply With Quote
Reply

Tags
error, make

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
make: *** No rule to make target 'clean'. Stop. JonnyBravo Using Fedora 6 18th October 2008 10:38 AM
No rule to make target `modules' Stop vighnesh27 Using Fedora 1 20th August 2008 03:06 PM
No rule to make target 'xconfig'. Stop. somil Using Fedora 1 7th April 2007 03:05 PM
make: *** No rule to make target `Rules.make'. Stop. idk666 Using Fedora 21 6th March 2007 11:08 PM


Current GMT-time: 11:39 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat