mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Utterly hideous new approach to extracting install-sh from the
autoconf/automake edifice, since my previous approach of guessing its pathname turns out not to work on at least one kind of system. [originally from svn r7984]
This commit is contained in:
parent
8859ad32d4
commit
1d27dc5f95
41
mkauto.sh
41
mkauto.sh
@ -3,6 +3,41 @@
|
||||
# It's separate from mkfiles.pl because it won't work (and isn't needed)
|
||||
# on a non-Unix system.
|
||||
|
||||
# Track down automake's copy of install-sh
|
||||
cp `aclocal --print-ac-dir | sed 's/aclocal$/automake/'`/install-sh unix/.
|
||||
(cd unix && autoreconf && rm -rf aclocal.m4 autom4te.cache)
|
||||
# Persuade automake to give us a copy of its install-sh. This is a
|
||||
# pain because I don't actually want to have to _use_ automake.
|
||||
# Instead, I construct a trivial unrelated automake project in a
|
||||
# temporary subdirectory, run automake so that it'll copy
|
||||
# install-sh into that directory, then copy it back out again.
|
||||
# Hideous, but it should work.
|
||||
|
||||
mkdir automake-grievous-hack
|
||||
cat > automake-grievous-hack/hello.c << EOF
|
||||
#include <stdio.h>
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
printf("hello, world\n");
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
cat > automake-grievous-hack/Makefile.am << EOF
|
||||
bin_PROGRAMS = hello
|
||||
hello_SOURCES = hello.c
|
||||
EOF
|
||||
cat > automake-grievous-hack/configure.ac << EOF
|
||||
AC_INIT
|
||||
AM_INIT_AUTOMAKE(hello, 1.0)
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_PROG_CC
|
||||
AC_OUTPUT
|
||||
EOF
|
||||
echo Some news > automake-grievous-hack/NEWS
|
||||
echo Some text > automake-grievous-hack/README
|
||||
echo Some people > automake-grievous-hack/AUTHORS
|
||||
echo Some changes > automake-grievous-hack/ChangeLog
|
||||
rm -f install-sh # this won't work if we accidentally have one _here_
|
||||
(cd automake-grievous-hack && autoreconf -i && \
|
||||
cp install-sh ../unix/install-sh)
|
||||
rm -rf automake-grievous-hack
|
||||
|
||||
# That was the hard bit. Now run autoconf on our real configure.in.
|
||||
(cd unix && autoreconf && rm -rf aclocal.m4 autom4te.cache)
|
||||
|
Loading…
Reference in New Issue
Block a user