Index: c/src/lib/libbsp/sparc/erc32/ChangeLog
===================================================================
--- c/src/lib/libbsp/sparc/erc32/ChangeLog	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/erc32/ChangeLog	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -1,2 +1,7 @@
+2006-01-10	Ralf Corsepius <ralf.corsepius@rtems.org>
+
+	* configure.ac: Add ampolish3 support.
+	* Makefile.am: Add preinstall.am.
+
 2006-01-10	Joel Sherrill <joel@OARcorp.com>
 
Index: c/src/lib/libbsp/sparc/erc32/Makefile.am
===================================================================
--- c/src/lib/libbsp/sparc/erc32/Makefile.am	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/erc32/Makefile.am	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -81,54 +81,7 @@
 
 EXTRA_DIST += times
+CLEANFILES =
 
-PREINSTALL_DIRS =
-PREINSTALL_FILES =
-TMPINSTALL_FILES =
-
-$(PROJECT_INCLUDE)/$(dirstamp):
-	@$(mkdir_p) $(PROJECT_INCLUDE)
-	@: > $(PROJECT_INCLUDE)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
-
-$(PROJECT_LIB)/$(dirstamp):
-	@$(mkdir_p) $(PROJECT_LIB)
-	@: > $(PROJECT_LIB)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
-
-$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
-PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
-
-$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
-
-$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
-
-$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
-
-$(PROJECT_INCLUDE)/erc32.h: include/erc32.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/erc32.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/erc32.h
-
-$(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
-
-$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
-
-$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
-PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-
-CLEANFILES = $(PREINSTALL_FILES)
-DISTCLEANFILES += $(PREINSTALL_DIRS)
-CLEANFILES += $(TMPINSTALL_FILES)
+include $(srcdir)/preinstall.am
 
 include $(top_srcdir)/../../../../automake/local.am
Index: c/src/lib/libbsp/sparc/erc32/configure.ac
===================================================================
--- c/src/lib/libbsp/sparc/erc32/configure.ac	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/erc32/configure.ac	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -45,4 +45,8 @@
  initialization not used on real ERC32 hardware.])
 
+AC_PATH_PROG([AMPOLISH3],[ampolish3],[])
+AM_CONDITIONAL([AMPOLISH3],[test x"$USE_MAINTAINER_MODE" = x"yes" \
+  && test -n "$AMPOLISH3"])
+
 # Explicitly list all Makefiles here
 AC_CONFIG_FILES([Makefile])
Index: c/src/lib/libbsp/sparc/leon2/ChangeLog
===================================================================
--- c/src/lib/libbsp/sparc/leon2/ChangeLog	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/leon2/ChangeLog	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -1,2 +1,7 @@
+2006-01-10	Ralf Corsepius <ralf.corsepius@rtems.org>
+
+	* configure.ac: Add ampolish3 support.
+	* Makefile.am: Add preinstall.am.
+
 2006-01-09	Ralf Corsepius <ralf.corsepius@rtems.org>
 
Index: c/src/lib/libbsp/sparc/leon2/Makefile.am
===================================================================
--- c/src/lib/libbsp/sparc/leon2/Makefile.am	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/leon2/Makefile.am	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -94,54 +94,7 @@
 
 EXTRA_DIST += times
+CLEANFILES =
 
-PREINSTALL_DIRS =
-PREINSTALL_FILES =
-TMPINSTALL_FILES =
-
-$(PROJECT_INCLUDE)/$(dirstamp):
-	@$(mkdir_p) $(PROJECT_INCLUDE)
-	@: > $(PROJECT_INCLUDE)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
-
-$(PROJECT_LIB)/$(dirstamp):
-	@$(mkdir_p) $(PROJECT_LIB)
-	@: > $(PROJECT_LIB)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
-
-$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
-PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
-
-$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
-
-$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
-
-$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
-
-$(PROJECT_INCLUDE)/leon.h: include/leon.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/leon.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/leon.h
-
-$(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
-
-$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
-
-$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
-PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-
-CLEANFILES = $(PREINSTALL_FILES)
-DISTCLEANFILES += $(PREINSTALL_DIRS)
-CLEANFILES += $(TMPINSTALL_FILES)
+include $(srcdir)/preinstall.am
 
 include $(top_srcdir)/../../../../automake/local.am
Index: c/src/lib/libbsp/sparc/leon2/configure.ac
===================================================================
--- c/src/lib/libbsp/sparc/leon2/configure.ac	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/leon2/configure.ac	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -38,4 +38,8 @@
  the wall time required to execute the RTEMS test suites.])
 
+AC_PATH_PROG([AMPOLISH3],[ampolish3],[])
+AM_CONDITIONAL([AMPOLISH3],[test x"$USE_MAINTAINER_MODE" = x"yes" \
+  && test -n "$AMPOLISH3"])
+
 # Explicitly list all Makefiles here
 AC_CONFIG_FILES([Makefile])
Index: c/src/lib/libbsp/sparc/leon3/ChangeLog
===================================================================
--- c/src/lib/libbsp/sparc/leon3/ChangeLog	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/leon3/ChangeLog	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -1,2 +1,7 @@
+2006-01-10	Ralf Corsepius <ralf.corsepius@rtems.org>
+
+	* configure.ac: Add ampolish3 support.
+	* Makefile.am: Add preinstall.am.
+
 2006-01-09	Ralf Corsepius <ralf.corsepius@rtems.org>
 
Index: c/src/lib/libbsp/sparc/leon3/Makefile.am
===================================================================
--- c/src/lib/libbsp/sparc/leon3/Makefile.am	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/leon3/Makefile.am	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -101,58 +101,7 @@
 
 EXTRA_DIST += times
+CLEANFILES =
 
-PREINSTALL_DIRS =
-PREINSTALL_FILES =
-TMPINSTALL_FILES =
-
-$(PROJECT_INCLUDE)/$(dirstamp):
-	@$(mkdir_p) $(PROJECT_INCLUDE)
-	@: > $(PROJECT_INCLUDE)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
-
-$(PROJECT_LIB)/$(dirstamp):
-	@$(mkdir_p) $(PROJECT_LIB)
-	@: > $(PROJECT_LIB)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
-
-$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
-PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
-
-$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
-
-$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
-
-$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
-
-$(PROJECT_INCLUDE)/leon.h: include/leon.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/leon.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/leon.h
-
-$(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
-
-$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
-
-$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
-PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-
-$(PROJECT_INCLUDE)/amba.h: include/amba.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/amba.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/amba.h
-
-CLEANFILES = $(PREINSTALL_FILES)
-DISTCLEANFILES += $(PREINSTALL_DIRS)
-CLEANFILES += $(TMPINSTALL_FILES)
+include $(srcdir)/preinstall.am
 
 include $(top_srcdir)/../../../../automake/local.am
Index: c/src/lib/libbsp/sparc/leon3/configure.ac
===================================================================
--- c/src/lib/libbsp/sparc/leon3/configure.ac	(revision dcf4e0f1b72e3c840aec647b0cc79333461391ec)
+++ c/src/lib/libbsp/sparc/leon3/configure.ac	(revision 4d8d47532dca39cc61d9f2ef90da09c61f705e3b)
@@ -38,4 +38,8 @@
  the wall time required to execute the RTEMS test suites.])
 
+AC_PATH_PROG([AMPOLISH3],[ampolish3],[])
+AM_CONDITIONAL([AMPOLISH3],[test x"$USE_MAINTAINER_MODE" = x"yes" \
+  && test -n "$AMPOLISH3"])
+
 # Explicitly list all Makefiles here
 AC_CONFIG_FILES([Makefile])
