Index: polish3
===================================================================
--- ampolish3	(revision 21275b58a5a69c3c838082ffc8a7a3641f32ea9a)
+++ 	(revision )
@@ -1,274 +1,0 @@
-#! /usr/bin/env perl
-#
-# Copyright (C) 2005, 2006 Ralf CorsÃ©pius, Ulm, Germany
-#
-# Permission to use, copy, modify, and distribute this software
-# is freely granted, provided that this notice is preserved.
-
-# Helper script to generate pre/tmpinstall rules for RTEMS Makefile.am.
-#
-# Usage: ampolish3 Makefile.am > preinstall.am
-#
-# Reads a Makefile.am from stdin and writes corresponding
-# pre/tmpinstall rules to stdout.
-
-sub replace($);
-sub print_dirstamp($$$);
-
-# Predefined directory mappings:
-#
-# final-installation directory => temp installation directory
-my %dirmap = (
-   '$(includedir)' 		=> '$(PROJECT_INCLUDE)',
-   '$(libdir)' 			=> '$(PROJECT_LIB)',
-   '$(project_libdir)' 		=> '$(PROJECT_LIB)',
-   '$(project_includedir)' 	=> '$(PROJECT_INCLUDE)'
-  );
-
-# Conventions on automake primaries:
-#
-# *_HEADERS -> preinstall
-# noinst*_HEADERS -> noinst
-# noinst_*_LIBRARIES -> noinst
-# project_*_LIBRARIES -> tmpinstall
-# *_LIBRARIES -> ignore (no preinstallation)
-# dist_project_*_DATA -> preinstall (linkcmds, etc)
-# project_*_DATA -> tmpinstall (*.o, *.a)
-# dist_*_DATA -> ignore (no preinstallation)
-# *SCRIPTS -> ignore (no preinstallation)
-# noinst_*_PROGRAMS -> noinst
-# project_*_PROGRAMS -> tmpinstall
-# *_PROGRAMS -> ignore (no preinstallation)
-
-## 1st pass: read in file
-my @buffer1 = () ;
-my %seen = ();
-my %predefs = ();
-
-{
-  my $mode = 0 ;
-  my $line = '';
-
-  while ( <> )
-  {
-    if ( $mode == 0 )
-    {
-      if ( /^([a-zA-Z0-9_]+\s*[\+]?[:=].*)\\$/o )
-      {
-        $line = "$1" ;
-        $mode = 1;
-      } else {
-        push @buffer1, $_ ;
-      }
-    } elsif ( $mode == 1 ) {
-      if ( /^(.*)\\$/o ) {
-        $line .= $1;
-      } else {
-        $line .= $_ ;
-        push @buffer1, $line ;
-        $line = '';
-        $mode = 0 ;
-      }
-    }
-  }
-}
-
-#foreach my $l ( @buffer1 ) { print STDERR "1:<$l>"; }
-
-# Filter out all Makefile code not relevant here
-my @buffer2 = ();
-foreach my $l ( @buffer1 ) {
-  if ( $l=~ /^\t.*$/o )
-  { #ignore: Production of a make rule.
-  } elsif ( $l =~ /^\s*([a-zA-Z0-9_]*dir)\s*\=\s*(.*)\s*$/o )
-  { # dirs
-    push @buffer2, "$l";
-    $dirmap{"\$\($1\)"} = replace($2);
-  } elsif ( $l =~ /^\s*noinst_(.*)\s*[\+]?\=(.*)$/o )
-  {
-    #ignore: noinst_* are not relevant here.
-  } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_|)([a-zA-Z0-9_]+)_(HEADERS|LIBRARIES|DATA|SCRIPTS|PROGRAMS)\s*([\+]?\=)\s*(.*)/o )
-  {
-    if ( ( "$5" eq '=' ) ) {
-      my $v = $dirmap{"\$\($3dir\)"};
-      if ( $v =~ /\$\(PROJECT_[^\)]+\)$/ )
-      {
-         $predefs{"$v"} = 1;
-      }
-    }
-    foreach my $f ( split(' ',$6) ) {
-      push @buffer2, "$1$2$3_$4 +=$f\n";
-    }
-  } elsif ( $l =~ /^\s*(if|else|endif)\s*.*$/o )
-  { # conditionals
-    push @buffer2, "$l";
-  }
-
-  # Check if Makefile.am already contains CLEANFILES or DISTCLEANFILES
-  if ( $l =~ /^\s*(CLEANFILES|DISTCLEANFILES|SUBDIRS)\s*\=.*$/o )
-  {
-    $predefs{"$1"} = 1;
-  }
-}
-
-if ( $predefs{"\$(PROJECT_INCLUDE)"} ){
-  unshift @buffer2, "includedir = \$(includedir)\n";
-}
-if ( $predefs{"\$(PROJECT_LIB)"} ){
-  unshift @buffer2, "libdir = \$(libdir)\n";
-}
-
-# foreach my $l ( @buffer2 ) { print STDERR "2:<$l>"; }
-
-my @buffer3 = ();
-
-foreach my $l ( @buffer2 ) {
- if ( $l =~ /^\s*([a-zA-Z0-9_]*dir)\s*\=\s*(.*)\s*$/o )
-  { # dirs
-    my $v = $dirmap{"\$\($1\)"};
-    print_dirstamp(\@buffer3,$v,"PREINSTALL_DIRS");
-    $seen{"PREINSTALL_DIRS"} = 1;
-  } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_|)([a-zA-Z0-9_]+)_HEADERS\s*\+\=(.*)/o )
-  { # preinstall
-    my $v = $dirmap{"\$\($3dir\)"};
-    my $f = $4;
-    my $x ; my $i = rindex($f,'/');
-    if ($i < 0) { $x="$f";
-    } else { $x = substr($f,$i+1);
-    }
-    push @buffer3,
-          "$v/$x: $f $v/\$(dirstamp)\n",
-          "\t\$(INSTALL_DATA) \$< $v/$x\n",
-          "PREINSTALL_FILES += $v/$x\n\n";
-    $seen{"PREINSTALL_FILES"} = 1;
-  } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_)([a-zA-Z0-9_]+)_LIBRARIES\s*\+\=(.*)/o )
-  { # tmpinstall
-    my $v = $dirmap{"\$\($3dir\)"};
-    my $f = $4;
-    my $x ; my $i = rindex($f,'/');
-    if ($i < 0) { $x="$f";
-    } else { $x = substr($f,$i+1);
-    }
-    push @buffer3,
-          "$v/$x: $f $v/\$(dirstamp)\n",
-          "\t\$(INSTALL_DATA) \$< $v/$x\n",
-          "TMPINSTALL_FILES += $v/$x\n\n";
-    $seen{"TMPINSTALL_FILES"} = 1;
-  } elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_LIBRARIES\s*\+\=(.*)/o )
-  { # ignore
-  } elsif ( $l =~ /^\s*(dist_)(project_)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
-  { # preinstall
-    my $v = $dirmap{"\$\($3dir\)"};
-    my $f = $4;
-    my $x ; my $i = rindex($f,'/');
-    if ($i < 0) { $x="$f";
-    } else { $x = substr($f,$i+1);
-    }
-    push @buffer3,
-          "$v/$x: $f $v/\$(dirstamp)\n",
-          "\t\$(INSTALL_DATA) \$< $v/$x\n",
-          "PREINSTALL_FILES += $v/$x\n\n";
-    $seen{"PREINSTALL_FILES"} = 1;
-  } elsif ( $l =~ /^\s*(nodist_|)(project_)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
-  { # tmpinstall
-    my $v = $dirmap{"\$\($3dir\)"};
-    my $f = $4;
-    my $x ; my $i = rindex($f,'/');
-    if ($i < 0) { $x="$f";
-    } else { $x = substr($f,$i+1);
-    }
-    push @buffer3,
-          "$v/$x: $f $v/\$(dirstamp)\n",
-          "\t\$(INSTALL_DATA) \$< $v/$x\n",
-          "TMPINSTALL_FILES += $v/$x\n\n";
-    $seen{"TMPINSTALL_FILES"} = 1;
-  } elsif ( $l =~ /^\s*(dist_|)([a-zA-Z0-9_]+)_DATA\s*\+\=(.*)/o )
-  { # ignore
-  } elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_SCRIPTS\s*\+\=(.*)/o )
-  { # ignore
-  } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_)([a-zA-Z0-9_]+)_PROGRAMS\s*\+\=(.*)/o )
-  { # tmpinstall
-    my $v = $dirmap{"\$\($3dir\)"};
-
-    my $f = $4;
-    my $x ; my $i = rindex($f,'/');
-    if ($i < 0) { $x="$f";
-    } else { $x = substr($f,$i+1);
-    }
-    push @buffer3,
-          "$v/$x: $f $v/\$(dirstamp)\n",
-          "\t\$(INSTALL_PROGRAM) \$< $v/$x\n",
-          "TMPINSTALL_FILES += $v/$x\n\n";
-    $seen{"TMPINSTALL_FILES"} = 1;
-  } elsif ( $l =~ /^\s*(nodist_|dist_|)([a-zA-Z0-9_]+)_PROGRAMS\s*\+\=(.*)/o )
-  { # ignore
-  } elsif ( $l =~ /^\s*(if|else|endif)\s*.*$/o )
-  { # conditionals
-    push @buffer3, "$l";
-  }
-}
-
-# foreach my $l ( @buffer3 ) { print STDERR "3:<$l>"; }
-
-my $output;
-$output .= "## Automatically generated by ampolish3 - Do not edit\n\n";
-$output .=  "if AMPOLISH3\n";
-$output .=  "\$(srcdir)/preinstall.am: Makefile.am\n";
-$output .= "\t\$(AMPOLISH3) \$(srcdir)/Makefile.am > \$(srcdir)/preinstall.am\n";
-$output .= "endif\n\n";
-
-foreach my $k ( sort keys %seen )
-{
-  if ( $k =~ /PREINSTALL_FILES/o ) {
-    $output .= "all-am: \$(PREINSTALL_FILES)\n\n";
-
-    $output .= "$k =\n";
-    $output .= "CLEANFILES ";
-    if ( $predefs{"CLEANFILES"} ) { $output .= "+"; }
-    $output .= "= \$($k)\n";
-    $predefs{"CLEANFILES"} = 1;
-  } elsif ( $k =~ /TMPINSTALL_FILES/o ) {
-
-    $output .= "all-local: \$(TMPINSTALL_FILES)\n\n";
-
-    $output .= "$k =\n";
-    $output .= "CLEANFILES ";
-    if ( $predefs{"CLEANFILES"} ) { $output .= "+"; }
-    $output .= "= \$($k)\n";
-    $predefs{"CLEANFILES"} = 1;
-  } elsif ( $k =~ /.*DIRS/o ) {
-    $output .= "$k =\n";
-    $output .= "DISTCLEANFILES ";
-    if ( $predefs{"DISTCLEANFILES"} ) { $output .= "+"; }
-    $output .= "= \$($k)\n";
-    $predefs{"DISTCLEANFILES"} = 1;
-  }
-  $output .= "\n";
-}
-
-# Pretty printing
-$output .= join ( '', @buffer3 );
-$output =~ s/\nelse\n+endif/\nendif/g;
-$output =~ s/\n\n+endif/\nendif/g;
-$output =~ s/\nif [a-zA-Z0-9_!]+\n+endif//g;
-print STDOUT $output;
-
-exit 0;
-
-sub replace($)
-{
-  my ($v) = @_;
-  foreach my $i ( sort keys %dirmap )
-  {
-    $v =~ s/\Q$i/$dirmap{$i}/g;
-  }
-  return $v;
-}
-
-sub print_dirstamp($$$)
-{
-  my ($obuf,$file,$inst) = @_ ;
-  push @{$obuf}, "$file/\$(dirstamp):\n\t\@\$\(MKDIR_P\) $file\n" ;
-  push @{$obuf}, "\t\@: \> $file/\$(dirstamp)\n" ;
-  push @{$obuf}, "$inst += $file/\$(dirstamp)\n\n" ;
-}
Index: c/src/aclocal/project-root.m4
===================================================================
--- c/src/aclocal/project-root.m4	(revision 21275b58a5a69c3c838082ffc8a7a3641f32ea9a)
+++ c/src/aclocal/project-root.m4	(revision 6b0a729bfd61a84097ca8d32c3ae9a2262fc288f)
@@ -2,5 +2,3 @@
 [dnl
 AC_REQUIRE([RTEMS_TOP])
-AC_REQUIRE([RTEMS_AMPOLISH3])
 ])
