[m-dev.] diff: improve efficiency of configure.in rebuild test
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Mar 10 11:53:12 AEDT 2000
Estimated hours taken: 0.25
configure.in:
Improve the efficiency of the test to see whether the C files
have been generated with the correct grade options: use
"sed -e '/END_OF_GRADE_INFO/q'" rather than
"sed -e '/END_OF_GRADE_INFO/,$d'", since the
latter reads in the whole file, even though most
of it will just be discarded, while the former quits
as soon as it gets to the END_OF_GRADE_INFO marker.
Workspace: /d-drive/home/hg/fjh/mercury
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.201
diff -u -d -r1.201 configure.in
--- configure.in 2000/02/10 04:47:34 1.201
+++ configure.in 2000/03/10 00:45:07
@@ -2345,7 +2345,7 @@
to_keep="$to_keep $c_file"
;;
*)
- sed -e '/END_OF_C_GRADE_INFO/,$d' < $c_file > confscratch
+ sed -e '/END_OF_C_GRADE_INFO/q' < $c_file > confscratch
if grep "TAG_BITS=$mercury_cv_low_tag_bits" \
confscratch > /dev/null 2>&1
then
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list