Hello,

More precisely the patch appears only when the debug (-g) option is
used. This is cause by a clash between slash from substitution and slash
from path.

Please find enclosed a patch that changes the substitution and adds a test.

-- 
regards,
Loïc Fejoz
diff -Naur fort77-1.15/fort77.in fort77-1.15.new/fort77.in
--- fort77-1.15/fort77.in	2008-12-02 12:09:36.000000000 +0100
+++ fort77-1.15.new/fort77.in	2008-12-02 12:06:10.000000000 +0100
@@ -231,8 +231,8 @@
 	    $cfile = "$tmpdir/fort77-$$-$seq.c";
 	}
 	if ($debug) {
-	    $debugcmd = ' | @PERL@ -p -e \'s/^(#line.*)""/$1"'
-		. $ffile . '"/\' '
+	    $debugcmd = ' | @PERL@ -p -e \'s|^(#line.*)""|$1"'
+		. $ffile . '"|\' '
 	}
 	if ($cpp || ($ffile =~ /\.F$/)) {
 #         Backslashes at the end of comment lines confuse cpp...
diff -Naur fort77-1.15/tests/foo.inc fort77-1.15.new/tests/foo.inc
--- fort77-1.15/tests/foo.inc	1970-01-01 01:00:00.000000000 +0100
+++ fort77-1.15.new/tests/foo.inc	2008-12-02 12:00:23.000000000 +0100
@@ -0,0 +1,3 @@
+      programme memain
+      write (*,*) 'Hello, world!'
+      end
diff -Naur fort77-1.15/tests/fooinclude.f fort77-1.15.new/tests/fooinclude.f
--- fort77-1.15/tests/fooinclude.f	1970-01-01 01:00:00.000000000 +0100
+++ fort77-1.15.new/tests/fooinclude.f	2008-12-02 12:00:37.000000000 +0100
@@ -0,0 +1 @@
+      INCLUDE 'foo.inc'
diff -Naur fort77-1.15/tests/test.pl fort77-1.15.new/tests/test.pl
--- fort77-1.15/tests/test.pl	1997-07-14 15:24:27.000000000 +0200
+++ fort77-1.15.new/tests/test.pl	2008-12-02 12:05:01.000000000 +0100
@@ -25,7 +25,8 @@
     [ "../fort77 -c foo.f && ../fort77 -o foo foo.o mainmiss.f",
 	   qw(foo.o foo) ],
     [ "../fort77 synerr.f && touch gna"		],
-    [ "../fort77 ishift.f",			qw(a.out) ]
+    [ "../fort77 ishift.f",			qw(a.out) ],
+    [ "if test ! -d subtest; then mkdir subtest; fi && cd subtest && ../../fort77 -g -c -o fooinclude.o -I ../ ../fooinclude.f", qw(subtest/fooinclude.o) ]
 ];
 
 #

Reply via email to