LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
LinkBack Search this Thread
Old 12-05-2012, 12:02 PM   #1
vithre
LQ Newbie
 
Registered: Dec 2012
Posts: 1

Rep: Reputation: Disabled
No rule to make target `w'. Stop


Hello,

I am Trying to Build a project, Makefile written so that outer make file calls the inner Makefiles to Build,
I am invoking the Makefile as gmake depend at the perent directory of project (Makefile here digs in and executes inner Makefiles to build the project)

.DEFAULT:
@for subdir in `ls */Makefile`; \
do \
echo "+ Making $@ in `dirname $$subdir` ..."; \
(cd `dirname $$subdir`; $(MAKE) $@); \
done


the automatic variable $@ is set to depend, till some inner directories make process is going well and good ,after some point after I could see the error Message as *** No rule to make target `w'. Stop.,
with google help I found reasons like

1.infinite recursion
2.The value of $@ is set to w, as target now is w that won’t be found in the Makefile so causing such an error.

--> I have gmake output I could see make entering in to directories only once and leaving from directories only once, so error is not because of recursion.
-->I could see @ := wp when I issued gmake –p depend.

Could you suggest me the approach to solve this issue

Regards,
Vaithre
 
Old 12-06-2012, 02:42 PM   #2
smallpond
Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 743

Rep: Reputation: 130Reputation: 130
The problem that you're having is most likely that ls can give weird results. It's better to use file globbing in the shell. Also, use the -C option rather than cd.
Code:
        for i in */Makefile ; do      /
            SUBDIR=`dirname "$$i"`;   /
            echo Entering $(SUBDIR) ; /
            $(MAKE) -C $(SUBDIR) $(TARGET) ; /
        done
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
*** No rule to make target `modules'. Stop. Help heffo_j Linux - Hardware 7 06-05-2011 11:44 AM
No rule to make target `menuconfig'. Stop skaj Linux - Kernel 1 02-11-2011 04:52 AM
Belkin Wirless G RTL8185L make[1]: *** No rule to make target `Makefile'. Stop. SilverRock Linux - Wireless Networking 2 02-11-2007 07:25 AM
Error: *** No rule to make target 'all'. Stop aa2bi Linux - Newbie 6 06-08-2004 12:55 PM


All times are GMT -5. The time now is 03:13 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration