Index: c/src/lib/libbsp/Makefile.am
===================================================================
--- c/src/lib/libbsp/Makefile.am	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
+++ c/src/lib/libbsp/Makefile.am	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -0,0 +1,19 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+# If we are building a "real" BSP, then we need to descend into the
+# appropriate CPU specific directory.  The bare BSP is a special
+# case which can be built for any CPU and it resides at the same
+# level as the CPUs.  If we are building the bare BSP, then descend
+# into that directory.
+
+SUBDIRS += shmdr @RTEMS_LIBBSP_CPU_SUBDIR@
+
+EXTRA_DIST = MERGE.PROCEDURE bsp.am
+
+include $(top_srcdir)/../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/Makefile.in
===================================================================
--- c/src/lib/libbsp/Makefile.in	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ 	(revision )
@@ -1,71 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = .
-
-ACLOCAL = aclocal
-AUTOCONF = autoconf
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-ACLOCAL_AMFLAGS = -I @RTEMS_TOPdir@/aclocal
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/directory.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_ROOT)/@RTEMS_BSP@/lib
-
-$(INSTALLDIRS):
-	@$(mkinstalldirs) $(INSTALLDIRS)
-
-# shmdr is a portable shared memory MPCI layer
-# We only build it if HAS_MP was defined
-@HAS_MP_TRUE@MP_DRIVERS = shmdr
-
-SUBDIRS = $(MP_DRIVERS)
-
-# If we are building a "real" BSP, then we need to descend into the
-# appropriate CPU specific directory.  The bare BSP is a special
-# case which can be built for any CPU and it resides at the same
-# level as the CPUs.  If we are building the bare BSP, then descend
-# into that directory.
-
-SUBDIRS += @RTEMS_LIBBSP_CPU_SUBDIR@
-
-preinstall: 
-	@$(mkinstalldirs) $(PROJECT_ROOT)/@RTEMS_BSP@/lib
-	@if test "@RTEMS_BSP@" = "bare"; then \
-	  $(INSTALL_CHANGE) -m 644 \
-	    $(srcdir)/bare/bsp_specs \
-	    $(PROJECT_ROOT)/@RTEMS_BSP@/lib; \
-	else \
-	  $(INSTALL_CHANGE) -m 644 \
-	    $(srcdir)/$(RTEMS_CPU)/${RTEMS_BSP_FAMILY}/bsp_specs \
-	    $(PROJECT_ROOT)/@RTEMS_BSP@/lib; \
-	fi
-
-# HACK: Don't let them fail here
-dist:
-distdir:
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
-	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4)
-	cd $(srcdir) && $(AUTOCONF)
Index: c/src/lib/libbsp/configure.in
===================================================================
--- c/src/lib/libbsp/configure.in	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ c/src/lib/libbsp/configure.in	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -9,10 +9,8 @@
 
 RTEMS_CANONICAL_TARGET_CPU
-AC_PROG_MAKE_SET
-AC_PROG_INSTALL
+AM_INIT_AUTOMAKE(rtems-c-src-lib-libbsp,$RTEMS_VERSION,no)
 AM_MAINTAINER_MODE
 
 RTEMS_ENABLE_MULTIPROCESSING
-RTEMS_ENABLE_NETWORKING
 RTEMS_ENABLE_LIBCDIR
 RTEMS_ENABLE_BARE
@@ -31,5 +29,4 @@
 RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
 RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
-RTEMS_CHECK_NETWORKING(RTEMS_BSP)
 
 RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
@@ -58,44 +55,11 @@
 fi
 AC_SUBST(RTEMS_LIBBSP_CPU_SUBDIR)
-
-if test ! -f ${srcdir}/${RTEMS_LIBBSP_CPU_SUBDIR}/configure.in
-then
-
-# find all the Makefiles for the BSPs
-  makefiles="$makefiles $RTEMS_CPU/Makefile"
-     
-  if test -d "$srcdir/$bspcpudir$bspdir"; then
-    RTEMS_CHECK_MAKEFILE(${bspcpudir}$bspdir)
-    RTEMS_CHECK_MAKEFILE(${bspcpudir}shared)
-
-    # HACK: sed out bsp-tools from makefiles
-    t="$bspcpudir$bspdir/tools"
-    if test -d "$srcdir/$t"; then
-      bsptools_cfgdirs="$bsptools_cfgdirs $t"
-      makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
-    fi
-  else
-    AC_MSG_ERROR([unable to find libbsp subdirectory ($bspdir) for  ${RTEMS_BSP}])
-  fi
-else
-  cfg_subdirs="$RTEMS_LIBBSP_CPU_SUBDIR"
-fi
-
-if test "$HAS_MP" = "yes"; then
-  makefiles="$makefiles shmdr/Makefile"
-else
-  # HACK: sed out shmsupp/Makefile from makefiles
-  t="$bspcpudir$bspdir/shmsupp"
-  makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
-fi
+cfg_subdirs="$RTEMS_LIBBSP_CPU_SUBDIR"
 
 AM_CONDITIONAL(HAS_MP,test "$HAS_MP" = "yes")
