Hello, I would like to write Perl script to generate dependencies files based + on cpp files. The script have to run on all *.cpp files under current directory and +for each of them to retrieve his dependencies list. The script should to look for the other header files according to $INC +LUDE variable. Finally, the script should to write the result to make.dep (namke form +at) file as describe below .\FILE1.CPP : \ "..\..\inc\ADVISOR.H"\ "..\..\inc\audittrail.h"\ "..\..\inc\Cimr.h"\ .\FILE2.CPP : \ "..\..\inc\corba\corbastructdefs.h"\ "..\..\inc\DBFCLASS.H"\ "..\..\INC\dbfs.h"\ .\FILE3.CPP : \ "..\..\INC\dbfs_c_struct.h"\ "..\..\inc\dynadbfs.h"\ "..\..\inc\errorlog.h"\ "..\..\INC\FSP.H"\ The file.dep will include information about all the *.cpp files under +the current directory.I need to automatically build the list of depen +dency files, for nmake so I don't need to recompile everything when I + change a header file. Please let me know if you have any script to implement it, or any algo +rithm to perform it.... Thank you for your help, Jona.

In reply to Generate dep file from CPP file- to use with nmake by Noame

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.