Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: MakeMaker to make Makefile in subdir

by PodMaster (Abbot)
on Sep 23, 2003 at 22:33 UTC ( [id://293709]=note: print w/replies, xml ) Need Help??


in reply to MakeMaker to make Makefile in subdir

Its mostly magic. This has been discussed before, but I can't be bothered to super search it, so i'm just gonna give you a few examples of distributions that do this

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: MakeMaker to make Makefile in subdir

Replies are listed 'Best First'.
Re: Re: MakeMaker to make Makefile in subdir
by demerphq (Chancellor) on Sep 24, 2003 at 09:22 UTC

    Great. I checked out libwin32-0.191 and it does seem to magically cascade to Makefile.PL's. But a little experimentation showed the trick is to ensure that each makefile is only one directory below the next. So even though h2xs builds a tree, the next set of modules only want the leaf directory of that tree, and in fact build totally correctly regardless as to what that leaf directory is called. (the latter fact is not shown below. Anyways thanks for the heads up on how to figure this out, I hope its as useful to scain as it has been to me.

    D:\perl\Recursive\L1>dir Volume in drive D is New Volume Volume Serial Number is 0842-2896 Directory of D:\perl\Recursive\L1 2003/09/24 11:12 <DIR> . 2003/09/24 11:12 <DIR> .. 2003/09/24 00:12 168 Changes 2003/09/24 00:12 1,214 L1.pm 2003/09/24 11:12 <DIR> L2 2003/09/24 10:00 498 Makefile.PL 2003/09/24 00:12 56 MANIFEST 2003/09/24 00:12 1,112 README 2003/09/24 11:12 <DIR> Recurse 2003/09/24 11:12 <DIR> Recursive 2003/09/24 00:12 487 test.pl 6 File(s) 3,535 bytes 5 Dir(s) 6,143,295,488 bytes free D:\perl\Recursive\L1>tree D:\perl\Recursive Folder PATH listing for volume New Volume Volume serial number is 0006FE80 0842:2896 D:\PERL\RECURSIVE +---L1 +---L2 +---Recurse +---Recursive +---Recursive D:\perl\Recursive\L1>perl makefile.pl Checking if your kit is complete... Looks good Checking if your kit is complete... Looks good Writing Makefile for Recursive::L2 Checking if your kit is complete... Looks good Writing Makefile for Second::Recurse Checking if your kit is complete... Looks good Checking if your kit is complete... Looks good Writing Makefile for Recursive::Recursive::Recursive Writing Makefile for Recursive::Recursive Writing Makefile for Recursive::L1 D:\perl\Recursive\L1>nmake Microsoft (R) Program Maintenance Utility Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. cp L1.pm blib\lib\Recursive\L1.pm cp L2.pm ..\blib\lib\Recursive\L2.pm cp Recurse.pm ..\blib\lib\Second\Recurse.pm cp Recursive.pm ..\blib\lib\Recursive\Recursive.pm cp Recursive.pm ..\..\blib\lib\Recursive\Recursive\Recursive.pm D:\perl\Recursive\L1>tree D:\perl\Recursive Folder PATH listing for volume New Volume Volume serial number is 0006FE80 0842:2896 D:\PERL\RECURSIVE +---L1 +---blib | +---arch | | +---auto | | +---Recursive | | | +---L1 | | | +---L2 | | | +---Recursive | | | +---Recursive | | +---Second | | +---Recurse | +---lib | +---auto | | +---Recursive | | | +---L1 | | | +---L2 | | | +---Recursive | | | +---Recursive | | +---Second | | +---Recurse | +---Recursive | | +---Recursive | +---Second +---L2 +---Recurse +---Recursive +---Recursive D:\perl\Recursive\L1>

    Cheers mate.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi


      Thanks demerphq and PodMaster; this is at least getting me close. There is some magic here. My directory structure looks like this:
      gmod/ src/ component1/ component2/ component3/
      All I had to do was put a simple Makefile.PL in the src/ directory and when the main Makefile.PL was executed in the gmod/ directory, it saw the one in src/, which in turn saw the ones in component directories.

      This probably would have worked flawlessly if the items in the component directories were only Perl modules, but they are more complicated than that, and have in their Makefile.PLs custom overrides to the install target (so that items can be installed under /usr/local/apache, for instance). I may be able to get around that by overriding the install target in the main Makefile.PL, but that is unattractive for at least one reason: it makes the main Makefile.PL more fragile (if the author of component1 changes his Makefile.PL and doesn't tell me, it won't work as expected).

      Thanks again,
      Scott
      Project coordinator of the Generic Model Organism Database Project

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://293709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found