LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-03-2009, 03:46 PM   #1
homer_3
Member
 
Registered: May 2008
Posts: 99

Rep: Reputation: 15
Possible to output line Makefile is executing?


Is it possible to output the line a Makefile is executing? I'm getting this "No rule to make target X needed by Y" and I want to know where in the Makefile it's trying to call this rule.
 
Old 08-03-2009, 05:23 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I can't locate a means of outputting the executing line number of a Makefile (this certainly doesn't mean there's no way to do it) but this may help:

shell# make --debug=v

It doesn't return line numbers, but gives verbose output as to what file Make is reading, what it decides to do with what it reads, and more.

If you need to run something like `make helloworld` then just put the 'helloworld' after the --debug=v

The `Make` man page has more details & other options.

Hope this helps some,

Sasha
 
Old 08-03-2009, 05:34 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
If you wrote the 'Makefile', I guess you will
have an idea, what it is about.

If we are talking about a standard application,
please tell which.
And which Linux is used for the compilation ? ?
Quote:
"No rule to make target ...
... Not to be found in the Makefile, it is a
"build in" function / reply in the 'make' executable.

.....
This command will give a reply ( with a linenumber )
if the word is in the Makefile :

cat -n Makefile | grep -i <word>
.....
 
  


Reply



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
help with c program to read each line from text file, split line , process and output gkoumantaris Programming 12 07-01-2008 12:38 PM
Grep's line numbers parsed into one line of output. judgex Programming 8 08-14-2006 04:22 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
executing from command line nodger Linux - Newbie 3 01-20-2004 10:30 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:11 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
Open Source Consulting | Domain Registration