mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-08 08:58:00 +00:00
Move the Unix configure script up to the top level.
Previously, 'configure' and its assorted machinery lived in the 'unix' subdir, because that seemed like a clean place to keep it given that all the other per-platform Makefiles live in their platform directories. However, this never sat all that happily with autotools, and even less so now that it likes to have object file pathnames parallel source file pathnames: if you have Makefile.am refer to source files outside its subdir as "../terminal.c" and enable subdir-objects then any out-of-tree build calls the corresponding object file "../terminal.o" and so your build products mostly end up at the directory above your build dir! And as of autotools 1.14 my previous compensatory bodge of prefixing every source file path in Makefile.am with "$(srcdir)" has stopped working too. So I'm giving in to necessity, and changing policy by moving the configure machinery up to the top level of the source tree where autotools will be less confused by it. This should not be taken as any indication of the primacy of the Unix port, only of the recalcitrance of autotools. Whereas before we had a trivial script called 'configure' at the top level that invoked unix/configure to effectively do an 'out-of-tree build' (for make purposes) at the top level of the source tree, we now have a similar script in unix/configure. So this _should_ make very little difference: people who were previously running configure from the top level should still be able to, and likewise people who were running it from the unix subdir. [originally from svn r10141]
This commit is contained in:
parent
f272ea88db
commit
a947c49bec
6
Recipe
6
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.
|
||||
|
3
configure
vendored
3
configure
vendored
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
$(echo "$0" | sed '$s!configure$!unix/configure!') "$@"
|
@ -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
|
||||
|
12
mkfiles.pl
12
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;
|
||||
|
@ -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
|
||||
|
3
unix/configure
vendored
Executable file
3
unix/configure
vendored
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
$(echo "$0" | sed '$s!configure$!../configure!') "$@"
|
Loading…
Reference in New Issue
Block a user