-
-AC_CONFIG_SUBDIRS($bsptools_cfgdirs)
-
 AC_CONFIG_SUBDIRS($cfg_subdirs)
 
-# try to explicitly list a Makefile here 
+# Explicitly list all Makefiles
 AC_OUTPUT( 
 Makefile
-$makefiles)
+shmdr/Makefile)
Index: c/src/lib/libbsp/m68k/gen68360/network/Makefile.am
===================================================================
--- c/src/lib/libbsp/m68k/gen68360/network/Makefile.am	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ c/src/lib/libbsp/m68k/gen68360/network/Makefile.am	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -5,13 +5,10 @@
 AUTOMAKE_OPTIONS = foreign 1.4
 
-PGM = ${ARCH}/network.rel
+PGM = $(ARCH)/network.rel
 
 C_FILES = network.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-H_FILES =
-noinst_HEADERS = $(H_FILES)
-
-network_rel_OBJECTS = $(C_O_FILES)
+C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
+  
+OBJS = $(C_O_FILES)
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
@@ -24,12 +21,14 @@
 AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
 
-$(PGM): ${network_rel_OBJECTS}
+$(PGM): $(OBJS)
 	$(make-rel)
 
+# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
+
 if HAS_NETWORKING
-all-local: ${ARCH} $(PGM)
+all-local: $(ARCH) $(OBJS) $(PGM)
 endif
 
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
+.PRECIOUS: $(PGM)
 
 EXTRA_DIST = network.c
Index: c/src/lib/libbsp/m68k/mvme136/shmsupp/Makefile.am
===================================================================
--- c/src/lib/libbsp/m68k/mvme136/shmsupp/Makefile.am	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ c/src/lib/libbsp/m68k/mvme136/shmsupp/Makefile.am	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -5,8 +5,8 @@
 AUTOMAKE_OPTIONS = foreign 1.4
 
-PGM = ${ARCH}/shmsupp.rel
+PGM = $(ARCH)/shmsupp.rel
 
 C_FILES = addrconv.c getcfg.c lock.c mpisr.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
 
 OBJS = $(C_O_FILES)
@@ -19,12 +19,14 @@
 #
 
-$(PGM): ${OBJS}
+$(PGM): $(OBJS)
 	$(make-rel)
 
+# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
+
 if HAS_MP
-all-local: ${ARCH} $(OBJS) $(PGM)
+all-local: $(ARCH) $(OBJS) $(PGM)
 endif
 
-# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
+.PRECIOUS: $(PGM)
 
 EXTRA_DIST = addrconv.c getcfg.c lock.c mpisr.c
