[m-rev.] diff: fix the configure script

Julien Fischer juliensf at cs.mu.OZ.AU
Mon May 9 14:11:31 AEST 2005


Estimated hours taken: 0.2
Branches: main

Fix a minor problem caused by Zoltan's recent change to how the options
for building the compiler are handled.  The tests directory can be either
a subdirectory or the mercury source tree, or a sibling to it.

configure.in:
	Don't try to build tests/TESTS_FLAGS if the tests directory
	is not accessible.  Also, check that the tests are in ../tests
	if tests does not exist (this is the usual setup for the nightly
	tests.

/home/jupiter/juliensf/ws76
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.415
diff -u -r1.415 configure.in
--- configure.in	6 May 2005 08:42:00 -0000	1.415
+++ configure.in	9 May 2005 04:04:25 -0000
@@ -4001,6 +4001,23 @@

 #-----------------------------------------------------------------------------#

+# We should only set up TESTS_FLAGS if the tests directory is accessible.
+# It can be in one of two places:
+# (a) in the mercury directory
+# (b) a sibling of the mercury directory
+
+if test -d tests
+then
+	test_flags="tests/TESTS_FLAGS"
+else
+	if test -d ../tests
+	then
+		test_flags="../tests/TESTS_FLAGS"
+	else
+		test_flags=""
+	fi
+fi
+
 # Any new entries here may need to be handled by scripts/mercury_config.
 AC_OUTPUT(Mmake.common scripts/Mmake.vars scripts/mmc
 scripts/mercury.bat scripts/mprof scripts/mercury_update_interface
@@ -4020,7 +4037,7 @@
 slice/SLICE_FLAGS
 profiler/PROF_FLAGS
 deep_profiler/DEEP_FLAGS
-tests/TESTS_FLAGS
+"$test_flags"
 ,
 [
 # Only do this when compiling the source, not when reconfiguring

--------------------------------------------------------------------------
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