diff options
author | lloyd <[email protected]> | 2006-09-03 08:16:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-09-03 08:16:52 +0000 |
commit | fc738b566c5cd4a44265e3094444b6f4234f0831 (patch) | |
tree | 7fd7f3883dc8d7a8a769023fc5be88c28d82b76c /configure.pl | |
parent | a99a5c076695a51c0f2b25f787c8f54d2b897f2b (diff) |
Place the add_file/replace_file/ignore_file markers in the module info
files into blocks; makes a bit more sense, since there are potentially
many arguments to each, and the current system was making it difficult to
write a generic reader for the files.
Diffstat (limited to 'configure.pl')
-rwxr-xr-x | configure.pl | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/configure.pl b/configure.pl index 2945e161c..bdeecc24d 100755 --- a/configure.pl +++ b/configure.pl @@ -621,7 +621,6 @@ sub get_module_info $HASH{'libs'} = {}; $HASH{'add'} = {}; - $HASH{'local_only'} = {}; $HASH{'replace'} = {}; $HASH{'ignore'} = {}; @@ -634,10 +633,6 @@ sub get_module_info { $HASH{'name'} = $1 if(/^realname \"(.*)\"/); $HASH{'notes'} = $1 if(/^note \"(.*)\"/); - $HASH{'add'}{$1} = undef if(/^add_file ([\.\w]*)/); - $HASH{'local_only'}{$1} = undef if(/^local_only ([\.\w]*)/); - $HASH{'replace'}{$1} = undef if(/^replace_file ([\.\w]*)/); - $HASH{'ignore'}{$1} = undef if(/^ignore_file ([\.\w]*)/); $HASH{'define'}{$1} = undef if(/^define (\w*)/); $HASH{'define_base'}{$1} = undef if(/^define_base (\w*)/); @@ -688,6 +683,33 @@ sub get_module_info } } + if(/^<add>$/) { + while(1) { + $_ = process($_ = <MODFILE>); + next unless $_; + last if (m@^</add>$@); + $HASH{'add'}{$_} = undef; + } + } + + if(/^<ignore>$/) { + while(1) { + $_ = process($_ = <MODFILE>); + next unless $_; + last if (m@^</ignore>$@); + $HASH{'ignore'}{$_} = undef; + } + } + + if(/^<replace>$/) { + while(1) { + $_ = process($_ = <MODFILE>); + next unless $_; + last if (m@^</replace>$@); + $HASH{'replace'}{$_} = undef; + } + } + # Read in a set of os->extra library mappings if(/^<libs>$/) { while(1) { @@ -1221,9 +1243,6 @@ sub generate_makefile { close MAKEFILE; } -################################################## -# Print a header for a makefile # -################################################## sub print_header { my ($fh, $string) = @_; print $fh '#' x 50, "\n", @@ -1243,20 +1262,11 @@ sub print_unix_makefile { $install_root, $header_dir, $lib_dir, $doc_dir, $lib_list) = @_; - ################################################## - # Some constants # - ################################################## my $__TAB__ = "\t"; - ################################################## - # Make the library linking list # - ################################################## my $link_to = "-lm"; foreach my $lib (@{ $lib_list }) { $link_to .= " -l" . $lib; } - ################################################## - # Generate a few variables # - ################################################## my $lib_flags = '$(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS)'; my $libs = '$(STATIC_LIB)'; @@ -1512,14 +1522,8 @@ sub print_nmake_makefile { $install_root, $header_dir, $lib_dir, $doc_dir, $lib_list) = @_; - ################################################## - # Some constants # - ################################################## my $__TAB__ = "\t"; - ################################################## - # Make the library linking list # - ################################################## my $link_to = ''; foreach my $lib (@{ $lib_list }) { @@ -1528,9 +1532,6 @@ sub print_nmake_makefile { else { $link_to .= ' ' . $lib_full; } } - ################################################## - # Generate a few variables # - ################################################## my $lib_flags = '$(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS)'; my $libs = '$(STATIC_LIB)'; |