-rw-r--r-- | Rules.make | 2 | ||||
-rwxr-xr-x | scripts/makecfg.pl | 37 |
2 files changed, 8 insertions, 31 deletions
@@ -87,4 +87,4 @@ endef define makecfg - $(TOPDIR)/scripts/makecfg.pl $1 + $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) endef diff --git a/scripts/makecfg.pl b/scripts/makecfg.pl index 5dd66a4..d7dc41e 100755 --- a/scripts/makecfg.pl +++ b/scripts/makecfg.pl @@ -11,6 +11,7 @@ while(<FILE>){$packages.=$_;} close(FILE); -my ($dirname,$dir,$file,@files,$filename,$tagname,$name,$caps,$pre,$post,$sources,@dupecheck); +my ($dirname,$dir,$file,@files,$filename,$tagname,$name,$caps,$pre,$post,$sources,@dupecheck,$basedir); $file = shift || die; +$basedir = shift; push(@files, $file); @@ -53,32 +54,4 @@ close(CFG); exit; -open(FILE,">$dir/config.in"); -select(FILE); -print "menu \"$name\"\n"; -print "\n"; -my @subdirs=(); -my @dirs; -foreach(grep(/^$dir/, @dirs)){ - chomp; - /^$dir\/$name.pro$/ && next; - my $localdir=$_; - if($dir=~m,^$localdir$,){ - next; - } -#($locadir=$_)~s,/[^/]+$,,g; - if($localdir=~/^\.$/){next;} - if(grep(/^$localdir$/, @subdirs)){next;} - my $nslashes = $localdir =~ tr!/!!; - my $dirnslashes = $dir =~ tr!/!!; - $dirnslashes++; - if($dirnslashes != $nslashes ){next;} - print STDERR "$localdir/config.in\n"; - print " source $localdir/config.in\n"; - push(@subdirs, $localdir); - print "endmenu\n"; - select(STDOUT); - close(FILE); -} - use vars qw/*name *dir *prune/; *name = *File::Find::name; @@ -97,5 +70,9 @@ sub wanted { # print STDERR "nslashes is $nslashes\n"; if($dirnslashes != $nslashes){return;} - print " source " . $File::Find::dir . "/config.in\n"; + my $reldir; + if (defined($basedir)) { + ($reldir=$File::Find::dir)=~s,^$basedir/,,; + } + print " source " . $reldir . "/config.in\n"; push(@dupecheck, $File::Find::dir . "/config.in"); } |