Been there, done that. :-)
What I do is simply do this:
- Untar everything (check if it's untarred already)
- Loop:
- If Build.PL exists:
- Run $^X -I$install_base/lib Build.PL --install_base $install_base, and catch the output.
- Check for /ERROR: Prerequisite (\S+) isn't installed/. If found, go to next item in loop.
- Run $^X Build install (if failed, go to next item)
- Delete current build from to-do hash.
else if Makefile.PL exists:- Run $^X -I$install_base/lib Makefile.PL LIB=$install_base/lib PREFIX=$install_base, and catch the output.
- Check for /prerequisite\s*(\S+)\s.*not found/. If found, go to next item in loop.
- Run make install (if failed, go to next item)
- Delete current build from to-do hash.
- After each iteration of the loop, if the size of the to-do hash is non-zero and hasn't changed (meaning some prereqs may not be satisfied, or some installs failed), bail. (This is important :->)
Obviously, I do this in perl. I don't even want to know how to do it in make - at least, automatically, that is. If it were in make, I'd just set up a bunch of targets where "DBD-mySQL: DBI" or something ... but that sounds painful, too :-)
-
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.
|