diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2006-01-12 04:02:51 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2006-01-12 04:02:51 +0000 |
commit | 9db0ec288993117e2b9a5ad0fb32d57d485fe2ac (patch) | |
tree | f3b4c47183b62a747a4c920cd759bcecb8b7dcb0 /tools/build | |
parent | 2006-01-12 Ralf Corsepius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-9db0ec288993117e2b9a5ad0fb32d57d485fe2ac.tar.bz2 |
2006-10-12 Ralf Corsepius <ralf.corsepius@rtems.org>
* ampolish3.in: Check if Makefile.am already contains CLEANFILES or
DISTCLEANFILES.
Diffstat (limited to 'tools/build')
-rw-r--r-- | tools/build/ChangeLog | 7 | ||||
-rwxr-xr-x | tools/build/ampolish3.in | 22 |
2 files changed, 26 insertions, 3 deletions
diff --git a/tools/build/ChangeLog b/tools/build/ChangeLog index 28f0a801b4..17fdd01f57 100644 --- a/tools/build/ChangeLog +++ b/tools/build/ChangeLog @@ -1,6 +1,11 @@ +2006-10-12 Ralf Corsepius <ralf.corsepius@rtems.org> + + * ampolish3.in: Check if Makefile.am already contains CLEANFILES or + DISTCLEANFILES. + 2006-10-10 Ralf Corsepius <ralf.corsepius@rtems.org> - * ampolish3.im: Update. + * ampolish3.in: Update. 2005-10-25 Ralf Corsepius <ralf.corsepius@rtems.org> diff --git a/tools/build/ampolish3.in b/tools/build/ampolish3.in index b2b19628f6..162a96a364 100755 --- a/tools/build/ampolish3.in +++ b/tools/build/ampolish3.in @@ -1,5 +1,7 @@ #! @PERL@ -w +# $Id$ + # Helper script to generate pre/tmpinstall rules for cpukit Makefile.am. # # Usage: ampolish3 Makefile.am > preinstall.am @@ -102,6 +104,12 @@ foreach my $l ( @buffer1 ) { { # conditionals push @buffer2, "$l"; } + + # Check if Makefile.am already contains CLEANFILES or DISTCLEANFILES + if ( $l =~ /^\s*(CLEANFILES|DISTCLEANFILES)\s*\=.*$/o ) + { + $predefs{"$1"} = 1; + } } if ( $predefs{"\$(PROJECT_INCLUDE)"} ){ @@ -214,9 +222,19 @@ foreach my $k ( keys %seen ) { $output .= "$k =\n"; if ( $k =~ /.*FILES/o ) { - $output .= "CLEANFILES += \$($k)\n"; + $output .= "CLEANFILES "; + if ( $predefs{"CLEANFILES"} ) { + $output .= "+"; + $predefs{"CLEANFILES"} = 1; + } + $output .= "= \$($k)\n"; } elsif ( $k =~ /.*DIRS/o ) { - $output .= "DISTCLEANFILES += \$($k)\n"; + $output .= "DISTCLEANFILES "; + if ( $predefs{"DISTCLEANFILES"} ) { + $output .= "+"; + $predefs{"DISTCLEANFILES"} = 1; + } + $output .= "= \$($k)\n"; } $output .= "\n"; } |