Completely revamped automatic de-ANSI-fication
authorTom Tromey <tromey@redhat.com>
Mon, 27 Nov 1995 20:54:24 +0000 (20:54 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 27 Nov 1995 20:54:24 +0000 (20:54 +0000)
automake.in

index d8be907..ea9e89d 100755 (executable)
@@ -42,7 +42,8 @@ $am_dir = "@datadir@/@PACKAGE@";
 @common_sometimes =
     (
      "version.texi", "aclocal.m4", "acconfig.h", "config.h.top",
-     "config.h.bot", "stamp-h.in", "mdate-sh"
+     "config.h.bot", "stamp-h.in", "mdate-sh", "ansi2knr.c",
+     "ansi2knr.1"
      );
 
 $USAGE = "  --amdir=DIR           directory storing config files
@@ -319,9 +320,14 @@ sub handle_programs
     push (@suffixes, '.c', '.o');
     if (defined $contents{'@kr@'})
     {
-       $obj = '${kr}.o';
+       $obj = '.${kr}o';
+       push (@suffixes, '._c', '._o');
+
+       &require_file ('ansi2knr.c');
+       &require_file ('ansi2knr.1');
+
+       $output_vars .= &file_contents ('kr-vars');
        $output_rules .= &file_contents ('compile-kr');
-       push (@suffixes, '.krc', '.krh', '.kro');
     }
 
     local (@sources, @objects);
@@ -865,6 +871,12 @@ sub read_am_file
                }
            }
        }
+       elsif ($_ eq '@kr@')
+       {
+           # Special case: this means we want automatic
+           # de-ANSI-fication.  FIXME think of a better way.
+           $contents{'@kr@'} = 1;
+       }
        elsif (m/^ *([a-zA-Z_.][a-zA-Z0-9_.]*) *:/)
        {
            # Found a rule.