diff options
author | lloyd <[email protected]> | 2008-09-30 03:26:04 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-30 03:26:04 +0000 |
commit | 9c6095c1340721c1d3803bf7fb6568f105f6b1e3 (patch) | |
tree | d1623bee83803b422c6906a95ed02a33ddae9867 /configure.pl | |
parent | 9b78b55b1c572ed029d2d5fe1b9faaef992c0c16 (diff) |
If a module specifies <module_name>:<file> in its <add> block, include
that file from another module (without loading it). This was needed since
mp_asm64 and mp_ia32_msvc do not implement both mp_asm.h and mp_asmi.h
like the other mp_ modules - instead they pull the mp_generic version in.
Diffstat (limited to 'configure.pl')
-rwxr-xr-x | configure.pl | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/configure.pl b/configure.pl index 0aa0d1d39..60d17bad9 100755 --- a/configure.pl +++ b/configure.pl @@ -1247,7 +1247,17 @@ sub add_file { croak("File $file already added from ", $$config{$type}{$file}) if(defined($$config{$type}{$file})); - $$config{$type}{$file} = $mod_dir; + if($file =~ /(.*):(.*)/) { + my @dirs = File::Spec->splitdir($mod_dir); + + $dirs[$#dirs-1] = $1; + + $$config{$type}{$2} = File::Spec->catdir(@dirs); + } + else { + print "$type $file = $mod_dir\n"; + $$config{$type}{$file} = $mod_dir; + } }; &$do_add_file(file_type($file)); @@ -1281,10 +1291,14 @@ sub check_for_file { my $full_path = sub { my ($file,$mod_dir) = @_; - return File::Spec->catfile($mod_dir, $file) if(defined($mod_dir)); + if($file =~ /(.*):(.*)/) { + return File::Spec->catfile($mod_dir, '..', $1, $2); + } else { + return File::Spec->catfile($mod_dir, $file) if(defined($mod_dir)); - my @typeinfo = file_type($config, $file); - return File::Spec->catfile($typeinfo[1], $file); + my @typeinfo = file_type($config, $file); + return File::Spec->catfile($typeinfo[1], $file); + } }; $file = &$full_path($file, $added_from); |