Index: c/src/librtems++/ChangeLog
===================================================================
--- c/src/librtems++/ChangeLog	(revision 72c9ccf20507577d8e9050726d9e490c490b8b9b)
+++ c/src/librtems++/ChangeLog	(revision cd05d036a0d0a7bee98babc78cea069a58609e94)
@@ -1,2 +1,6 @@
+2003-12-11	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* Makefile.am: Add dirstamp support.
+
 2003-12-02	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: c/src/librtems++/Makefile.am
===================================================================
--- c/src/librtems++/Makefile.am	(revision 72c9ccf20507577d8e9050726d9e490c490b8b9b)
+++ c/src/librtems++/Makefile.am	(revision cd05d036a0d0a7bee98babc78cea069a58609e94)
@@ -8,46 +8,73 @@
 include $(top_srcdir)/../automake/lib.am
 
+${ARCH}/%.o: src/%.cc $(ARCH)/$(dirstamp)
+	${CXXCOMPILE} -o $@ -c $<
+
+if HAS_CXX
 include_rtems__dir = $(includedir)/rtems++
 
-$(PROJECT_INCLUDE)/%.h: include/%.h
-	$(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE)/rtems++:
-	@$(mkinstalldirs) $@
-
-if HAS_CXX
 include_rtems___HEADERS = include/rtems++/rtemsEvent.h \
-    include/rtems++/rtemsInterrupt.h include/rtems++/rtemsMessageQueue.h include/rtems++/rtemsSemaphore.h \
-    include/rtems++/rtemsStatusCode.h include/rtems++/rtemsTask.h include/rtems++/rtemsTaskMode.h \
+    include/rtems++/rtemsInterrupt.h include/rtems++/rtemsMessageQueue.h \
+    include/rtems++/rtemsSemaphore.h include/rtems++/rtemsStatusCode.h \
+    include/rtems++/rtemsTask.h include/rtems++/rtemsTaskMode.h \
     include/rtems++/rtemsTimer.h
 
-PREINSTALL_FILES = $(PROJECT_INCLUDE)/rtems++ \
-    $(include_rtems___HEADERS:include/%=$(PROJECT_INCLUDE)/%)
-
-endif
-
-LIB = ${ARCH}/librtems++$(LIB_VARIANT).a
-
 CC_FILES = src/rtemsEvent.cc src/rtemsInterrupt.cc src/rtemsMessageQueue.cc \
-    src/rtemsSemaphore.cc src/rtemsStatusCode.cc src/rtemsTask.cc src/rtemsTimer.cc
+    src/rtemsSemaphore.cc src/rtemsStatusCode.cc src/rtemsTask.cc \
+    src/rtemsTimer.cc
 OBJS = $(CC_FILES:src/%.cc=${ARCH}/%.$(OBJEXT))
 
-TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/librtems++$(LIB_VARIANT).a
-
-install-data-local: $(LIB)
-	@$(mkinstalldirs) $(DESTDIR)$(bsplibdir)
-	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(bsplibdir)
-
-${ARCH}/%.o: src/%.cc
-	test -d $(ARCH) || mkdir $(ARCH)
-	${CXXCOMPILE} -o $@ -c $<
-
-$(LIB): $(OBJS)
+$(ARCH)/librtems++$(LIB_VARIANT).a: $(OBJS)
 	$(make-library)
 
-$(PROJECT_RELEASE)/lib/librtems++$(LIB_VARIANT).a: $(LIB)
-	$(INSTALL_DATA) $< $@
+project_lib_DATA = $(ARCH)/librtems++$(LIB_VARIANT).a
+endif
 
 all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
 
+PREINSTALL_FILES =
+
+if HAS_CXX
+$(PROJECT_INCLUDE)/rtems++/$(dirstamp):
+	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rtems++
+	@: > $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+
+$(PROJECT_INCLUDE)/rtems++/rtemsEvent.h: include/rtems++/rtemsEvent.h $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems++/rtemsEvent.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/rtemsEvent.h
+
+$(PROJECT_INCLUDE)/rtems++/rtemsInterrupt.h: include/rtems++/rtemsInterrupt.h $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems++/rtemsInterrupt.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/rtemsInterrupt.h
+
+$(PROJECT_INCLUDE)/rtems++/rtemsMessageQueue.h: include/rtems++/rtemsMessageQueue.h $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems++/rtemsMessageQueue.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/rtemsMessageQueue.h
+
+$(PROJECT_INCLUDE)/rtems++/rtemsSemaphore.h: include/rtems++/rtemsSemaphore.h $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems++/rtemsSemaphore.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/rtemsSemaphore.h
+
+$(PROJECT_INCLUDE)/rtems++/rtemsStatusCode.h: include/rtems++/rtemsStatusCode.h $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems++/rtemsStatusCode.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/rtemsStatusCode.h
+
+$(PROJECT_INCLUDE)/rtems++/rtemsTask.h: include/rtems++/rtemsTask.h $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems++/rtemsTask.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/rtemsTask.h
+
+$(PROJECT_INCLUDE)/rtems++/rtemsTaskMode.h: include/rtems++/rtemsTaskMode.h $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems++/rtemsTaskMode.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/rtemsTaskMode.h
+
+$(PROJECT_INCLUDE)/rtems++/rtemsTimer.h: include/rtems++/rtemsTimer.h $(PROJECT_INCLUDE)/rtems++/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems++/rtemsTimer.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems++/rtemsTimer.h
+
+${PROJECT_RELEASE}/lib/librtems++$(LIB_VARIANT).a: $(ARCH)/librtems++$(LIB_VARIANT).a ${PROJECT_RELEASE}/lib/$(dirstamp)
+	$(INSTALL_DATA) $< ${PROJECT_RELEASE}/lib/librtems++$(LIB_VARIANT).a
+TMPINSTALL_FILES += ${PROJECT_RELEASE}/lib/librtems++$(LIB_VARIANT).a
+endif
+
 include $(top_srcdir)/../automake/local.am
