LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-13-2006, 10:38 AM   #1
jrfk2
LQ Newbie
 
Registered: Jan 2006
Posts: 24

Rep: Reputation: 0
GNU Make - get list of targets to be made


I'm trying to find a way to get GNU Make 3.80 to list out all the targets it will make.

I have a top level makefile in my root folder, and it points to makefiles in subfolders etc.

I *really* want it to tell me which make files it will run in what order, but will settle for a list of all the targets and will figure out what I need from that.

I've tried various combinations of options like

-B always make
-d print debug
-n just print out commands
-p print make's internal DB
-t touch targets instead of making them

but not finding what I am hoping for.

Also --help mentions option --debug[=FLAGS] but doesn't say what FLAGS can be ... anyone know ..

thanks ...
 
Old 08-12-2006, 10:03 PM   #2
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 30
You could write a shell script wrapper that would echo which makefile it will work on before invoking GNU make. For example:

#!/bin/sh

ROOT_BUILD=/home/my_user/my_project

echo "Will execute GNU make in this order:"

for i in $ROOT_BUILD/dir1 $ROOT_BUILD/dir2 $ROOT_BUILD/dir3 do

echo "$i"

# if you wish to make the targets, uncomment this:
# make $i

done

I'm not very good at shell script (expect syntax errors), but is this something like what you needed?
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
tinkering with dkms: make error no targets. Makefile issue? Emmanuel_uk Linux - Newbie 1 06-03-2005 01:26 AM
Adding more targets to Make oulevon Programming 6 02-09-2005 05:11 PM
Ok i made the biggest mistake anyone could ever make... Soujiro Linux - Software 1 04-24-2004 01:47 AM
make with multiple targets eskimo22 Programming 1 02-26-2004 11:42 AM
how to make tcpdump to show me only the connection made on 25? sqn Linux - Networking 1 01-29-2004 12:02 PM


All times are GMT -5. The time now is 02:06 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration