Index: trunk/psconfig/mkbuild
===================================================================
--- trunk/psconfig/mkbuild	(revision 11737)
+++ trunk/psconfig/mkbuild	(revision 11739)
@@ -76,13 +76,7 @@
     $psperlbuild = `csh psconfig.sh --psperlbuild $version`;
 
-    # alias  psconfigure configure --prefix={$PSCONFDIR}/{$PSCONFIG} --bindir=$bindir --libdir=$libdir --includedir={$PSCONFDIR}/{$PSCONFIG}/include --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share --mandir={$PSCONFDIR}/man
-    # alias  psautogen autogen.sh --bindir=$bindir --libdir=$libdir --mandir=$mandir --includedir={$PSCONFDIR}/{$PSCONFIG}/include --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share
-    # alias  psperlbuild perl Build.PL --prefix {$PSCONFDIR}/{$PSCONFIG} --install_path script=$bindir --install_path arch=$bindir --install_path bin=$bindir --install_path lib=$libdir --install_path bindoc={$PSCONFDIR}/man/man1 --install_path libdoc={$PSCONFDIR}/man/man3
-
     print "psconfigure: $psconfigure\n";
     print "psautogen: $psautogen\n";
     print "psperlbuild: $psperlbuild\n";
-
-    exit 1;
 
     $psopts = "";
@@ -107,16 +101,15 @@
 	# - perl Build.PL : ./Build : ./Build install
  
-	if (-e Build.PL) {
+	if (-e "Build.PL") {
 	    print $PERL5LIB;
 
-	    # psperlbuild;
-	    # perl Build.PL --install_path script=$bindir --install_path lib=$libdir --install_path bindoc={$PSCONFDIR}/man/man1 --install_path libdoc={$PSCONFDIR}/man/man3
-	    if ($?) { &failure(); }
-
-	    # ./Build
-	    if ($?) { &failure(); }
-
-	    # ./Build install
-	    if ($?) { &failure(); }
+	    vsystem ("$psperlbuild");
+	    if ($?) { &failure($cvsname[$i], "failure in perl Build.PL"); }
+
+	    vsystem ("./Build");
+	    if ($?) { &failure($cvsname[$i], "failure in Build"); }
+
+	    vsystem ("./Build install");
+	    if ($?) { &failure($cvsname[$i], "failure in Build install"); }
 	    
 	    next;
@@ -124,40 +117,37 @@
 
 	if ($rebuild && $clean) {
-	    if (-e configure) { unlink "Makefile"; }
-	    if (-e configure.ac && -e autogen.sh) { unlink "configure"; }
+	    if (-e "configure") { unlink "Makefile"; }
+	    if (-e "configure.ac" && -e "autogen.sh") { unlink "configure"; }
 	}
 	$rebuild_this = $rebuild;
 
 	# set a local variable for this loop on rebuild;
-	if (! -e Makefile) { $rebuild_this = 1; }
+	if (! -e "Makefile") { $rebuild_this = 1; }
 
 	#  run autogen
 	$skip_configure = 0;
-	if ($rebuild_this && ! -e configure && -e autogen.sh) {
+	if ($rebuild_this && ! -e "configure" && -e "autogen.sh") {
 	    $skip_configure = 1;
-	    print "psautogen $psopts\n";
-	    vsystem ("psautogen $psopts");
-	    if ($?) { &failure(); }
-	}
-
-	if ($rebuild_this && -e configure && !$skip_configure) {
-	    print "psconfigure $psopts\n";
-	    vsystem ("psconfigure $psopts");
-	    if ($?) { &failure(); }
-	}
-
-	if (! -e Makefile) { &failure(); }
+	    vsystem ("$psautogen $psopts");
+	    if ($?) { &failure($cvsname[$i], "failure in psautogen"); }
+	}
+
+	if ($rebuild_this && -e "configure" && !$skip_configure) {
+	    vsystem ("$psconfigure $psopts");
+	    if ($?) { &failure($cvsname[$i], "failure in psconfigure"); }
+	}
+
+	if (! -e "Makefile") { &failure($cvsname[$i], "missing makefile"); }
 
 	if ($clean) { 
-	    print "make clean\n";
 	    vsystem ("make clean");
-	    if ($?) { &failure(); }
+	    if ($?) { &failure($cvsname[$i], "failure in make clean"); }
 	}
 
 	vsystem ("make");
-	if ($?) { &failure(); }
+	if ($?) { &failure($cvsname[$i], "failure in make"); }
 
 	vsystem ("make install");
-	if ($?) { &failure(); }
+	if ($?) { &failure($cvsname[$i], "failure in make install"); }
 
       success:
@@ -171,11 +161,9 @@
 sub vsystem {
     print STDERR "@_\n";
-    #$status = system ("@_");
-    #$status;
+    $status = system ("@_");
+    $status;
 }
 
 sub list_distributions {
-
-
     vsystem ("ls $tagsets/*.dst");
     exit 2;
@@ -210,6 +198,6 @@
 	if (($do_update ne "Y") && ($do_update ne "N")) { die "invalid tag option $do_update\n"; }
 	
-	print "module: $cvsname, branchtag: $branchtag, branchver: $branchver "; 
-	print "tag: $do_tag, build: $do_build, package: $do_package, update: $do_update\n";
+	print "tag: $do_tag, build: $do_build, package: $do_package, update: $do_update ";
+	print "module: $cvsname, branchtag: $branchtag, branchver: $branchver \n"; 
 
 	push @mode, $mode;
@@ -218,4 +206,8 @@
 	push @branchver, $branchver;
     }
+}
+
+sub failure {
+    die "problem building $_[0] : $_[1]\n";
 }
 
