graff has asked for the wisdom of the Perl Monks concerning the following question:
I have a perl script (to be included in the distro's "bin" directory, and installed along with a couple other executable scripts) that will read the text table files and create the corresponding DB_Files (the whole set of six tables is done in a single run of my "tbl2dbm" -- the data file names are "hardwired").
So, I'd like the "make" step to include running this script to build the DB_Files (which will be needed during "make test"), and then I want "make install" to put the DB_Files into a "standard" location -- presumably in a subdir next to the module's main .pm file in whatever lib path is targeted -- so the module always knows where to find them.
Sad to say, this really is my first dance with ExtUtils::MakeMaker, and I'm at a loss what to put into Makefile.PL to ensure that things go as intended. I know I can put postamble => ..., as one of the key/value pairs that I pass to WriteMakefile(), but I'm unclear on what sort of thing(s) should be on the RHS there, how those get treated in sub MY::postable { ... }, and how I access/refer to the various paths for inputs and outputs.
For that matter, I'm a little foggy on how to manage paths within the module itself (and in "tbl2dbm") so that locating the tables, during "make test" and after "make install", is a sure thing. Any ideas, examples and advice would be much appreciated.
(No, I haven't tried anything yet, beyond making sure that MakeMaker succeeds at doing the basic build and install of the module itself, without doing anything about the table data. I don't want the creation and positioning of the DB table files to be a manual, post-installation step, and I'd like to avoid requiring users edit the module or their shell environment to set the table path.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating a special module install process
by Anonymous Monk on Jul 23, 2008 at 07:47 UTC | |
|
Re: Creating a special module install process
by randyk (Parson) on Jul 24, 2008 at 03:38 UTC |