This question doesn't have much to do w/ Perl, but since many computer savvy people read this, it's worth a try. I'm working on a project that has to do with the make command in UNIX to build projects. There are makefiles involved - in fact, a makefile tree where there subdirectories with their own makefiles which are called upon by the main makefile (recursive makes).

What I need to do is figure out which files in the project are used for which applications - each build can consist of several applications. I'll be writing a Perl script (if this is possible) that basically spits out info about the files used for each application in the whole build - some files might be shared.

Is there any possible way from reading the main makefile (root directory of the project) and extracting this information? I'm on HP-UX, but I use ClearCase which, in turn, provides clearmake - their own version of the UNIX make(1). I figured out that by running clearmake w/ the -w -d and -n optionas, I get a dry run that gives me the names of all the directories and files used in the build for the project, but I still haven't found a way to separate this by application or executable, IF possible at all. I know this is mostly a Perl board, but maybe someone can point me to a place where I can get an answer to my question or where I can make sure that there is no one solution.

Thanx for any help I can get!!!


In reply to The dreadful Makefiles by IcyHot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.