[m-rev.] diff: don't install .profdeep grade if deep profiling disabled

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jun 26 11:59:10 AEST 2001


Estimated hours taken: 0.5
Branches: main

configure.in:
	Don't install the `.profdeep' grade if deep profiling isn't enabled.
	(This required moving the code which decides whether or not to
	enable deep profiling to before the place where we decide which
	library grades to install.)

Workspace: /home/mars/fjh/ws1/mercury
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.262
diff -u -d -r1.262 configure.in
--- configure.in	2001/06/07 01:11:40	1.262
+++ configure.in	2001/06/26 01:51:35
@@ -1753,7 +1753,26 @@
 AC_MSG_RESULT($mercury_cv_profiling)
 
 #-----------------------------------------------------------------------------#
+#
+# Add an option that disables the deep profiler.
+#
+AC_MSG_CHECKING(whether to enable the deep profiler)
 
+    # This test may need to be made more specific at a later date.
+    # Currently it only distinguishes between systems which have
+    # unistd.h or not, but at a later date we may also need to test for
+    # other posix features.
+if test "$HAVE_UNISTD_H" = 1; then
+    mercury_cv_enable_deep_profiler=yes
+else
+    mercury_cv_enable_deep_profiler=no
+fi
+
+AC_MSG_RESULT($mercury_cv_enable_deep_profiler)
+ENABLE_DEEP_PROFILER=$mercury_cv_enable_deep_profiler
+AC_SUBST(ENABLE_DEEP_PROFILER)
+#-----------------------------------------------------------------------------#
+
 # Figure out which flavour of pthreads to use, since none of the
 # implementations seem to be exactly the same
 case $host in
@@ -1981,7 +2000,6 @@
 
 if test "$enable_prof_grades" = yes; then
 	# add `.prof' (--profiling) grades, if time profiling is supported,
-	# and a `.memprof' (--memory-profiling) grade.
 	if test $mercury_cv_profiling = yes; then
 		if test "$enable_nogc_grades" = yes; then
 			DEFAULT_GRADE_NOGC="`echo $DEFAULT_GRADE | sed 's/\.gc$//'`"
@@ -1998,7 +2016,15 @@
 			fi
 		fi
 	fi
-	LIBGRADES="$LIBGRADES $DEFAULT_GRADE.memprof $DEFAULT_GRADE.profdeep"
+
+	# add a `.memprof' (--memory-profiling) grade
+	LIBGRADES="$LIBGRADES $DEFAULT_GRADE.memprof"
+
+	# add a `.profdeep' (--deep-profiling) grade,
+	# if deep profiling is enabled.
+	if test $mercury_cv_enable_deep_profiler = yes; then
+		LIBGRADES="$LIBGRADES $DEFAULT_GRADE.profdeep"
+	fi
 fi
 
 if test "$enable_trail_grades" = yes; then
@@ -2105,25 +2131,6 @@
 if test "$mercury_cv_enable_decl_debug" = "no"; then
 	AC_DEFINE(MR_DISABLE_DECLARATIVE_DEBUGGER)
 fi
-#-----------------------------------------------------------------------------#
-#
-# Add an option that disables the deep profiler.
-#
-AC_MSG_CHECKING(whether to enable the deep profiler)
-
-    # This test may need to be made more specific at a later date.
-    # Currently it only distinguishes between systems which have
-    # unistd.h or not, but at a later date we may also need to test for
-    # other posix features.
-if test "$HAVE_UNISTD_H" = 1; then
-    mercury_cv_enable_deep_profiler=yes
-else
-    mercury_cv_enable_deep_profiler=no
-fi
-
-AC_MSG_RESULT($mercury_cv_enable_deep_profiler)
-ENABLE_DEEP_PROFILER=$mercury_cv_enable_deep_profiler
-AC_SUBST(ENABLE_DEEP_PROFILER)
 #-----------------------------------------------------------------------------#
 
 # Determine how many of the r registers (r1, r2, ...) are real registers.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list