The pass 1 preprocessor provides a dependancy generation facility,
using --depends=D , uses teh passed in filename and changes its
extension to .d for the output filename, however this functionality is
broken. A file names one.two.three would have an output filename of
one.d and not one.two.d
The second issue is that variable setting currently cannot contain
the " character which is wrong, the attached patch fixes this and
allows for \" to include " charaters in variables.
--- /usr/lib/wml/exec/wml_p1_ipp-orig 2003-04-10 17:41:20.000000000 +0100
+++ /usr/lib/wml/exec/wml_p1_ipp 2003-04-10 17:24:42.000000000 +0100
@@ -145,8 +145,9 @@
while ($str) {
$str =~ s|^\s+||;
last if ($str eq '');
- if ($str =~ s|^([a-zA-Z][a-zA-Z0-9_]*)="([^"]*)"||) {
- $arg->{$1} = $2;
+
+ if ($str =~ s/^([a-zA-Z][a-zA-Z0-9_]*)="((?:\\\\|\\"|[^"])*)"//) {
+ my ($x, $y) = ($1, $2); $y =~ s/\\([\\"])/$1/g; $arg->{$x} = $y;
}
elsif ($str =~ s|^([a-zA-Z][a-zA-Z0-9_]*)=(\S+)||) {
$arg->{$1} = $2;
@@ -634,7 +635,7 @@
if ($opt_M ne '-' && $opt_o ne '-') {
# Write dependencies
if ($opt_M =~ m|D|) {
- if ($opt_o =~ m|(.*?)\.|) {
+ if ($opt_o =~ m|(.*)\.|) {
$depfile = $1 . '.d';
}
else {