[siesta-commit] siesta Makefile.PL,1.19,1.20

[prev] [thread] [next] [lurker] [Date index for 2002/09/12]

From: clampr
Subject: [siesta-commit] siesta Makefile.PL,1.19,1.20
Date: 14:32 on 12 Sep 2002
Update of /cvsroot/siesta/siesta
In directory usw-pr-cvs1:/tmp/cvs-serv31530

Modified Files:
	Makefile.PL 
Log Message:
start prompting

Index: Makefile.PL
===================================================================
RCS file: /cvsroot/siesta/siesta/Makefile.PL,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- Makefile.PL	12 Sep 2002 13:16:56 -0000	1.19
+++ Makefile.PL	12 Sep 2002 13:32:23 -0000	1.20
@@ -1,13 +1,27 @@
 use ExtUtils::MakeMaker;
 
-my $db = "siesta.db";
+$|= 1;
+print "Checking for existing Siesta::Config... ";
+
+my $D_ROOT = '/usr/local/siesta';
+eval {
+    require Siesta::Config;
+    print "found. setting defaults based on existing install\n";
+    $D_ROOT = $Siesta::Config::ROOT;
+};
 
+print "failed. selecting regular defaults\n"
+  if $@;
+
+my $ROOT = prompt("where do we install to guv?", $D_ROOT);
+
+print "Generating Siesta::Config from your answers\n";
 open(IN,  "<lib/Siesta/Config.pm.in")
   or die "couldn't open Config.pm.in: $!";
 open(OUT, ">lib/Siesta/Config.pm")
   or die "couldn't open Config.pm for write: $!";
 while (<IN>) {
-    s/@@DB@@/$db/;
+    s/\@\@ROOT\@\@/$ROOT/;
     print OUT $_;
 }
 close IN  or die "error closing Config.pm.in: $!";



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52