Index: c/src/lib/libbsp/powerpc/shared/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/shared/ChangeLog	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/ChangeLog	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -1,2 +1,19 @@
+2003-12-02	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* bootloader/Makefile.am: Put all files into EXTRA_DIST.
+	* vme/Makefile.am: Ditto.
+	* console/Makefile.am: Move H_FILES to include_bsp_HEADERS.
+	Add preinstallation dirstamp support.
+	* irq/Makefile.am: Ditto.
+	* motorola/Makefile.am: Ditto.
+	* openpic/Makefile.am: Ditto.
+	* pci/Makefile.am: Ditto.
+	* residual/Makefile.am: Ditto.
+	* vectors/Makefile.am: Ditto.
+	* Makefile.am: Remove empty lines.
+	* clock/Makefile.am: Ditto.
+	* include/Makefile.am: Ditto.
+	* startup/Makefile.am: Ditto.
+
 2003-10-22	Joel Sherrill <joel@OARcorp.com>
 
Index: c/src/lib/libbsp/powerpc/shared/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 if need_shared
Index: c/src/lib/libbsp/powerpc/shared/bootloader/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/bootloader/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/bootloader/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,15 +3,11 @@
 ##
 
+EXTRA_DIST = em86.c lib.c misc.c mm.c pci.c zlib.c
 
-C_FILES = em86.c lib.c misc.c mm.c pci.c zlib.c
+EXTRA_DIST += bootldr.h zlib.h pci.h
 
-H_FILES = bootldr.h zlib.h pci.h
+EXTRA_DIST += em86real.S exception.S head.S
 
-S_FILES = em86real.S exception.S head.S
-
-noinst_DATA = ppcboot.lds
-
-EXTRA_DIST = README bootldr.h em86.c em86real.S exception.S head.S lib.c \
-    misc.c mm.c pci.c pci.h ppcboot.lds zlib.c zlib.h
+EXTRA_DIST += ppcboot.lds
 
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/clock/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/clock/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/clock/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 C_FILES = p_clock.c
Index: c/src/lib/libbsp/powerpc/shared/console/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/console/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/console/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,22 +3,31 @@
 ##
 
-
 C_FILES = console.c inch.c polled_io.c uart.c reboot.c
 
