stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r615419 - in /stdcxx/trunk: GNUmakefile etc/config/makefile.rules
Date Sat, 26 Jan 2008 01:32:04 GMT
Author: vitek
Date: Fri Jan 25 17:32:02 2008
New Revision: 615419

URL: http://svn.apache.org/viewvc?rev=615419&view=rev
Log:

2008-01-25  Travis Vitek  <vitek@roguewave.com>

	STDCXX-573
	* etc/config/makefile.rules: Use WITH_PURIFY or WITH_CADVISE to enable
	or disable purify and cadvise tools
	* GNUmakefile: Document new parameters, and cache them in makefile.in


Modified:
    stdcxx/trunk/GNUmakefile
    stdcxx/trunk/etc/config/makefile.rules

Modified: stdcxx/trunk/GNUmakefile
URL: http://svn.apache.org/viewvc/stdcxx/trunk/GNUmakefile?rev=615419&r1=615418&r2=615419&view=diff
==============================================================================
--- stdcxx/trunk/GNUmakefile (original)
+++ stdcxx/trunk/GNUmakefile Fri Jan 25 17:32:02 2008
@@ -151,6 +151,12 @@
 #
 #   WARNFLAGS - any compiler warning options
 #
+#   WITH_PURIFY - set to `true' to build with purify. additional flags
+#                 can be specified in PURIFYFLAGS.
+#
+#   WITH_CADVISE - set to `true' to build with cadvise. additional flags
+#                  can be specified in CADVISEFLAGS.
+#
 ########################################################################
 
 SHELL = /bin/sh
@@ -642,6 +648,10 @@
           && echo "BUILDTAG   = $(BUILDTAG)"             >> $(MAKEFILE_IN)
 \
           && echo "PLATFORM   = $(PLATFORM)"             >> $(MAKEFILE_IN)
 \
           && echo "DEFAULT_SHROBJ = $(DEFAULT_SHROBJ)"   >> $(MAKEFILE_IN)
 \
+          && echo "WITH_CADVISE = $(WITH_CADVISE)"       >> $(MAKEFILE_IN)
 \
+          && echo "CADVISEFLAGS = $(CADVISEFLAGS)"       >> $(MAKEFILE_IN)
 \
+          && echo "WITH_PURIFY = $(WITH_PURIFY)"         >> $(MAKEFILE_IN)
 \
+          && echo "PURIFYFLAGS = $(PURIFYFLAGS)"         >> $(MAKEFILE_IN)
 \
           && echo "CXX_REPOSITORY = $(CXX_REPOSITORY)"	 >> $(MAKEFILE_IN));
 
 # creates the build directory tree and generates makefile.in

Modified: stdcxx/trunk/etc/config/makefile.rules
URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/makefile.rules?rev=615419&r1=615418&r2=615419&view=diff
==============================================================================
--- stdcxx/trunk/etc/config/makefile.rules (original)
+++ stdcxx/trunk/etc/config/makefile.rules Fri Jan 25 17:32:02 2008
@@ -70,6 +70,25 @@
 	-gencat $@ $^
 
 
+ifeq ($(WITH_PURIFY),true)
+  ifeq ($(PURIFYFLAGS),)
+    PURIFYFLAGS  = -windows=no
+	PURIFYFLAGS += -log-file=stderr -view-file=$@.purify-view
+  endif
+
+  ifneq ($(OSNAME),AIX)
+	PURIFY = purify $(PURIFYFLAGS)
+  endif
+endif
+
+ifeq ($(WITH_CADVISE),true)
+  ifeq ($(CADVISEFLAGS),)
+    CADVISEFLAGS = +w
+  endif
+
+  CADVISE = cadvise $(CADVISEFLAGS)
+endif
+
 ########################################################################
 #  COMMON RULES
 ########################################################################
@@ -89,17 +108,17 @@
 
 # make the rule match for sources matching *.out.cpp
 %.out.o: %.out.cpp
-	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$<) $<
+	$(CADVISE) $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$<) $<
 
 %.o: %.cpp
-	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$<) $<
+	$(CADVISE) $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$<) $<
 
 # make the rule match for objects matching *.out.o
 %.out: %.out.o
-	$(LD) $< -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$<)
+	$(PURIFY) $(LD) $< -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$<)
 
 %: %.o
-	$(LD) $< -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$<)
+	$(PURIFY) $(LD) $< -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$<)
 
 # disable compilation and linking in the same step
 # %: %.cpp
@@ -108,8 +127,8 @@
 
 # compile and link in one step to eliminate the space overhead of .o files
 %: %.cpp
-	$(CXX) $< -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) \
-               $(call CXX.repo,$<)
+	$(CADVISE) $(PURIFY) $(CXX) $< -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) \
+               $(LDLIBS) $(call CXX.repo,$<)
 
 endif   # eq ($(NO_DOT_O),)
 



Mime
View raw message