aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2014-02-22 18:19:05 +0000
committerSimon Tatham <anakin@pobox.com>2014-02-22 18:19:05 +0000
commitbcf1c96573f2945fc54e9247303c6dca00bbbe1d (patch)
tree59f23694f939e63ff99e1c6e5b51c91874e764e7
parent580f9059e3e9f28ca1281867d321578a5f20ce9b (diff)
downloadpuzzles-bcf1c96573f2945fc54e9247303c6dca00bbbe1d.zip
puzzles-bcf1c96573f2945fc54e9247303c6dca00bbbe1d.tar.gz
puzzles-bcf1c96573f2945fc54e9247303c6dca00bbbe1d.tar.bz2
puzzles-bcf1c96573f2945fc54e9247303c6dca00bbbe1d.tar.xz
Fix the Automake makefile for automake 1.14.
This is a combination of PuTTY r10142 and the relevant pieces of r10141: we now enable the 'subdir-objects' mode in Makefile.am, and stop using $(subdir) in source file paths. (As a consequence of the latter the automake machinery now cannot live anywhere but at the top level of the source tree, but since that's where it was already, this is less of an upheaval here than it was for PuTTY!) [originally from svn r10146] [r10141 == a947c49bec36957cb5d38e1dc2e22dc0e3465849 in putty repository] [r10142 == 0da225829234744b1141aea3a7c54ad7d74679a7 in putty repository]
-rwxr-xr-xmkfiles.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/mkfiles.pl b/mkfiles.pl
index b1583ae..c1623df 100755
--- a/mkfiles.pl
+++ b/mkfiles.pl
@@ -1189,7 +1189,8 @@ if (defined $makefiles{'gtk'}) {
if (defined $makefiles{'am'}) {
$mftyp = '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;
@@ -1216,7 +1217,7 @@ if (defined $makefiles{'am'}) {
%amspeciallibs = ();
%amlibobjname = ();
%allsources = ();
- foreach $d (&deps("X", undef, $dirpfx, "/", "am")) {
+ foreach $d (&deps("X", undef, "", "/", "am")) {
my $obj = $d->{obj};
my $use_archive = 0;
@@ -1242,6 +1243,10 @@ if (defined $makefiles{'am'}) {
map { $allsources{$_} = 1 } @{$d->{deps}};
}
+ # 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
@@ -1249,7 +1254,7 @@ if (defined $makefiles{'am'}) {
print &splitline(join " ", "allsources", "=",
sort {$a cmp $b} keys %allsources), "\n\n";
- @amcppflags = map {"-I$dirpfx$_"} @srcdirs;
+ @amcppflags = map {"-I\$(srcdir)/$_"} @srcdirs;
print &splitline(join " ", "AM_CPPFLAGS", "=", @amcppflags, "\n");
@amcflags = ("\$(GTK_CFLAGS)", "\$(WARNINGOPTS)");