[m-rev.] diff: make configure more robust

Ian MacLarty maclarty at cs.mu.OZ.AU
Sat Oct 29 14:56:37 AEST 2005


Estimated hours taken: 0.2
Branches: main

configure.in:
	Check for the file tests/TESTS_FLAGS.in or ../tests/TESTS_FLAGS.in
	instead of just check for the directory tests or ../tests, before
	making TESTS_FLAGS.  It is quite possible for a user downloading the
	source distribution to have an unrelated tests directory in the same
	directory as the distribution, which will then break configure.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.437
diff -u -r1.437 configure.in
--- configure.in	25 Oct 2005 10:17:25 -0000	1.437
+++ configure.in	29 Oct 2005 04:47:45 -0000
@@ -4184,11 +4184,11 @@
 # (a) in the mercury directory
 # (b) a sibling of the mercury directory

-if test -d tests
+if test -e tests/TESTS_FLAGS.in
 then
 	test_flags="tests/TESTS_FLAGS"
 else
-	if test -d ../tests
+	if test -e ../tests/TESTS_FLAGS.in
 	then
 		test_flags="../tests/TESTS_FLAGS"
 	else

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