-
Index: src/aclocal/rtems-ampolish.m4
===================================================================
--- c/src/aclocal/rtems-ampolish.m4	(revision 21275b58a5a69c3c838082ffc8a7a3641f32ea9a)
+++ 	(revision )
@@ -1,10 +1,0 @@
-AC_DEFUN([RTEMS_AMPOLISH3],
-[
-AC_REQUIRE([AM_INIT_AUTOMAKE])
-AC_PATH_PROG([PERL],[perl],[])
-AC_SUBST(AMPOLISH3,["\$(PERL) ${am_aux_dir}/ampolish3"])
-AM_CONDITIONAL([AMPOLISH3],
-[test x"$USE_MAINTAINER_MODE" = x"yes" \
-  && test -n "${PERL}"])
-])
-
Index: c/src/lib/libbsp/powerpc/mvme3100/configure.ac
===================================================================
--- c/src/lib/libbsp/powerpc/mvme3100/configure.ac	(revision 21275b58a5a69c3c838082ffc8a7a3641f32ea9a)
+++ c/src/lib/libbsp/powerpc/mvme3100/configure.ac	(revision 6b0a729bfd61a84097ca8d32c3ae9a2262fc288f)
@@ -17,8 +17,4 @@
 AS=$CC
 AM_PROG_AS
