Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 07-13-2006, 11:38 AM   #1
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, 11:03 PM   #2
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:



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


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


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 02:26 AM
Adding more targets to Make oulevon Programming 6 02-09-2005 06:11 PM
Ok i made the biggest mistake anyone could ever make... Soujiro Linux - Software 1 04-24-2004 02:47 AM
make with multiple targets eskimo22 Programming 1 02-26-2004 12:42 PM
how to make tcpdump to show me only the connection made on 25? sqn Linux - Networking 1 01-29-2004 01:02 PM

All times are GMT -5. The time now is 05:01 PM.

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