Index: c/src/libchip/ChangeLog
===================================================================
--- c/src/libchip/ChangeLog	(revision 82bdc05755bddae48b0de8c3b19c6d0c8b8edfa8)
+++ c/src/libchip/ChangeLog	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
@@ -1,2 +1,9 @@
+2003-12-01	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* ide/Makefile.am: Use dirstamps for preinstallation. Reformat.
+	* network/Makefile.am: Ditto.
+	* rtc/Makefile.am: Ditto.
+	* serial/Makefile.am: Ditto.
+
 2003-10-21	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: c/src/libchip/ide/Makefile.am
===================================================================
--- c/src/libchip/ide/Makefile.am	(revision 82bdc05755bddae48b0de8c3b19c6d0c8b8edfa8)
+++ c/src/libchip/ide/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
@@ -16,12 +16,4 @@
 include $(top_srcdir)/automake/lib.am
 
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/libchip \
-    $(include_ide_HEADERS:%=$(PROJECT_INCLUDE)/libchip/%)
-
-$(PROJECT_INCLUDE)/libchip:
-	@$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/libchip/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
 if LIBCHIP
 include_idedir = $(includedir)/libchip
@@ -36,4 +28,29 @@
 EXTRA_DIST = $(C_FILES)
 
+PREINSTALL_FILES =
+
+if LIBCHIP
+$(PROJECT_INCLUDE)/libchip/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/libchip
+	@: > $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+
+$(PROJECT_INCLUDE)/libchip/ata.h: ata.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/ata.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/ata.h
+
+$(PROJECT_INCLUDE)/libchip/ide_ctrl_cfg.h: ide_ctrl_cfg.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/ide_ctrl_cfg.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/ide_ctrl_cfg.h
+
+$(PROJECT_INCLUDE)/libchip/ide_ctrl.h: ide_ctrl.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/ide_ctrl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/ide_ctrl.h
+
+$(PROJECT_INCLUDE)/libchip/ide_ctrl_io.h: ide_ctrl_io.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/ide_ctrl_io.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/ide_ctrl_io.h
+endif
+
 include $(top_srcdir)/automake/subdirs.am
 include $(top_srcdir)/automake/local.am
Index: c/src/libchip/network/Makefile.am
===================================================================
--- c/src/libchip/network/Makefile.am	(revision 82bdc05755bddae48b0de8c3b19c6d0c8b8edfa8)
+++ c/src/libchip/network/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 LIBNAME = libnetchip
@@ -13,9 +12,4 @@
 include $(top_srcdir)/automake/lib.am
 
-$(PROJECT_INCLUDE)/libchip:
-	@$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/libchip/%.h: %.h
-	$(INSTALL_DATA) $< $@
-
 #
 # Add local stuff here using +=
@@ -26,6 +20,6 @@
 if LIBCHIP
 include_libchipdir = $(includedir)/libchip
-include_libchip_HEADERS = cs8900.h i82586var.h if_fxpvar.h sonic.h if_media.h \
-    mii.h open_eth.h
+include_libchip_HEADERS = cs8900.h i82586var.h if_fxpvar.h sonic.h \
+    if_media.h mii.h open_eth.h
 
 $(LIB): $(OBJS)
@@ -34,9 +28,4 @@
 $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
 	$(INSTALL_DATA) $< $@
-
-if HAS_NETWORKING
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/libchip \
-    $(include_libchip_HEADERS:%=$(PROJECT_INCLUDE)/libchip/%) 
-endif
 
 TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a
@@ -50,6 +39,44 @@
 
 EXTRA_DIST = README README.cs8900 README.dec21140 README.i82586 \
