diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-06-12 15:00:15 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-06-12 15:00:15 +0000 |
commit | df49c60c9671e4a28e636964d744c1f59fb6cb68 (patch) | |
tree | eabd85e189514ad412a35414ba5d483dcda3ef1f /tools/update/acpolish | |
parent | Purged as many egcs references as possible. (diff) | |
download | rtems-df49c60c9671e4a28e636964d744c1f59fb6cb68.tar.bz2 |
Merged from 4.5.0-beta3a
Diffstat (limited to 'tools/update/acpolish')
-rwxr-xr-x | tools/update/acpolish | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/tools/update/acpolish b/tools/update/acpolish index 5de711f60c..0a739fd9cf 100755 --- a/tools/update/acpolish +++ b/tools/update/acpolish @@ -1,10 +1,8 @@ #!/usr/bin/perl -# use strict 'subs' ; -# use strict 'vars' ; -# use strict 'refs' ; +use strict ; -# use strict ; +sub print_macro($$); # # Perl script to beautify and enhance RTEMS autoconf Makefile.ins @@ -40,27 +38,6 @@ my @files = () ; my @variants = () ; my @vars = () ; -sub print_macro($$) -{ - my $line = $_[0] ; - my $input = $_[1] ; - $input =~ s/\\\\/ /g; - my @l = split(' ',$input); - - foreach (@l) { - if ( ( length($line) + length($_) ) < 76 ) - { - $line .= " $_"; - } - else - { - print "$line \\\n"; - $line = " $_" ; - } - } - print "$line\n" ; -} - # Strip off duplicate entries from a list sub purge($) { @@ -180,8 +157,8 @@ sub subst_line { my $files =`ls *.h 2>/dev/null`; print STDERR "WARNING: Replacing \"\(wildcard... in $_\n" ; - $line = "H_FILES ="; - @l = split(' ',$files) ; + my $line = "H_FILES ="; + my @l = split(' ',$files) ; foreach(@l) { $line .= " \$\(srcdir\)/$_"; } $line .= "\n" ; $_ = "$line" ; @@ -214,7 +191,7 @@ sub subst_line my @ibuf = () ; my $line = "" ; - while ( <> ) + while ( <STDIN> ) { &subst_line ; if ( /^(#.*)$/o ) @@ -618,7 +595,7 @@ if ( $experimental > 1 ) { print "mkinstalldirs = \$(SHELL) \$(top_srcdir)/\@RTEMS_TOPdir\@/mkinstalldirs\n\n" ; my $line = join( ' ',@installdirs ); - print_macro "INSTALLDIRS =", $line ; + &print_macro( "INSTALLDIRS =", $line ); print "\n\$(INSTALLDIRS):\n\t\@\$(mkinstalldirs) \$(INSTALLDIRS)\n\n" ; $nl_seen = 1 ; } @@ -633,12 +610,12 @@ if ( $experimental > 1 ) } elsif ( /^\§4(.*)$/o ) { # pretty print a make variable - print_macro "$1 =", ${"var_$1"} ; + &print_macro( "$1 =", ${"var_$1"} ); $nl_seen = 0 ; } elsif ( /^\§5(.*)$/o ) { # pretty print an addition to a make variable - print_macro "$1 +=", ${"var_$1+"} ; + &print_macro( "$1 +=", ${"var_$1+"}) ; $nl_seen = 0 ; } else @@ -678,4 +655,25 @@ print " \$(ACLOCAL_M4)\n" ; print "\tcd \$(srcdir) && \$(AUTOCONF)\n" } -;1 +exit 0 ; + +sub print_macro($$) +{ + my ($line,$input) = @_ ; + $input =~ s/\\\\/ /g; + my @l = split(' ',$input); + + foreach (@l) { + if ( ( length($line) + length($_) ) < 76 ) + { + $line .= " $_"; + } + else + { + print "$line \\\n"; + $line = " $_" ; + } + } + print "$line\n" ; +} + |