(unquote_cond_val): Unquote \n.
(read_am_file): If line ends with `\', preserve it and add a
newline.
(read_main_am_file): In conditional case, put conditional text at
beginning of each generated line.
+1999-03-31 Tom Tromey <tromey@cygnus.com>
+
+ * automake.in (quote_cond_val): Quote \n.
+ (unquote_cond_val): Unquote \n.
+ (read_am_file): If line ends with `\', preserve it and add a
+ newline.
+ (read_main_am_file): In conditional case, put conditional text at
+ beginning of each generated line.
+
1999-03-31 Alexandre Oliva <oliva@dcc.unicamp.br>
* automake.in (handle_tests): support XFAIL_TEST
+* Write tests for `\' preservation.
+
* Run automake before libtool. It will report an error but
still won't put the file into the disty. This is wrong.
From Mark H Wilkinson <mhw@kremvax.demon.co.uk>
* Add code to generate foo-config script like gnome, gtk
-* right now automake sets `TAR' when automake is configured
- this loses in some situations.
- however, checking for it in every configure.in also seems lame.
- probably should just give in on this; meanwhile people can
- override TAR themselves.
-
* `DEFS += foo' won't work.
That's because DEFS is defined in header-vars.am, which is read
after the user's Makefile.am.
sub quote_cond_val
{
local ($val) = @_;
- $val =~ s/ /\001/g;
- $val =~ s/\t/\003/g;
+ $val =~ tr/ \t\n/\001\003\004/;
$val = "\002" if $val eq '';
return $val;
}
sub unquote_cond_val
{
local ($val) = @_;
- $val =~ s/\001/ /g;
- $val =~ s/\003/\t/g;
+ $val =~ tr/\001\003\004/ \t\n/;
$val =~ s/\002//g;
return $val;
}
else
{
$saw_bk = /\\$/;
- # Chop newline and backslash if this line is
- # continued. ensure trailing whitespace exists.
- chop if $saw_bk;
- chop if $saw_bk;
$contents{$last_var_name} .= ' '
unless $contents{$last_var_name} =~ /\s$/;
$contents{$last_var_name} .= $_;
local ($value);
if ($3 ne '' && substr ($3, -1) eq "\\")
{
- $value = substr ($3, 0, length ($3) - 1);
+ # We preserve the `\' because otherwise the long lines
+ # that are generated will be truncated by broken
+ # `sed's.
+ $value = $3 . "\n";
}
else
{
{
local ($vcond) = shift (@cond_vals);
local ($val) = &unquote_cond_val (shift (@cond_vals));
- $output_vars .= ($vcond . $curs
- . ' ' . $def_type{$curs} . '= '
- . $val . "\n");
+ $output_vars .= ($vcond . $curs . ' '
+ . $def_type{$curs} . "= \\\n");
+ local ($line);
+ foreach $line (split ("\n", $val))
+ {
+ $output_vars .= $vcond . $line . "\n";
+ }
}
}
else
-@set UPDATED 26 March 1999
+@set UPDATED 31 March 1999
@set EDITION 1.4a
@set VERSION 1.4a
-@set UPDATED 26 March 1999
+@set UPDATED 31 March 1999
@set EDITION 1.4a
@set VERSION 1.4a