-    README.open_eth README.sonic cs8900.c cs8900.c.bsp dec21140.c \
-    i82586.c if_fxp.c open_eth.c sonic.c
+    README.open_eth README.sonic cs8900.c cs8900.c.bsp dec21140.c i82586.c \
+    if_fxp.c open_eth.c sonic.c
+
+PREINSTALL_FILES =
+
+if LIBCHIP
+$(PROJECT_INCLUDE)/libchip/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/libchip
+	@: > $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+
+$(PROJECT_INCLUDE)/libchip/cs8900.h: cs8900.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/cs8900.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/cs8900.h
+
+$(PROJECT_INCLUDE)/libchip/i82586var.h: i82586var.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/i82586var.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/i82586var.h
+
+$(PROJECT_INCLUDE)/libchip/if_fxpvar.h: if_fxpvar.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/if_fxpvar.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/if_fxpvar.h
+
+$(PROJECT_INCLUDE)/libchip/sonic.h: sonic.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/sonic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/sonic.h
+
+$(PROJECT_INCLUDE)/libchip/if_media.h: if_media.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/if_media.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/if_media.h
+
+$(PROJECT_INCLUDE)/libchip/mii.h: mii.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/mii.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/mii.h
+
+$(PROJECT_INCLUDE)/libchip/open_eth.h: open_eth.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/open_eth.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/open_eth.h
+
+endif
 
 include $(top_srcdir)/automake/local.am
Index: c/src/libchip/rtc/Makefile.am
===================================================================
--- c/src/libchip/rtc/Makefile.am	(revision 82bdc05755bddae48b0de8c3b19c6d0c8b8edfa8)
+++ c/src/libchip/rtc/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
@@ -2,5 +2,4 @@
 ## $Id$
 ##
-
 
 LIBNAME = librtcio
@@ -13,16 +12,6 @@
 OBJS = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
 
-
 include $(top_srcdir)/automake/compile.am
 include $(top_srcdir)/automake/lib.am
-
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/libchip \
-    $(include_libchip_HEADERS:%=$(PROJECT_INCLUDE)/libchip/%)
-
-$(PROJECT_INCLUDE)/libchip:
-	@$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/libchip/%.h: %.h
-	$(INSTALL_DATA) $< $@
 
 #
@@ -43,3 +32,24 @@
 EXTRA_DIST = $(C_FILES) $(DOC_FILES)
 
+PREINSTALL_FILES =
+
+if LIBCHIP
+$(PROJECT_INCLUDE)/libchip/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/libchip
+	@: > $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+
+$(PROJECT_INCLUDE)/libchip/rtc.h: rtc.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/rtc.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/rtc.h
+
+$(PROJECT_INCLUDE)/libchip/icm7170.h: icm7170.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/icm7170.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/icm7170.h
+
+$(PROJECT_INCLUDE)/libchip/m48t08.h: m48t08.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/m48t08.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/m48t08.h
+endif
+
 include $(top_srcdir)/automake/local.am
Index: c/src/libchip/serial/Makefile.am
===================================================================
--- c/src/libchip/serial/Makefile.am	(revision 82bdc05755bddae48b0de8c3b19c6d0c8b8edfa8)
+++ c/src/libchip/serial/Makefile.am	(revision 5a550a3b057f27afbf9230ce0d68820ca17131df)
@@ -2,5 +2,4 @@
 #  $Id$
 #
-
 
 LIBNAME = libserialio
@@ -16,12 +15,4 @@
 include $(top_srcdir)/automake/compile.am
 include $(top_srcdir)/automake/lib.am
-
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/libchip \
-    $(include_libchip_HEADERS:%=$(PROJECT_INCLUDE)/libchip/%)
-
-$(PROJECT_INCLUDE)/libchip:
-	@$(mkinstalldirs) $@
-$(PROJECT_INCLUDE)/libchip/%.h: %.h
-	$(INSTALL_DATA) $< $@
 
 #
@@ -43,3 +34,32 @@
 EXTRA_DIST = $(C_FILES) $(DOC_FILES)
 
+PREINSTALL_FILES =
+
+if LIBCHIP
+$(PROJECT_INCLUDE)/libchip/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/libchip
+	@: > $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+
+$(PROJECT_INCLUDE)/libchip/mc68681.h: mc68681.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/mc68681.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/mc68681.h
+
+$(PROJECT_INCLUDE)/libchip/ns16550.h: ns16550.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/ns16550.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/ns16550.h
+
+$(PROJECT_INCLUDE)/libchip/z85c30.h: z85c30.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/z85c30.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/z85c30.h
+
+$(PROJECT_INCLUDE)/libchip/serial.h: serial.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/serial.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/serial.h
+
+$(PROJECT_INCLUDE)/libchip/sersupp.h: sersupp.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/sersupp.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/sersupp.h
+endif
+
 include $(top_srcdir)/automake/local.am
