summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-01-16 04:01:29 (UTC)
committer kergoth <kergoth>2003-01-16 04:01:29 (UTC)
commit73927fe1c095507ce7fdd310917521fcd305b7e5 (patch) (side-by-side diff)
treed09eb7d1e2a845b6e974150e369ea73dca89cb64
parent4e6e6deda15467fe253b546136df00cf5b7ebd02 (diff)
downloadopie-73927fe1c095507ce7fdd310917521fcd305b7e5.zip
opie-73927fe1c095507ce7fdd310917521fcd305b7e5.tar.gz
opie-73927fe1c095507ce7fdd310917521fcd305b7e5.tar.bz2
Use paths relative to OPIEDIR in generated configs.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make2
-rwxr-xr-xscripts/makecfg.pl37
2 files changed, 8 insertions, 31 deletions
diff --git a/Rules.make b/Rules.make
index f85779c..817c2bc 100644
--- a/Rules.make
+++ b/Rules.make
@@ -88,3 +88,3 @@ 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
@@ -12,4 +12,5 @@ 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);
@@ -54,30 +55,2 @@ 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/;
@@ -98,3 +71,7 @@ sub wanted {
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");