Index: c/src/librdbg/ChangeLog
===================================================================
--- c/src/librdbg/ChangeLog	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/ChangeLog	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -1,2 +1,18 @@
+2003-12-01	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* Makefile.am: Reformat. Apply dirstamps to preinstallation.
+	* include/Makefile.am: Ditto.
+	* include/rdbg/Makefile.am: Ditto.
+	* include/rdbg/i386/Makefile.am: Ditto.
+	* include/rdbg/m68k/Makefile.am: Ditto.
+	* include/rdbg/powerpc/Makefile.am: Ditto:
+	* src/Makefile.am: Ditto.
+	* src/i386/Makefile.am: Ditto.
+	* src/i386/any/Makefile.am: Ditto.
+	* src/m68k/Makefile.am: Ditto.
+	* src/m68k/any/Makefile.am: Ditto.
+	* src/powerpc/Makefile.am: Ditto.
+	* src/powerpc/new_exception_processing/Makefile.am: Ditto.
+
 2003-08-22	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: c/src/librdbg/Makefile.am
===================================================================
--- c/src/librdbg/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -5,4 +5,6 @@
 SUBDIRS = include src
 
+PREINSTALL_FILES =
+
 include $(top_srcdir)/automake/subdirs.am
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/include/Makefile.am
===================================================================
--- c/src/librdbg/include/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/include/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -3,6 +3,7 @@
 ##
 
+SUBDIRS = rdbg
 
-SUBDIRS = rdbg
+PREINSTALL_FILES =
 
 include $(top_srcdir)/automake/subdirs.am
Index: c/src/librdbg/include/rdbg/Makefile.am
===================================================================
--- c/src/librdbg/include/rdbg/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/include/rdbg/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -7,12 +7,4 @@
 
 include_rdbg_HEADERS = rdbg.h servrpc.h
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/rdbg \
-    $(include_rdbg_HEADERS:%=$(PROJECT_INCLUDE)/rdbg/%)
-
-$(PROJECT_INCLUDE)/rdbg:
-	@$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rdbg/%.h: %.h
-	$(INSTALL_DATA) $< $@
 endif
 
@@ -24,4 +16,21 @@
 endif
 
+PREINSTALL_FILES =
+
+if HAS_RDBG
+$(PROJECT_INCLUDE)/rdbg/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rdbg
+	@: > $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+
+$(PROJECT_INCLUDE)/rdbg/rdbg.h: rdbg.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/rdbg.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/rdbg.h
+
+$(PROJECT_INCLUDE)/rdbg/servrpc.h: servrpc.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/servrpc.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/servrpc.h
+endif
+
 include $(top_srcdir)/automake/subdirs.am
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/include/rdbg/i386/Makefile.am
===================================================================
--- c/src/librdbg/include/rdbg/i386/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/include/rdbg/i386/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 include_rdbgdir = $(includedir)/rdbg
@@ -8,13 +7,20 @@
 include_rdbg_HEADERS = rdbg_f.h reg.h
 
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/rdbg \
-    $(include_rdbg_HEADERS:%=$(PROJECT_INCLUDE)/rdbg/%)
-
-$(PROJECT_INCLUDE)/rdbg:
-	@$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rdbg/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
 all-local: $(PREINSTALL_FILES)
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/rdbg/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rdbg
+	@: > $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+
+$(PROJECT_INCLUDE)/rdbg/rdbg_f.h: rdbg_f.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/rdbg_f.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/rdbg_f.h
+
+$(PROJECT_INCLUDE)/rdbg/reg.h: reg.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/reg.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/reg.h
+
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/include/rdbg/m68k/Makefile.am
===================================================================
--- c/src/librdbg/include/rdbg/m68k/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/include/rdbg/m68k/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 include_rdbgdir = $(includedir)/rdbg
@@ -8,13 +7,20 @@
 include_rdbg_HEADERS = rdbg_f.h reg.h
 
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/rdbg \
-    $(include_rdbg_HEADERS:%=$(PROJECT_INCLUDE)/rdbg/%)
-
-$(PROJECT_INCLUDE)/rdbg:
-	@$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rdbg/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
 all-local: $(PREINSTALL_FILES)
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/rdbg/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rdbg
+	@: > $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+
+$(PROJECT_INCLUDE)/rdbg/rdbg_f.h: rdbg_f.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/rdbg_f.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/rdbg_f.h
+
+$(PROJECT_INCLUDE)/rdbg/reg.h: reg.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/reg.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/reg.h
+
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/include/rdbg/powerpc/Makefile.am
===================================================================
--- c/src/librdbg/include/rdbg/powerpc/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/include/rdbg/powerpc/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 include_rdbgdir = $(includedir)/rdbg
@@ -8,13 +7,20 @@
 include_rdbg_HEADERS = rdbg_f.h reg.h
 
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/rdbg \
-    $(include_rdbg_HEADERS:%=$(PROJECT_INCLUDE)/rdbg/%)
-
-$(PROJECT_INCLUDE)/rdbg:
-	@$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/rdbg/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
 all-local: $(PREINSTALL_FILES)
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/rdbg/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rdbg
+	@: > $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+
+$(PROJECT_INCLUDE)/rdbg/rdbg_f.h: rdbg_f.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/rdbg_f.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/rdbg_f.h
+
+$(PROJECT_INCLUDE)/rdbg/reg.h: reg.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/reg.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/reg.h
+
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/src/Makefile.am
===================================================================
--- c/src/librdbg/src/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/src/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -11,4 +11,6 @@
     servcon.c servrpc.c servtgt.c servtsp.c servutil.c
 