-
-dnl AC_PATH_PROG([AMPOLISH3],[ampolish3],[])
-dnl AM_CONDITIONAL([AMPOLISH3],[test x"$USE_MAINTAINER_MODE" = x"yes" \
-dnl   && test -n "$AMPOLISH3"])
 
 RTEMS_BSPOPTS_SET_DATA_CACHE_ENABLED([*],[1])
Index: ukit/aclocal/rtems-ampolish.m4
===================================================================
--- cpukit/aclocal/rtems-ampolish.m4	(revision 21275b58a5a69c3c838082ffc8a7a3641f32ea9a)
+++ 	(revision )
@@ -1,10 +1,0 @@
-AC_DEFUN([RTEMS_AMPOLISH3],
-[
-AC_REQUIRE([AM_MAINTAINER_MODE])
-AC_PATH_PROG([PERL],[perl],[])
-AC_SUBST(AMPOLISH3,["\$(PERL) ${am_aux_dir}/ampolish3"])
-AM_CONDITIONAL([AMPOLISH3],
-[test x"$USE_MAINTAINER_MODE" = x"yes" \
-  && test -n "${PERL}"])
-])
-
Index: cpukit/configure.ac
===================================================================
--- cpukit/configure.ac	(revision 21275b58a5a69c3c838082ffc8a7a3641f32ea9a)
+++ cpukit/configure.ac	(revision 6b0a729bfd61a84097ca8d32c3ae9a2262fc288f)
@@ -377,6 +377,4 @@
 AM_CONDITIONAL([CPU_X86_64],[test $RTEMS_CPU = "x86_64"])
 
-RTEMS_AMPOLISH3
-
 # Explicitly list all Makefiles here
 AC_CONFIG_FILES([
