Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
I thought knew what make and Makefiles do for C and C++ projects check source file dependencies and binary files, seeing what needs to be recompiled.

I think you meant "compiled" up there not "recompiled". Makefiles are similar to shell scripts, a series of instructions for the machine-local copy of make to process for different stages of preprocessing, compiling and installing packages from source. And the very same applies to perl modules too.

You have to remember that perl is a high level language whose capabilities transcend the different non-portable languages built for dedicated platforms and architectures (like C, C++, etc). This makes perl really powerful and portable but at a cost, the layer of abstraction at which perl operates doesn't allow a perl user to directly access the system, create data structures using the fundamental data types, interact with hardware and external libraries, etc. One of the ways perl modules get to work identically across the various host environments is to initially build a "platform" (for lack of a better word) that is dependant on the machine's subtleties - C compilers, fundamental data-types, endianness, memory management algorithms, available libraries, paths, etc, etc. So it is the job of makefiles (in perl too) to analyze the system, create rules, compile C code (in XS/SWIG) and install the compiled binaries into the perl path (@INC), etc. The importance of the makefile in a perl module varies - some perl modules contain very little perl code and are largely comprised of compiled XS, other's contain pure perl and little or no XS.

In reply to Re: What Makefiles do by Firefly258
in thread What Makefiles do by throop

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.