Malte S. Stretz wrote:

> It should be possible to do a 
>       perl Makefile.PL </dev/null
>       make spamc/Makefile

  $ make spamc/Makefile 
  /usr/pkg/bin/perl spamc/configure.pl VERSION="3.000000" --prefix="/usr/pkg" 
--sysconfdir="/usr/pkg/etc" --datadir="/usr/pkg/share/spamassassin" 
--enable-ssl="no"
  cd spamc
  configure.pl: creating version.h
  ./configure
  checking for gcc... gcc
  checking for C compiler default output... a.out
  ...

That's what I wanted to avoid, "make spamc/Makefile" starts the GNU
configure script automatically through configure.pl.

>       cd spamc
>       ./configure --yourstuff

This would start 'configure' a second time...

>       make -C .. spamc/spamc
> 
> Not too elegant I must admit :) So what do you exactly need? I guess I could 
> hack it in...

I know patches should be attached to a bugzilla ticket but for the sake
of discussion I have it appended to this message. I will open a ticket
if necessary.
Essentially this would enable me to do something like Malte's algorithm
above.

  perl Makefile.PL </dev/null
  perl spamc/configure.pl --create-version-file
  cd spamc
  ./configure --mystuff
  make all


ciao
     Klaus





$NetBSD$

--- spamc/configure.pl.orig     Tue Jun  1 23:40:15 2004
+++ spamc/configure.pl
@@ -39,7 +39,12 @@ $SIG{__DIE__} = sub {
 # Build our argument list to call the real configure script later.
 our @args = (q{./configure});
 our %args;
+my $only_create_version_file=0;
 foreach (@ARGV) {
+  if (m/^--create-version-file/) {
+    $only_create_version_file=1;
+    next;
+  }
   if (/^--([^=]+?)=["']?(.*?)["']?$/) {
     $args{$1} = $2;
   }
@@ -87,6 +92,9 @@ else
   copy(q{version.h.in}, q{version.h}) || die "Can't copy version.h.in to 
version.h: $!";
 }
 
+if ( $only_create_version_file ) {
+  exit;
+}
 
 # On everything but native Windows (!= cygwin) we use autoconf.
 unless (RUNNING_ON_NATIVE_WINDOWS)

Reply via email to