Go Back  IT Forums > Software > Configuration Management
User Name
Password
Reply
 
Thread Tools Search this Thread Display Modes

Dependency graph for Gmake makefile
  #1
Old 10-08-2006, 01:15 AM
kunal kishor
Junior Member


kunal kishor is offline
kunal kishor's Info
Join Date: Oct 2006
Posts: 2
Default Dependency graph for Gmake makefile

Hi all, I need to get a tool or something which gives the dependency
graph by looking at a makefile...

even if not a dependency graph,.... it should deduce some
information...

do you guys know any such tool, or something.. please help..

Reply With Quote
Dependency graph for Gmake makefile
  #2
Old 10-08-2006, 02:49 AM
Dirk Heinrichs
Junior Member


Dirk Heinrichs is offline
Dirk Heinrichs's Info
Join Date: Jun 2006
Posts: 13
Default Dependency graph for Gmake makefile

kunal kishor wrote:
Quote:
Hi all, I need to get a tool or something which gives the dependency graph by looking at a makefile... even if not a dependency graph,.... it should deduce some information... do you guys know any such tool, or something.. please help..


If you had simply read "man make", you would have found "-p".

HTH...

Dirk
Reply With Quote
Dependency graph for Gmake makefile
  #3
Old 10-09-2006, 04:45 AM
kunal kishor
Junior Member


kunal kishor is offline
kunal kishor's Info
Join Date: Oct 2006
Posts: 2
Default Dependency graph for Gmake makefile

HI Dirk,
I actually used make -p, but.... u know, the o/p is aa whole dump of
database,.... which is not easily comprehendable.... or say how to use
it??, i.e. how to look for useful info in it..??

Actually I have to find out the dependencies.. and main goal is to find
out those files which are not dependent on any other files...like
that.....


Dirk Heinrichs wrote:
Quote:
kunal kishor wrote:
Quote:
Hi all, I need to get a tool or something which gives the dependency graph by looking at a makefile... even if not a dependency graph,.... it should deduce some information... do you guys know any such tool, or something.. please help..
If you had simply read "man make", you would have found "-p". HTH... Dirk


Reply With Quote
Dependency graph for Gmake makefile
  #4
Old 10-09-2006, 09:15 AM
mthompson
Junior Member


mthompson is offline
mthompson's Info
Join Date: Oct 2006
Posts: 5
Default Dependency graph for Gmake makefile

kunal

I had what I thought was a difficult makefile question a couple weeks
ago trying to create optional dependancies. I found a forum at CM
Crossroads called Ask Mr. Make which it turns out is moderated by John
Graham-Cumming (creator of gnumake) No more problems for me
Mr. Make can be found at --
http://www.cmcrossroads.com/compone...id,180/board,92

Reply With Quote
Dependency graph for Gmake makefile
  #5
Old 10-09-2006, 07:33 PM
Heny Townsend
Junior Member


Heny Townsend is offline
Heny Townsend's Info
Join Date: Dec 2004
Posts: 9
Default Dependency graph for Gmake makefile

mthompson wrote:
Quote:
kunal I had what I thought was a difficult makefile question a couple weeks ago trying to create optional dependancies. I found a forum at CM Crossroads called Ask Mr. Make which it turns out is moderated by John Graham-Cumming (creator of gnumake) No more problems for me Mr. Make can be found at --


John G-C is a great guy, brilliant and helpful, but he's no more the
creator of gnu make than I am. Here's the top of the AUTHORS file:

GNU make development up to version 3.75 by:
Roland McGrath <roland@gnu.org>


Development starting with GNU make 3.76 by:
Paul D. Smith <psmith@gnu.org>

Additional development starting with GNU make 3.81 by:
Boris Kolpackov <boris@kolpackov.net>

GNU Make User's Manual
Written by:
Richard M. Stallman <rms@gnu.org>


HT
Reply With Quote
Dependency graph for Gmake makefile
  #6
Old 10-10-2006, 12:05 AM
Dirk Heinrichs
Junior Member


Dirk Heinrichs is offline
Dirk Heinrichs's Info
Join Date: Jul 2003
Posts: 28
Default Dependency graph for Gmake makefile

kunal kishor wrote:
Quote:
HI Dirk, I actually used make -p, but.... u know, the o/p is aa whole dump of database,.... which is not easily comprehendable.... or say how to use it??, i.e. how to look for useful info in it..??


Use awk/grep or some perl magic to filter out the relevant information.
Quote:
Actually I have to find out the dependencies.. and main goal is to find out those files which are not dependent on any other files...like that.....


The files which don't have dependencies can be found by something like:

make -p 2>&1|grep ":$" |grep -v "^#"|grep -v "^\."

The first grep looks for lines ending with ":", the second one filters out
the comments, and the last one filters out the suffix rules. You may want
to refine the filter further.

HTH...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Hambornerstraße 55 | Web: http://www.capgemini.com
D-40472 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
Reply With Quote
Dependency graph for Gmake makefile
  #7
Old 10-10-2006, 11:12 AM
Guest
Guest


Guest's Info
Posts: n/a
Default Dependency graph for Gmake makefile

There is a cool Perl module that creates dependency information and
then creates nice pictures of it all:

http://search.cpan.org/~agent/Makef...ile/GraphViz.pm

Examples:
http://search.cpan.org/src/AGENT/Ma...10/samples.html

~Matt
mdoar@pobox.com

Dirk Heinrichs wrote:
Quote:
kunal kishor wrote:
Quote:
HI Dirk, I actually used make -p, but.... u know, the o/p is aa whole dump of database,.... which is not easily comprehendable.... or say how to use it??, i.e. how to look for useful info in it..??
Use awk/grep or some perl magic to filter out the relevant information.
Quote:
Actually I have to find out the dependencies.. and main goal is to find out those files which are not dependent on any other files...like that.....
The files which don't have dependencies can be found by something like: make -p 2>&1|grep ":$" |grep -v "^#"|grep -v "^\." The first grep looks for lines ending with ":", the second one filters out the comments, and the last one filters out the suffix rules. You may want to refine the filter further. HTH... Dirk -- Dirk Heinrichs | Tel: +49 (0)162 234 3408 Configuration Manager | Fax: +49 (0)211 47068 111 Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com Hambornerstraße 55 | Web: http://www.capgemini.com D-40472 Düsseldorf | ICQ#: 110037733 GPG Public Key C2E467BB | Keyserver: www.keyserver.net


Reply With Quote
Dependency graph for Gmake makefile
  #8
Old 10-12-2006, 01:07 AM
Jorgen Grahn
Junior Member


Jorgen Grahn is offline
Jorgen Grahn's Info
Join Date: Nov 2005
Posts: 42
Default Dependency graph for Gmake makefile

On 10 Oct 2006 12:12:04 -0700, mdoar@pobox.com <mdoar@pobox.com> wrote:
Quote:
There is a cool Perl module that creates dependency information and then creates nice pictures of it all: http://search.cpan.org/~agent/Makef...ile/GraphViz.pm


That makes sense. GraphViz is the weapon of choice for visualizing these
kinds of things. Extra bonus points if someone has already written the logic
for massaging the data into GraphViz definitions, like in this case.

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Style Design by vBStyles.com


Top Contact Us - IT Forums - Archive - MyLounge Top
MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service