mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-06 10:25:53 +08:00
Speed up building testsuites.
* lib/autotest/general.m4 (AT_LINE): Only use regex when file changed since last time. Use simpler regex. Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
parent
e76d30be25
commit
4c7d289c7d
@ -1,3 +1,9 @@
|
||||
2007-10-04 Eric Blake <ebb9@byu.net>
|
||||
|
||||
Speed up building testsuites.
|
||||
* lib/autotest/general.m4 (AT_LINE): Only use regex when file
|
||||
changed since last time. Use simpler regex.
|
||||
|
||||
2007-10-03 Eric Blake <ebb9@byu.net>
|
||||
|
||||
Optimize checking for identifiers.
|
||||
|
@ -142,8 +142,19 @@ m4_define([_m4_divert(TEST_SCRIPT)], 403)
|
||||
# is one of the biggest junk in the whole universe wrt regexp, don't
|
||||
# even think about using `?' or `\?'. Bah, `*' will do.
|
||||
# Pleeeeeeeease, Gary, provide us with dirname and ERE!
|
||||
#
|
||||
# M4 recompiles the regular expression for every m4_bpatsubst, but __file__
|
||||
# rarely changes. Be fast - only compute the dirname when necessary; for
|
||||
# autoconf alone, this shaves off several seconds in building testsuite.
|
||||
m4_define([_AT_LINE_file])
|
||||
m4_define([_AT_LINE_base])
|
||||
m4_define([AT_LINE],
|
||||
[m4_bpatsubst(__file__, [^\(.*/\)*\(.*\)], [[\2]]):__line__])
|
||||
[m4_if(m4_defn([_AT_LINE_file]), __file__, [],
|
||||
[m4_do([m4_define([_AT_LINE_file], __file__)],
|
||||
[m4_define([_AT_LINE_base],
|
||||
m4_bpatsubst(/__file__, [/\([^/]*\)$],
|
||||
[[\1]]))])])dnl
|
||||
m4_defn([_AT_LINE_base]):__line__])
|
||||
|
||||
|
||||
# _AT_NORMALIZE_TEST_GROUP_NUMBER(SHELL-VAR)
|
||||
|
Loading…
Reference in New Issue
Block a user