+PREINSTALL_FILES =
+
 include $(top_srcdir)/automake/subdirs.am
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/src/i386/Makefile.am
===================================================================
--- c/src/librdbg/src/i386/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/src/i386/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 SUBDIRS = any
@@ -8,4 +7,6 @@
 EXTRA_DIST = excep_f.c rdbg_cpu_asm.S rdbg_f.c
 
+PREINSTALL_FILES =
+
 include $(top_srcdir)/automake/subdirs.am
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/src/i386/any/Makefile.am
===================================================================
--- c/src/librdbg/src/i386/any/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/src/i386/any/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ##  $Id$
 ##
-
 
 VPATH = @srcdir@:@srcdir@/..:@srcdir@/../..
@@ -77,11 +76,6 @@
 endif
 
-$(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h
-	$(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/rdbg:
-	@$(mkinstalldirs) $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/rdbg $(PROJECT_INCLUDE)/rdbg/remdeb.h
+include_rdbgdir = $(includedir)/rdbg
+include_rdbg_HEADERS = $(srcdir)/remdeb.h
 
 TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
@@ -91,3 +85,14 @@
 EXTRA_DIST = remdeb_f.x $(GEN_C_FILES)
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/rdbg/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rdbg
+	@: > $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+
+$(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/remdeb.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/remdeb.h
+
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/src/m68k/Makefile.am
===================================================================
--- c/src/librdbg/src/m68k/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/src/m68k/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 SUBDIRS = any
@@ -8,4 +7,6 @@
 EXTRA_DIST = excep_f.c rdbg_cpu_asm.S rdbg_f.c
 
+PREINSTALL_FILES =
+
 include $(top_srcdir)/automake/subdirs.am
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/src/m68k/any/Makefile.am
===================================================================
--- c/src/librdbg/src/m68k/any/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/src/m68k/any/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ##  $Id$
 ##
-
 
 VPATH = @srcdir@:@srcdir@/..:@srcdir@/../..
@@ -77,11 +76,6 @@
 endif
 
-$(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h
-	$(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/rdbg:
-	@$(mkinstalldirs) $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/rdbg $(PROJECT_INCLUDE)/rdbg/remdeb.h
+include_rdbgdir = $(includedir)/rdbg
+include_rdbg_HEADERS = $(srcdir)/remdeb.h
 
 TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
@@ -91,3 +85,14 @@
 EXTRA_DIST = remdeb_f.x $(GEN_C_FILES)
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/rdbg/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rdbg
+	@: > $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+
+$(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/remdeb.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/remdeb.h
+
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/src/powerpc/Makefile.am
===================================================================
--- c/src/librdbg/src/powerpc/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/src/powerpc/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 SUBDIRS = new_exception_processing
@@ -8,4 +7,6 @@
 EXTRA_DIST = excep_f.c rdbg_cpu_asm.S rdbg_f.c
 
+PREINSTALL_FILES =
+
 include $(top_srcdir)/automake/subdirs.am
 include $(top_srcdir)/automake/local.am
Index: c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am
===================================================================
--- c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
+++ c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am	(revision 7ed1e74731fadf6a4cfbdc18590c9c4d0d362a37)
@@ -2,5 +2,4 @@
 ##  $Id$
 ##
-
 
 VPATH = @srcdir@:@srcdir@/..:@srcdir@/../..
@@ -77,11 +76,6 @@
 endif
 
-$(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h
-	$(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/rdbg:
-	@$(mkinstalldirs) $@
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/rdbg $(PROJECT_INCLUDE)/rdbg/remdeb.h
+include_rdbgdir = $(includedir)/rdbg
+include_rdbg_HEADERS = $(srcdir)/remdeb.h
 
 TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
@@ -91,3 +85,14 @@
 EXTRA_DIST = remdeb_f.x $(GEN_C_FILES)
 
+PREINSTALL_FILES =
+
+$(PROJECT_INCLUDE)/rdbg/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rdbg
+	@: > $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+
+$(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h $(PROJECT_INCLUDE)/rdbg/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rdbg/remdeb.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rdbg/remdeb.h
+
 include $(top_srcdir)/automake/local.am
