Allow this script to work on ns trees too, and have more helpful error reporting when no srcdir was found in a Makefile.

git-svn-id: svn://10.0.0.236/trunk@102920 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jaggernaut%netscape.com 2001-09-14 18:45:30 +00:00
parent cf2aaa9018
commit e366bf9ab7

View File

@ -87,14 +87,14 @@ sub domakefile {
my $srcdir;
open MAKE, "<$dir/Makefile" or die "huh? $dir/Makefile";
while ( <MAKE> ) {
if ( m#^\s*srcdir\s*=\s*(.*?mozilla.*?)\s*$# ) {
if ( m#^\s*srcdir\s*=\s*(\S*)# ) {
$srcdir = $1;
last;
}
}
close MAKE;
$srcdir or die "No srcdir found";
$srcdir or die "No srcdir found in file $dir/Makefile";
open MAKE, "<$srcdir/Makefile.in" or die "huh? $dir/Makefile, $srcdir/Makefile.in";