Index: c/src/tests/samples/Makefile.am
===================================================================
--- c/src/tests/samples/Makefile.am	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ c/src/tests/samples/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -5,12 +5,4 @@
 AUTOMAKE_OPTIONS = foreign 1.4
 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-PREINSTALLDIRS = $(project_bspdir)/samples $(project_bspdir)/tests
-$(PREINSTALLDIRS):
-	@$(mkinstalldirs) $@
-
-all-local: $(PREINSTALLDIRS)
 
 CPLUSPLUS_TESTS = cdtest
@@ -21,6 +13,11 @@
 FP_TESTS = paranoia
 
-SUBDIRS = . hello ticker base_sp unlimited minimum $(MP_TESTS) \
+SUBDIRS = hello ticker base_sp unlimited minimum $(MP_TESTS) \
     $(CPLUSPLUS_TESTS) $(FP_TESTS)
+
+AUTOMAKE_FILES = \
+sample.am
+
+EXTRA_DIST = $(AUTOMAKE_FILES)
 
 include $(top_srcdir)/../../../../automake/subdirs.am
Index: c/src/tests/samples/base_mp/Makefile.am
===================================================================
--- c/src/tests/samples/base_mp/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/base_mp/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,13 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SUBDIRS = node1 node2
+
+EXTRA_DIST = apptask.c init.c system.h
+
+include $(top_srcdir)/../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/base_mp/Makefile.in
===================================================================
--- c/src/tests/samples/base_mp/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = base_mp
-
-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 = node1 node2
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/base_mp/node1/Makefile.am
===================================================================
--- c/src/tests/samples/base_mp/node1/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/base_mp/node1/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,59 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+VPATH = @srcdir@:@srcdir@/..
+
+NODE = 1
+SAMPLE = base_mp-node$(NODE)
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io mp
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c apptask.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=base_mp.%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+if HAS_MP
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I.
+
+#
+# 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'
+#
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+all-local: $(ARCH) $(TMPINSTALL_FILES)
+else
+all-local:
+endif
+
+EXTRA_DIST = $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/base_mp/node1/Makefile.in
===================================================================
--- c/src/tests/samples/base_mp/node1/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,75 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../..
-subdir = base_mp/node1
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 1
-SAMPLE = base_mp
-PGM = ${ARCH}/$(SAMPLE)-node$(NODE).exe
-
-MANAGERS = io mp
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init apptask
-C_FILES = @HAS_MP_TRUE@$(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES += -DNODE_NUMBER=$(NODE)
-CPPFLAGS += -I.
-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 +=
-
-#HACK: AM_CONDITIONAL
-all: @HAS_MP_TRUE@${ARCH} $(SRCS) $(PGM)
-@HAS_MP_TRUE@	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
-@HAS_MP_TRUE@	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/samples
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/base_mp/node2/Makefile.am
===================================================================
--- c/src/tests/samples/base_mp/node2/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/base_mp/node2/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,59 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+VPATH = @srcdir@:@srcdir@/..
+
+NODE = 2
+SAMPLE = base_mp-node$(NODE)
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io mp
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c apptask.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=base_mp.%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+if HAS_MP
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I.
+
+#
+# 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'
+#
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+all-local: $(ARCH) $(TMPINSTALL_FILES)
+else
+all-local:
+endif
+
+EXTRA_DIST = $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/base_mp/node2/Makefile.in
===================================================================
--- c/src/tests/samples/base_mp/node2/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,74 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ../..
-subdir = base_mp/node2
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@:@srcdir@/..
-
-NODE = 2
-SAMPLE = base_mp
-PGM = ${ARCH}/$(SAMPLE)-node$(NODE).exe
-
-MANAGERS = io mp
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init apptask
-C_FILES = @HAS_MP_TRUE@$(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES += -DNODE_NUMBER=$(NODE)
-CPPFLAGS += -I.
-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 +=
-
-all: @HAS_MP_TRUE@${ARCH} $(SRCS) $(PGM)
-@HAS_MP_TRUE@	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
-@HAS_MP_TRUE@	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/samples
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/base_sp/Makefile.am
===================================================================
--- c/src/tests/samples/base_sp/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/base_sp/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,43 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = base_sp
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c apptask.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST = $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/base_sp/Makefile.in
===================================================================
--- c/src/tests/samples/base_sp/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,73 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = base_sp
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-SAMPLE = base_sp
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init apptask
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (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 +=
-
-all: ${ARCH} $(SRCS) $(PGM)
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/samples
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/cdtest/Makefile.am
===================================================================
--- c/src/tests/samples/cdtest/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/cdtest/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,55 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = cdtest
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = all
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+# C++ source names, if any, go here -- minus the .cc
+CC_FILES = main.cc
+CC_O_FILES = $(CC_FILES:%.cc=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES)
+OBJS = $(C_O_FILES) $(CC_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+if HAS_CXX
+LD_LIBS += $(CPLUS_LD_LIBS)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+else
+all-local:
+endif
+
+EXTRA_DIST = $(C_FILES) $(CC_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/cdtest/Makefile.in
===================================================================
--- c/src/tests/samples/cdtest/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,79 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = cdtest
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-SAMPLE = cdtest
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = all
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init
-C_FILES = @HAS_CXX_TRUE@$(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-# C++ source names, if any, go here -- minus the .cc
-CC_PIECES = main
-CC_FILES = @HAS_CXX_TRUE@$(CC_PIECES:%=%.cc)
-CC_O_FILES = $(CC_PIECES:%=${ARCH}/%.o)
-H_FILES = system.h
-
-DOCTYPES =
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES)
-OBJS = $(C_O_FILES) $(CC_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-DEFINES +=
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS += $(CPLUS_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 +=
-
-all: @HAS_CXX_TRUE@ ${ARCH} $(SRCS) $(PGM)
-@HAS_CXX_TRUE@	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
-@HAS_CXX_TRUE@	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/samples
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/hello/Makefile.am
===================================================================
--- c/src/tests/samples/hello/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/hello/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,45 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = hello
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST += $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/hello/Makefile.in
===================================================================
--- c/src/tests/samples/hello/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,75 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = hello
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-SAMPLE = hello
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (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 +=
-
-all: ${ARCH} $(SRCS) $(PGM)
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/samples
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/minimum/Makefile.am
===================================================================
--- c/src/tests/samples/minimum/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/minimum/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,43 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = minimum
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = all
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+	# This test should not be executed
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST = $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/minimum/Makefile.in
===================================================================
--- c/src/tests/samples/minimum/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,74 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = minimum
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-SAMPLE = minimum
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = all
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES =
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (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 +=
-
-all: ${ARCH} $(SRCS) $(PGM)
-	# This test should not be executed
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/paranoia/Makefile.am
===================================================================
--- c/src/tests/samples/paranoia/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/paranoia/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,51 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = paranoia
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = all
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c paranoia.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+#  -DCYGNUS   turns on more verbose msgs
+#
+
+AM_CPPFLAGS += -DNOSIGNAL -DCYGNUS -DNOMAIN
+
+LD_LIBS += -lm
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST = $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/paranoia/Makefile.in
===================================================================
--- c/src/tests/samples/paranoia/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,77 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = paranoia
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-SAMPLE = paranoia
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = all
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init paranoia
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-#  -DCYGNUS   turns on more verbose msgs
-#
-
-DEFINES += -DNOSIGNAL -DCYGNUS -DNOMAIN
-CPPFLAGS +=
-CFLAGS +=
-
-LD_PATHS +=
-LD_LIBS += -lm
-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 +=
-
-all: ${ARCH} $(SRCS) $(PGM)
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/samples
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/ticker/Makefile.am
===================================================================
--- c/src/tests/samples/ticker/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/ticker/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,45 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = ticker
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c tasks.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST += $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/ticker/Makefile.in
===================================================================
--- c/src/tests/samples/ticker/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,75 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = ticker
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-SAMPLE = ticker
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init tasks
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (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 +=
-
-all: ${ARCH} $(SRCS) $(PGM)
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/samples
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/samples/unlimited/Makefile.am
===================================================================
--- c/src/tests/samples/unlimited/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ c/src/tests/samples/unlimited/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,45 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = unlimited
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io event
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c test1.c test2.c test3.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST = $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: src/tests/samples/unlimited/Makefile.in
===================================================================
--- c/src/tests/samples/unlimited/Makefile.in	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ 	(revision )
@@ -1,75 +1,0 @@
-#
-#  $Id$
-#
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-subdir = unlimited
-
-RTEMS_ROOT = @RTEMS_ROOT@
-PROJECT_ROOT = @PROJECT_ROOT@
-
-VPATH = @srcdir@
-
-SAMPLE = unlimited
-PGM = ${ARCH}/$(SAMPLE).exe
-
-MANAGERS = io event
-
-# C source names, if any, go here -- minus the .c
-C_PIECES = init test1 test2 test3
-C_FILES = $(C_PIECES:%=%.c)
-C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-
-H_FILES = system.h
-
-DOCTYPES = doc scn
-DOCS = $(DOCTYPES:%=$(SAMPLE).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(SAMPLE).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-PACKHEX = @PACKHEX@
-
-#
-# (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 +=
-
-all: ${ARCH} $(SRCS) $(PGM)
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
-	@$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/samples
-
-${PGM}: $(OBJS) $(LINK_FILES)
-	$(make-exe)
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	cd $(top_builddir) \
-	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: testsuites/samples/Makefile.am
===================================================================
--- testsuites/samples/Makefile.am	(revision 5fe4a10911353b723b86d11486683eb9238516b5)
+++ testsuites/samples/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -5,12 +5,4 @@
 AUTOMAKE_OPTIONS = foreign 1.4
 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
-
-project_bspdir=$(PROJECT_ROOT)/@RTEMS_BSP@
-
-PREINSTALLDIRS = $(project_bspdir)/samples $(project_bspdir)/tests
-$(PREINSTALLDIRS):
-	@$(mkinstalldirs) $@
-
-all-local: $(PREINSTALLDIRS)
 
 CPLUSPLUS_TESTS = cdtest
@@ -21,6 +13,11 @@
 FP_TESTS = paranoia
 
-SUBDIRS = . hello ticker base_sp unlimited minimum $(MP_TESTS) \
+SUBDIRS = hello ticker base_sp unlimited minimum $(MP_TESTS) \
     $(CPLUSPLUS_TESTS) $(FP_TESTS)
+
+AUTOMAKE_FILES = \
+sample.am
+
+EXTRA_DIST = $(AUTOMAKE_FILES)
 
 include $(top_srcdir)/../../../../automake/subdirs.am
Index: testsuites/samples/base_mp/Makefile.am
===================================================================
--- testsuites/samples/base_mp/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/base_mp/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,13 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SUBDIRS = node1 node2
+
+EXTRA_DIST = apptask.c init.c system.h
+
+include $(top_srcdir)/../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/base_mp/node1/Makefile.am
===================================================================
--- testsuites/samples/base_mp/node1/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/base_mp/node1/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,59 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+VPATH = @srcdir@:@srcdir@/..
+
+NODE = 1
+SAMPLE = base_mp-node$(NODE)
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io mp
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c apptask.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=base_mp.%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+if HAS_MP
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I.
+
+#
+# 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'
+#
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+all-local: $(ARCH) $(TMPINSTALL_FILES)
+else
+all-local:
+endif
+
+EXTRA_DIST = $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/base_mp/node2/Makefile.am
===================================================================
--- testsuites/samples/base_mp/node2/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/base_mp/node2/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,59 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+VPATH = @srcdir@:@srcdir@/..
+
+NODE = 2
+SAMPLE = base_mp-node$(NODE)
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io mp
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c apptask.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=base_mp.%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+if HAS_MP
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+AM_CPPFLAGS += -DNODE_NUMBER=$(NODE) -I.
+
+#
+# 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'
+#
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+all-local: $(ARCH) $(TMPINSTALL_FILES)
+else
+all-local:
+endif
+
+EXTRA_DIST = $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/base_sp/Makefile.am
===================================================================
--- testsuites/samples/base_sp/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/base_sp/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,43 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = base_sp
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c apptask.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST = $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/cdtest/Makefile.am
===================================================================
--- testsuites/samples/cdtest/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/cdtest/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,55 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = cdtest
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = all
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+# C++ source names, if any, go here -- minus the .cc
+CC_FILES = main.cc
+CC_O_FILES = $(CC_FILES:%.cc=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES)
+OBJS = $(C_O_FILES) $(CC_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+if HAS_CXX
+LD_LIBS += $(CPLUS_LD_LIBS)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+else
+all-local:
+endif
+
+EXTRA_DIST = $(C_FILES) $(CC_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/hello/Makefile.am
===================================================================
--- testsuites/samples/hello/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/hello/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,45 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = hello
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST += $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/minimum/Makefile.am
===================================================================
--- testsuites/samples/minimum/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/minimum/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,43 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = minimum
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = all
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+	# This test should not be executed
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST = $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/paranoia/Makefile.am
===================================================================
--- testsuites/samples/paranoia/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/paranoia/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,51 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = paranoia
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = all
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c paranoia.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+#  -DCYGNUS   turns on more verbose msgs
+#
+
+AM_CPPFLAGS += -DNOSIGNAL -DCYGNUS -DNOMAIN
+
+LD_LIBS += -lm
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST = $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/ticker/Makefile.am
===================================================================
--- testsuites/samples/ticker/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/ticker/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,45 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = ticker
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c tasks.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST += $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
Index: testsuites/samples/unlimited/Makefile.am
===================================================================
--- testsuites/samples/unlimited/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
+++ testsuites/samples/unlimited/Makefile.am	(revision e31c63e5a8bae5fbda548f4b65c423b0fc2ce58c)
@@ -0,0 +1,45 @@
+##
+##  $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
+
+SAMPLE = unlimited
+PGM = ${ARCH}/$(SAMPLE).exe
+
+MANAGERS = io event
+
+# C source names, if any, go here -- minus the .c
+C_FILES = init.c test1.c test2.c test3.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
+
+H_FILES = system.h
+noinst_HEADERS = $(H_FILES)
+
+DOCTYPES = doc scn
+DOCS = $(DOCTYPES:%=$(SAMPLE).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(SAMPLE).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+include $(top_srcdir)/sample.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+all-local: ${ARCH} $(TMPINSTALL_FILES)
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+EXTRA_DIST = $(C_FILES) $(DOCS)
+
+include $(top_srcdir)/../../../../automake/local.am
