Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: MakeMaker to make Makefile in subdir

by demerphq (Chancellor)
on Sep 24, 2003 at 09:22 UTC ( #293810=note: print w/ replies, xml ) Need Help??


in reply to Re: MakeMaker to make Makefile in subdir
in thread MakeMaker to make Makefile in subdir

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



Comment on Re: Re: MakeMaker to make Makefile in subdir
Select or Download Code
Re: Re: Re: MakeMaker to make Makefile in subdir
by scain (Curate) on Sep 24, 2003 at 16:10 UTC
    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
Node Status?
node history
Node Type: note [id://293810]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-12-20 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls