I was trying to package AxKit for wigwam, ( a sort of isolated playpen'd
environment. )  and I found I was unable to get Makefile.PL to accept
INC= on the command line.

Looking into it it seems that every key in %config that gets modified by
Makefile.PL, such as INC when Makefile.PL add's the xml2-config outpt to
INC, get's pushed onto the existing @ARGV array, overriding what as
previously there.

It looks like it used to work and at cvs ver. 1.11 matts, modified it to
Fix the stealing of arguments meant to be parsed by ExtUtils::AutoInstall.

anyhow,  the following patch illustrates/fixes the problem,
by just copying @ARGV into %config, then letting the old %config mods
happen, and also leaving @ARGV for AutoInstall, later, it clears @ARGV,
and rebuilds it from %config:

Index: Makefile.PL
===================================================================
RCS file: /home/cvspublic/xml-axkit/Makefile.PL,v
retrieving revision 1.16
diff -u -b -r1.16 Makefile.PL
--- Makefile.PL 18 Feb 2003 22:37:22 -0000      1.16
+++ Makefile.PL 3 Mar 2003 04:53:07 -0000
@@ -46,10 +46,10 @@

 $|=1; # flush output

-# while($_ = shift @ARGV) {
-#     my ($k, $v) = split /=/, $_, 2;
-#     $config{$k} = $v;
-# }
+for (@ARGV) {
+     my ($k, $v) = split /=/, $_, 2;
+     $config{$k} = $v;
+ }

 $DEBUG = delete $config{DEBUG};
 ######################################################
@@ -211,6 +211,8 @@
     $config{CCFLAGS} = strip_lfs($config{CCFLAGS});
 }

+# rebuild @ARGV from the stored and modified values.
+undef(@ARGV);
 foreach my $k (keys %config) {
     push @ARGV, "$k=$config{$k}";
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to