]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - mkfiles.pl
Replace quaint references to floppies with "USB stick".
[PuTTY.git] / mkfiles.pl
index 9ec915a0dd608fa8d5a244b28d12451e1ba49b02..563d83f688532f7466118e552948305b0090acfd 100755 (executable)
@@ -1472,7 +1472,8 @@ if (defined $makefiles{'unix'}) {
 }
 
 if (defined $makefiles{'am'}) {
-    $dirpfx = "\$(srcdir)/" . &dirpfx($makefiles{'am'}, "/");
+    die "Makefile.am in a subdirectory is not supported\n"
+        if &dirpfx($makefiles{'am'}, "/") ne "";
 
     ##-- Unix/autoconf Makefile.am
     open OUT, ">$makefiles{'am'}"; select OUT;
@@ -1481,12 +1482,15 @@ if (defined $makefiles{'am'}) {
     "#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
     "# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n\n";
 
+    # 2014-02-22: as of automake-1.14 we begin to get complained at if
+    # we don't use this option
+    print "AUTOMAKE_OPTIONS = subdir-objects\n\n";
+
     # Complete list of source and header files. Not used by the
     # auto-generated parts of this makefile, but Recipe might like to
     # have it available as a variable so that mandatory-rebuild things
     # (version.o) can conveniently be made to depend on it.
-    @sources = ("allsources", "=",
-                map {"${dirpfx}$_"} sort keys %allsourcefiles);
+    @sources = ("allsources", "=", sort keys %allsourcefiles);
     print &splitline(join " ", @sources), "\n\n";
 
     @cliprogs = ("bin_PROGRAMS", "=");
@@ -1506,12 +1510,12 @@ if (defined $makefiles{'am'}) {
     print "endif\n\n";
 
     %objtosrc = ();
-    foreach $d (&deps("X", undef, $dirpfx, "/", "am")) {
+    foreach $d (&deps("X", undef, "", "/", "am")) {
       $objtosrc{$d->{obj}} = $d->{deps}->[0];
     }
 
     print &splitline(join " ", "AM_CPPFLAGS", "=",
-                     map {"-I$dirpfx$_"} @srcdirs), "\n";
+                     map {"-I\$(srcdir)/$_"} @srcdirs), "\n";
 
     @amcflags = ("\$(COMPAT)", "\$(XFLAGS)", "\$(WARNINGOPTS)");
     print "if HAVE_GTK\n";
@@ -1909,7 +1913,7 @@ if ($do_unix) {
     system "./mkauto.sh";
     die "mkfiles.pl: mkauto.sh returned $?\n" if $? > 0;
     if ($do_unix == 1) {
-        chdir ($targetdir = dirname($makefiles{"am"}))
+        chdir ($targetdir = "unix")
             or die "$targetdir: chdir: $!\n";
     }
     system "./configure", @confargs;