-H_FILES = consoleIo.h keyboard.h uart.h
-
-$(PROJECT_INCLUDE)/bsp:
-	$(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/bsp/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp \
-    $(H_FILES:%.h=$(PROJECT_INCLUDE)/bsp/%.h)
+include_bspdir = $(includedir)/bsp
+include_bsp_HEADERS = consoleIo.h keyboard.h uart.h
 
 all-local: $(PREINSTALL_FILES)
 
-EXTRA_DIST = console.c inch.c polled_io.c uart.c \
-    reboot.c console.inl
+EXTRA_DIST = console.c inch.c polled_io.c uart.c reboot.c console.inl
+
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/bsp/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+	@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/consoleIo.h: consoleIo.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/consoleIo.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/consoleIo.h
+
+$(PROJECT_INCLUDE)/bsp/keyboard.h: keyboard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/keyboard.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/keyboard.h
+
+$(PROJECT_INCLUDE)/bsp/uart.h: uart.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/uart.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/uart.h
 
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/include/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/include/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/include/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,5 +3,4 @@
 ##
 
-
 noinst_HEADERS = nvram.h bsp.h
 
Index: c/src/lib/libbsp/powerpc/shared/irq/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/irq/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/irq/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 C_FILES = i8259.c irq.c irq_init.c
@@ -11,16 +10,18 @@
 S_FILES = irq_asm.S
 
-$(PROJECT_INCLUDE)/bsp:
-	$(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/bsp/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp \
-    $(include_bsp_HEADERS:%=$(PROJECT_INCLUDE)/bsp/%)
-
 all-local: $(PREINSTALL_FILES)
 
 EXTRA_DIST = i8259.c irq.c irq_asm.S irq_init.c
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/bsp/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+	@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/irq.h: irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
+
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/motorola/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/motorola/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/motorola/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,21 +3,23 @@
 ##
 
-
 C_FILES = motorola.c
 
-H_FILES = motorola.h
-
-$(PROJECT_INCLUDE)/bsp:
-	$(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/bsp/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp \
-    $(H_FILES:%.h=$(PROJECT_INCLUDE)/bsp/%.h)
+include_bspdir = $(includedir)/bsp
+include_bsp_HEADERS = motorola.h
 
 all-local: $(PREINSTALL_FILES)
 
-EXTRA_DIST = motorola.c motorola.h
+EXTRA_DIST = motorola.c
+
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/bsp/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+	@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/motorola.h: motorola.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/motorola.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/motorola.h
 
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/openpic/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/openpic/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/openpic/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,17 +3,8 @@
 ##
 
-
 C_FILES = openpic.c
 
-H_FILES = openpic.h
-
-$(PROJECT_INCLUDE)/bsp:
-	$(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/bsp/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp \
-    $(include_bsp_HEADERS:%=$(PROJECT_INCLUDE)/bsp/%)
+include_bspdir = $(includedir)/bsp
+include_bsp_HEADERS = openpic.h
 
 all-local: $(PREINSTALL_FILES)
@@ -21,3 +12,14 @@
 EXTRA_DIST = openpic.c
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/bsp/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+	@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/openpic.h: openpic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/openpic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/openpic.h
+
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/pci/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/pci/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/pci/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,21 +3,23 @@
 ##
 
-
 C_FILES = pci.c detect_raven_bridge.c pcifinddevice.c
 
-H_FILES = pci.h
-
-$(PROJECT_INCLUDE)/bsp:
-	$(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/bsp/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp \
-    $(H_FILES:%.h=$(PROJECT_INCLUDE)/bsp/%.h)
+include_bspdir = $(includedir)/bsp
+include_bsp_HEADERS = pci.h
 
 all-local: $(PREINSTALL_FILES)
 
-EXTRA_DIST = pci.c pci.h detect_raven_bridge.c pcifinddevice.c
+EXTRA_DIST = pci.c detect_raven_bridge.c pcifinddevice.c
+
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/bsp/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+	@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/pci.h: pci.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/pci.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/pci.h
 
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/residual/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/residual/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/residual/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,17 +3,8 @@
 ##
 
-
 C_FILES = residual.c
 
-H_FILES = pnp.h residual.h
-
-$(PROJECT_INCLUDE)/bsp:
-	$(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/bsp/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp \
-    $(H_FILES:%.h=$(PROJECT_INCLUDE)/bsp/%.h)
+include_bspdir = $(includedir)/bsp
+include_bsp_HEADERS = pnp.h residual.h
 
 all-local: $(PREINSTALL_FILES)
@@ -21,3 +12,18 @@
 EXTRA_DIST = residual.c
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/bsp/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+	@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/pnp.h: pnp.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/pnp.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/pnp.h
+
+$(PROJECT_INCLUDE)/bsp/residual.h: residual.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/residual.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/residual.h
+
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/startup/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/startup/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/startup/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 C_FILES = bspstart.c pgtbl_setup.c pgtbl_activate.c 
@@ -8,5 +7,5 @@
 noinst_DATA = linkcmds
 
-EXTRA_DIST = bspstart.c linkcmds  pgtbl_setup.c pgtbl_activate.c 
+EXTRA_DIST = bspstart.c linkcmds pgtbl_setup.c pgtbl_activate.c 
 
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/vectors/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/vectors/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/vectors/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,23 +3,25 @@
 ##
 
-
 C_FILES = vectors_init.c
 
-H_FILES = vectors.h
+include_bspdir = $(includedir)/bsp
+include_bsp_HEADERS = vectors.h
 
 S_FILES = vectors.S
 
-$(PROJECT_INCLUDE)/bsp:
-	$(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/bsp/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp \
-    $(H_FILES:%.h=$(PROJECT_INCLUDE)/bsp/%.h)
-
 all-local: $(PREINSTALL_FILES)
 
-EXTRA_DIST = vectors.S vectors.h vectors_init.c
+EXTRA_DIST = vectors.S vectors_init.c
+
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/bsp/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
+	@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/vectors.h: vectors.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/vectors.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/vectors.h
 
 include $(top_srcdir)/../../../automake/local.am
Index: c/src/lib/libbsp/powerpc/shared/vme/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/shared/vme/Makefile.am	(revision 1ca7bc9275d4611f014fcc115883f73c1ce38c5b)
+++ c/src/lib/libbsp/powerpc/shared/vme/Makefile.am	(revision a77cd06666febd2e8f34cd7d82ffe2062cf12552)
@@ -3,11 +3,6 @@
 ##
 
-AUTOMAKE_OPTIONS = foreign 1.4
-
-H_FILES = VMEConfig.h  VME.h
-
-C_FILES = vmeconfig.c
-
-EXTRA_DIST = vmeconfig.c
+# FIXME: This doesn't make much sense here
+EXTRA_DIST = vmeconfig.c VMEConfig.h VME.h
 
 include $(top_srcdir)/../../../automake/local.am
