summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2006-11-22 21:55:05 +0000
committerSteve Huston <shuston@riverace.com>2006-11-22 21:55:05 +0000
commite8f35c1c44aff6c73d97f727aea5c7c06f79bbf5 (patch)
tree8b6637895f9e94e5c0040225125012edadd2e200
parent2624ab7a5cbe13bc67f85b3cd0030381b80a66a1 (diff)
downloadATCD-e8f35c1c44aff6c73d97f727aea5c7c06f79bbf5.tar.gz
ChangeLogTag:Wed Nov 22 21:53:17 UTC 2006 Steve Huston <shuston@riverace.com>
-rw-r--r--ACE/ChangeLog25
-rw-r--r--ACE/include/makeinclude/rules.lib.GNU4
-rw-r--r--ACE/include/makeinclude/rules.local.GNU82
3 files changed, 71 insertions, 40 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 526db3d6acb..fbe48881569 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,28 @@
+Wed Nov 22 21:53:17 UTC 2006 Steve Huston <shuston@riverace.com>
+
+ Pulled these in from the 5.5 stream:
+
+ Thu Nov 16 21:56:37 UTC 2006 Steve Huston <shuston@riverace.com>
+
+ * include/makeinclude/rules.local.GNU: For creating the object file
+ directories (e.g., VDIR and VSHDIR, and their subdirectories), change
+ from using the directory as a prerequisite and make that prereq
+ a PHONY target to embed the command(s) to check and create the
+ directory if needed. This accomplishes two things: 1) allows the
+ make to work with clearmake in GNU compatibility mode (clearmake
+ always saw the PHONY target as remade and remade every file in the
+ project), and 2) avoids using a PHONY target as a prerequisite,
+ something the GNU make manual says to avoid. Thank you to Howard
+ Finer <hfiner at sonusnet dot com> for motivating and assisting
+ in this effort.
+
+ Tue Nov 14 22:33:03 UTC 2006 Steve Huston <shuston@riverace.com>
+
+ * include/makeinclude/rules.lib.GNU: Change VLOBJS and VSHOBJS to
+ use $(patsubst) instead of $(if) to look for entries that have
+ relative directories in them (../). Avoids $(if) which does not
+ work in Clearcase's clearmake GNU compatibility mode.
+
Wed Nov 22 19:52:23 UTC 2006 J.T. Conklin <jtc@acorntoolworks.com>
* ace/Select_Reactor_T.inl:
diff --git a/ACE/include/makeinclude/rules.lib.GNU b/ACE/include/makeinclude/rules.lib.GNU
index 766e8921373..65c472ad973 100644
--- a/ACE/include/makeinclude/rules.lib.GNU
+++ b/ACE/include/makeinclude/rules.lib.GNU
@@ -79,12 +79,12 @@ else # VLIBS
endif # IDL_SRC
endif # !VLIBS
-VLOBJS = $(addprefix $(VDIR),$(foreach var, $(addsuffix .$(OBJEXT), $(basename $(LSRC)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))))
+VLOBJS = $(addprefix $(VDIR),$(foreach var, $(addsuffix .$(OBJEXT), $(basename $(LSRC)) $(RESOURCES)), $(patsubst ../%,$(notdir %),$(var))))
ifdef LSRC2
LSRC += $(LSRC2)
endif
-VSHOBJS = $(addprefix $(VSHDIR),$(foreach var, $(addsuffix .$(OBJEXT), $(basename $(LSRC)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))))
+VSHOBJS = $(addprefix $(VSHDIR),$(foreach var, $(addsuffix .$(OBJEXT), $(basename $(LSRC)) $(RESOURCES)), $(patsubst ../%,$(notdir %),$(var))))
ifneq ($(IDL_SRC),)
$(VLOBJS) $(VSHOBJS): $(IDL_SRC)
diff --git a/ACE/include/makeinclude/rules.local.GNU b/ACE/include/makeinclude/rules.local.GNU
index 71e37f61733..e1c8bfea36f 100644
--- a/ACE/include/makeinclude/rules.local.GNU
+++ b/ACE/include/makeinclude/rules.local.GNU
@@ -90,28 +90,46 @@ endif # static_link = 1
OS ?=
-$(VDIR)%.o: %.c $(VDIR)%.creation_stamp
+# Define a canned command set to create the output object directory if needed.
+ifeq ($(vxworks_ntbuild),1)
+define mk_obj_out_dir
+@if not exist $(dir $@) $(MKDIR) $(dir $@) $(ACE_NUL_STDERR)
+@echo > $(dir $@).creation_stamp
+endef
+else
+define mk_obj_out_dir
+@-test -d $(dir $@) || $(MKDIR) $(dir $@) $(ACE_NUL_STDERR)
+endef
+endif
+
+$(VDIR)%.o: %.c
+ $(mk_obj_out_dir)
$(COMPILE.c) $(CC_OUTPUT_FLAG) $@ $<
${MVCMD}
-$(VDIR)%.o: %.cpp $(VDIR)%.creation_stamp
+$(VDIR)%.o: %.cpp
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(CC_OUTPUT_FLAG) $@ $<
${MVCMD}
-$(VDIR)%.o: %.C $(VDIR)%.creation_stamp
+$(VDIR)%.o: %.C
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(CC_OUTPUT_FLAG) $@ $<
${MVCMD}
-$(VDIR)%.o: %.cc $(VDIR)%.creation_stamp
+$(VDIR)%.o: %.cc
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(CC_OUTPUT_FLAG) $@ $<
${MVCMD}
-$(VDIR)%.o: %.cxx $(VDIR)%.creation_stamp
+$(VDIR)%.o: %.cxx
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(CC_OUTPUT_FLAG) $@ $<
${MVCMD}
ifneq (,$(COMPILE.rc))
-$(VDIR)%.rc.o: %.rc $(VDIR)%.creation_stamp
+$(VDIR)%.rc.o: %.rc
+ $(mk_obj_out_dir)
$(COMPILE.rc) $< $@
${MVCMD}
endif # COMPILE.rc
@@ -126,67 +144,55 @@ ifndef SOLINK
# that the service configurator needs to be able to function).
# 970104 Marius Kjeldahl <mariusk@sn.no, marius@funcom.com>
ifdef (ESOBUILD)
-$(VSHDIR)%.$(SOEXT): %.cpp $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(SOEXT): %.cpp
+ $(mk_obj_out_dir)
$(ESOBUILD)
else # ! ESOBUILD
-$(VSHDIR)%.$(SOEXT): %.cpp $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(SOEXT): %.cpp
+ $(mk_obj_out_dir)
$(SOBUILD)
endif # ESOBUILD
ifeq ($(split), 1)
-$(VSHDIR)%.$(OBJEXT): %.cpp $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(OBJEXT): %.cpp
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(PIC) SPLIT/`echo $< | sed "s/.cpp/_S\*/"`
mv *.$(OBJEXT) $(VSHDIR)
else # ! split
-$(VSHDIR)%.$(OBJEXT): %.cpp $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(OBJEXT): %.cpp
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(PIC) $(CC_OUTPUT_FLAG) $@ $<
endif # split
-$(VSHDIR)%.$(OBJEXT): %.cc $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(OBJEXT): %.cc
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(PIC) $(CC_OUTPUT_FLAG) $@ $<
-$(VSHDIR)%.$(OBJEXT): %.C $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(OBJEXT): %.C
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(PIC) $(CC_OUTPUT_FLAG) $@ $<
-$(VSHDIR)%.$(OBJEXT): %.cxx $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(OBJEXT): %.cxx
+ $(mk_obj_out_dir)
$(COMPILE.cc) $(PIC) $(CC_OUTPUT_FLAG) $@ $<
-$(VSHDIR)%.$(OBJEXT): %.c $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(OBJEXT): %.c
+ $(mk_obj_out_dir)
$(COMPILE.c) $(PIC) $(CC_OUTPUT_FLAG) $@ $<
ifneq (,$(COMPILE.rc))
-$(VSHDIR)%.rc.$(OBJEXT): %.rc $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.rc.$(OBJEXT): %.rc
+ $(mk_obj_out_dir)
$(COMPILE.rc) $< $@
endif # COMPILE.rc
-$(VSHDIR)%.$(SOEXT): $(VSHDIR)%.$(OBJEXT) $(VSHDIR)%.creation_stamp
+$(VSHDIR)%.$(SOEXT): $(VSHDIR)%.$(OBJEXT)
+ $(mk_obj_out_dir)
$(SOLINK)
endif # SOLINK
-ifeq ($(vxworks_ntbuild),1)
-$(VDIR)%.creation_stamp:
- @if not exist $(dir $@) $(MKDIR) $(dir $@) $(ACE_NUL_STDERR)
- @echo > $@
-else
-.PHONY: $(VDIR)%.creation_stamp
-$(VDIR)%.creation_stamp:
- @-test -d $(dir $@) || $(MKDIR) $(dir $@) $(ACE_NUL_STDERR)
-endif
-
-ifneq ($(VDIR),$(VSHDIR))
- ifeq ($(vxworks_ntbuild),1)
-$(VSHDIR)%.creation_stamp:
- @if not exist $(dir $@) $(MKDIR) $(dir $@) $(ACE_NUL_STDERR)
- @echo > $@
- else
-.PHONY: $(VSHDIR)%.creation_stamp
-$(VSHDIR)%.creation_stamp:
- @-test -d $(dir $@) || $(MKDIR) $(dir $@) $(ACE_NUL_STDERR)
- endif
-endif
-
#----------------------------------------------------------------------------
# Library generation targets
#----------------------------------------------------------------------------