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 | |
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.
-rwxr-xr-x | configure.pl | 22 | ||||
-rw-r--r-- | src/bigint/mp_asm64/info.txt | 1 | ||||
-rw-r--r-- | src/bigint/mp_ia32_msvc/info.txt | 1 |
3 files changed, 20 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); diff --git a/src/bigint/mp_asm64/info.txt b/src/bigint/mp_asm64/info.txt index f5c5266a7..85a4391b9 100644 --- a/src/bigint/mp_asm64/info.txt +++ b/src/bigint/mp_asm64/info.txt @@ -6,6 +6,7 @@ load_on dep <add> mp_asm.h +mp_generic:mp_asmi.h </add> <arch> diff --git a/src/bigint/mp_ia32_msvc/info.txt b/src/bigint/mp_ia32_msvc/info.txt index 2dc99e29a..9c7ac9b43 100644 --- a/src/bigint/mp_ia32_msvc/info.txt +++ b/src/bigint/mp_ia32_msvc/info.txt @@ -5,6 +5,7 @@ mp_bits 32 load_on dep <add> +mp_generic:mp_asm.h mp_asmi.h </add> |