[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: On the way to -w
From: |
Akim Demaille |
Subject: |
Re: FYI: On the way to -w |
Date: |
05 Mar 2001 20:48:07 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) |
Tom, I'd like to know what you'd prefer: fixing the uses of $2 etc.,
or the definition of the groups in the regexps? For instance, I have
this:
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.970
diff -u -u -r1.970 automake.in
--- automake.in 2001/03/05 19:29:16 1.970
+++ automake.in 2001/03/05 19:37:25
@@ -1,4 +1,4 @@
address@hidden@
address@hidden@ -w
# -*- perl -*-
# @configure_input@
@@ -6726,8 +6726,8 @@
# line).
# I'm quite shoked! It seems that (\\\n|[^\n]) is not the
# same as `([^\n]|\\\n)!!! Don't swap it, it breaks.
- my ($relationship, $actions) =
- /^((?:\\\n|[^\n])*)(?:\n(\t.*))?$/som;
+ /^((?:\\\n|[^\n])*)(?:\n(\t.*))?$/som;
+ my ($relationship, $actions) = ($1, $2 || '');
# Separate targets from dependencies: the first colon.
$relationship =~ /^([^:]+\S+) *: *(.*)$/som;
@@ -6843,8 +6843,9 @@
{
if ($varname =~ /^(nobase_)?(dist_|nodist_)?(.*)_$primary$/)
{
- if (($2 ne '' && ! $can_dist)
- || (! defined $valid{$3} && ! &variable_defined ($3 . 'dir')))
+ my ($base, $dist, $X) = ($1 || '', $2 || '', $3 || '');
+ if (($dist ne '' && ! $can_dist)
+ || (! defined $valid{$X} && ! &variable_defined ("${X}dir")))
{
# Note that a configure variable is always legitimate.
# It is natural to name such variables after the
@@ -6857,7 +6858,7 @@
else
{
# Ensure all extended prefixes are actually used.
- $valid{$1 . $2 . $3} = 1;
+ $valid{"$base$dist$X"} = 1;
}
}
}
Changing the regexp would make them much more complex.