Index: c/src/lib/libbsp/shmdr/Makefile.am
===================================================================
--- c/src/lib/libbsp/shmdr/Makefile.am	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
+++ c/src/lib/libbsp/shmdr/Makefile.am	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -0,0 +1,57 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = $(ARCH)/shmdr.rel
+
+C_FILES = addlq.c cnvpkt.c getlq.c dump.c fatal.c getpkt.c init.c initlq.c \
+    intr.c mpisr.c poll.c receive.c retpkt.c send.c setckvec.c
+C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
+
+H_FILES = shm_driver.h mpci.h
+
+OBJS = $(C_O_FILES)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): $(OBJS)
+	$(make-rel)
+
+$(PROJECT_RELEASE)/lib/shmdr$(LIB_VARIANT).rel: $(ARCH)/shmdr.rel
+	$(INSTALL_DATA) $< $@
+
+# the .rel file built here will be put into libbsp.a by
+#   ../$(RTEMS_BSP_FAMILY)/wrapup/Makefile
+
+$(PROJECT_INCLUDE):
+	$(mkinstalldirs) $@
+
+$(PROJECT_INCLUDE)/shm_driver.h: shm_driver.h
+	$(INSTALL_DATA) $< $@
+
+$(PROJECT_INCLUDE)/mpci.h: mpci.h
+	$(INSTALL_DATA) $< $@
+
+PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/shm_driver.h \
+    $(PROJECT_INCLUDE)/mpci.h
+
+TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/shmdr$(LIB_VARIANT).rel
+
+if HAS_MP
+all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(PGM) $(TMPINSTALL_FILES)
+endif
+
+.PRECIOUS: $(PGM)
+
+EXTRA_DIST = README addlq.c cnvpkt.c dump.c fatal.c getlq.c getpkt.c init.c \
+    initlq.c intr.c mpci.h mpisr.c poll.c receive.c retpkt.c send.c \
+    setckvec.c shm_driver.h
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libbsp/shmdr/Makefile.in
===================================================================
--- c/src/lib/libbsp/shmdr/Makefile.in	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ 	(revision )
@@ -1,79 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = shmdr
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-PGM = ${ARCH}/shmdr.rel
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = addlq cnvpkt getlq dump fatal getpkt init initlq intr mpisr poll \
-    receive retpkt send setckvec
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_PIECES = shm_driver mpci
-H_FILES = $(H_PIECES:%=$(srcdir)/%.h)
-
-SRCS = $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_INCLUDE)
-
-$(INSTALLDIRS):
-	@$(mkinstalldirs) $(INSTALLDIRS)
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS +=
-LDFLAGS +=
-
-#
-# Add your list of files to delete here.  The config files
-#  already know how to delete some stuff, so you may want
-#  to just run 'make clean' first to see what gets missed.
-#  'make clobber' already includes 'make clean'
-#
-
-CLEAN_ADDITIONS +=
-CLOBBER_ADDITIONS +=
-
-$(PGM): ${OBJS}
-	$(make-rel)
-
-all: preinstall ${ARCH} $(SRCS) $(PGM)
-	$(INSTALL_VARIANT) -m 644 $(PGM) $(PROJECT_RELEASE)/lib
-
-# the .rel file built here will be put into libbsp.a by
-#   ../$(RTEMS_BSP_FAMILY)/wrapup/Makefile
-
-preinstall: 
-	@$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
-
-EXTRA_DIST = README
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/lib/libcpu/Makefile.am
===================================================================
--- c/src/lib/libcpu/Makefile.am	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
+++ c/src/lib/libcpu/Makefile.am	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -0,0 +1,11 @@
+## 
+## $Id$
+## 
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SUBDIRS = @RTEMS_CPU_SUBDIR@
+
+include $(top_srcdir)/../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../automake/local.am
Index: src/lib/libcpu/Makefile.in
===================================================================
--- c/src/lib/libcpu/Makefile.in	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = .
-
-ACLOCAL = aclocal
-AUTOCONF = autoconf
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-ACLOCAL_AMFLAGS = -I @RTEMS_TOPdir@/aclocal
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/directory.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-
-SUBDIRS = $(wildcard $(RTEMS_CPU))
-
-#HACK: Don't let them fail here
-dist:
-distdir:
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
-	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4)
-	cd $(srcdir) && $(AUTOCONF)
Index: c/src/lib/libcpu/configure.in
===================================================================
--- c/src/lib/libcpu/configure.in	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ c/src/lib/libcpu/configure.in	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -8,36 +8,19 @@
 AC_CONFIG_AUX_DIR(../../../..)
 
-AC_PROG_MAKE_SET
 RTEMS_CANONICAL_TARGET_CPU
-
+AM_INIT_AUTOMAKE(rtems-c-src-lib-libcpu,$RTEMS_VERSION,no)
 AM_MAINTAINER_MODE
-
-RTEMS_ENABLE_LIBCDIR
-RTEMS_ENABLE_BARE
-
-RTEMS_ENV_RTEMSBSP
-
-AC_PROG_INSTALL
 
 RTEMS_CHECK_CPU
 RTEMS_CANONICAL_HOST
 
-RTEMS_PROJECT_ROOT
-
-dnl check target cc
-RTEMS_PROG_CC_FOR_TARGET
-RTEMS_CANONICALIZE_TOOLS
-
-RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-
 # find all the CPU dependent library Makefiles
 if test -f $srcdir/$RTEMS_CPU/configure.in; then
-  cfg_subdirs="$RTEMS_CPU"
-else
-  RTEMS_CHECK_MAKEFILE($RTEMS_CPU)
+  RTEMS_CPU_SUBDIR="$RTEMS_CPU"
 fi
-AC_CONFIG_SUBDIRS($cfg_subdirs)
+AC_SUBST(RTEMS_CPU_SUBDIR)
+
+AC_CONFIG_SUBDIRS($RTEMS_CPU_SUBDIR)
 
 AC_OUTPUT( 
-Makefile
-$makefiles)
+Makefile)
Index: scripts-ada/configure.in
===================================================================
--- scripts-ada/configure.in	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ scripts-ada/configure.in	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -48,4 +48,5 @@
 binutils/Makefile
 gnatnewlib/Makefile
-gdb/Makefile
+gdb/Makefile,,
+chmod 755 buildall
 )
Index: scripts/configure.in
===================================================================
--- scripts/configure.in	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ scripts/configure.in	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -49,4 +49,5 @@
 gccnewlib/Makefile
 gdb/Makefile
-rtems/Makefile
+rtems/Makefile,,
+chmod 755 buildall
 )
Index: scripts/setup.def
===================================================================
--- scripts/setup.def	(revision 8505e9b387aaf2d2649b54e1c811dc504c30390d)
+++ scripts/setup.def	(revision 847dbbe6c70c6695803252b9f5132d777f9df3e7)
@@ -1,3 +1,7 @@
+#
 # RTEMS tools setup
+#
+# $Id$
+#
 binutils_version=2.9.5.0.22
 binutils_patch_version=20000114
