Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 05-14-2009, 02:01 PM   #1
Registered: Apr 2005
Location: At the 100th Meridian where the great plains begin
Distribution: Debian Testing on T60 laptop
Posts: 105

Rep: Reputation: 16
print make dependency tree?

I'm curious if anyone knows of a way to print out in a visual way the dependencies that are specified in a makefile.

Of course you could just read the makefile or run make and look at the compiler/linker commands that make prints when it executes, but I'm interested in something that would be more immediately obvious to the eye, to avoid having to spend my cognitive resources on unnecessary activities.

The reason I'm interested in this is that I have a project that someone else created that is composed of several files, and in order to start to understand what each file is, it's good to know what depends on what.

Obviously make builds a dependency tree itself, so it's a plausibly small leap to go from there to printing it out in a nice pleasing way. I'm curious if anyone's done that.
Old 05-14-2009, 03:34 PM   #2
Sergei Steshenko
Senior Member
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
I think you'll need an additional script; if we are talking about GNU make, a dry run can be performed; see

man make

and pay attention to



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

Similar Threads
Thread Thread Starter Forum Replies Last Post
If a tree falls in a forest and no one is around to hear it, does it make a sound? UMG:Chicken_Sop General 74 09-25-2008 07:54 AM
Huge dependency tree for xine nonfree codecs in fc8 linuxpokernut Linux - Software 9 03-12-2008 08:08 PM
Dependency tree drawing software? BuilderQ Linux - Software 6 12-06-2007 10:02 AM
source tree modification not showing in 'make menuconfig' dohpaz Slackware 14 01-28-2007 01:38 PM
LXer: Linux Dependency tree LXer Syndicated Linux News 0 05-02-2006 06:54 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:36 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