diff --git a/Recipe b/Recipe index 0cd8a402..03b6970b 100644 --- a/Recipe +++ b/Recipe @@ -19,7 +19,7 @@ !makefile lcc windows/Makefile.lcc !makefile gtk unix/Makefile.gtk !makefile unix unix/Makefile.ux -!makefile am unix/Makefile.am +!makefile am Makefile.am !makefile osx macosx/Makefile !makefile devcppproj windows/DEVCPP !makefile vstudio10 windows/VS2010 @@ -247,8 +247,8 @@ CFLAGS += -DMACOSX # List the man pages for the automake makefile. !begin am -man1_MANS = ../doc/plink.1 ../doc/pscp.1 ../doc/psftp.1 ../doc/pterm.1 \ - ../doc/putty.1 ../doc/puttygen.1 ../doc/puttytel.1 +man1_MANS = doc/plink.1 doc/pscp.1 doc/psftp.1 doc/pterm.1 \ + doc/putty.1 doc/puttygen.1 doc/puttytel.1 !end # In automake, chgrp/chmod pterm after installation, if configured to. diff --git a/configure b/configure deleted file mode 100755 index d56f50a3..00000000 --- a/configure +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -$(echo "$0" | sed '$s!configure$!unix/configure!') "$@" diff --git a/unix/configure.ac b/configure.ac similarity index 100% rename from unix/configure.ac rename to configure.ac diff --git a/mkauto.sh b/mkauto.sh index 4a467a51..9759438f 100755 --- a/mkauto.sh +++ b/mkauto.sh @@ -8,4 +8,4 @@ test -f unix.h && cd .. # Run autoconf on our real configure.in. -(cd unix && autoreconf -i && rm -rf autom4te.cache) +autoreconf -i && rm -rf autom4te.cache diff --git a/mkfiles.pl b/mkfiles.pl index 9ec915a0..bb767c16 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -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; @@ -1485,8 +1486,7 @@ if (defined $makefiles{'am'}) { # 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 +1506,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 +1909,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; diff --git a/mkunxarc.sh b/mkunxarc.sh index b15e2f45..8b17dc51 100755 --- a/mkunxarc.sh +++ b/mkunxarc.sh @@ -70,7 +70,7 @@ if test "x$ver" != "x"; then md5sum `find . -name '*.[ch]' -print` > manifest; echo "$ver" > version.def) fi -sed "s/^AC_INIT(putty,.*/AC_INIT(putty, $autoconfver)/" unix/configure.ac > uxarc/$arcname/unix/configure.ac +sed "s/^AC_INIT(putty,.*/AC_INIT(putty, $autoconfver)/" configure.ac > uxarc/$arcname/configure.ac (cd uxarc/$arcname && sh mkauto.sh) 2>errors || { cat errors >&2; exit 1; } tar -C uxarc -chzof $arcname.tar.gz $arcname diff --git a/unix/configure b/unix/configure new file mode 100755 index 00000000..b2b033d8 --- /dev/null +++ b/unix/configure @@ -0,0 +1,3 @@ +#!/bin/sh + +$(echo "$0" | sed '$s!configure$!../configure!') "$@"