Throw away "./" in findfile so that the Mac makefile has valid paths.
[u/mdw/putty] / mkfiles.pl
index 840a409..d595e53 100755 (executable)
@@ -242,6 +242,7 @@ sub findfile {
     $i = 0;
     foreach $dir (@srcdirs) {
       $outdir = $dir, $i++ if -f "$dir$name";
+      $outdir=~s/^\.\///;
     }
     die "multiple instances of source file $name\n" if $i > 1;
     $findfilecache{$name} = $outdir . $name;
@@ -895,8 +896,6 @@ if (defined $makefiles{'gtk'}) {
     "\n".
     ".SUFFIXES:\n".
     "\n".
-    "%.o:\n".
-    "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n".
     "\n";
     print &splitline("all:" . join "", map { " $_" } &progrealnames("XU"));
     print "\n\n";
@@ -911,6 +910,7 @@ if (defined $makefiles{'gtk'}) {
     foreach $d (&deps("X.o", undef, $dirpfx, "/", "gtk")) {
       print &splitline(sprintf("%s: %s", $d->{obj}, join " ", @{$d->{deps}})),
           "\n";
+      print &splitline("\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c $d->{deps}->[0]\n");
     }
     print "\n";
     print $makefile_extra{'gtk'};