]> git.ipfire.org Git - people/ms/putty.git/blame - mkauto.sh
Add search to connection list box.
[people/ms/putty.git] / mkauto.sh
CommitLineData
1c1af145 1#! /bin/sh
2# This script makes the autoconf mechanism for the Unix port work.
3# It's separate from mkfiles.pl because it won't work (and isn't needed)
4# on a non-Unix system.
5
6# It's nice to be able to run this from inside the unix subdir as
7# well as from outside.
8test -f unix.h && cd ..
9
10# Persuade automake to give us a copy of its install-sh. This is a
11# pain because I don't actually want to have to _use_ automake.
12# Instead, I construct a trivial unrelated automake project in a
13# temporary subdirectory, run automake so that it'll copy
14# install-sh into that directory, then copy it back out again.
15# Hideous, but it should work.
16
17mkdir automake-grievous-hack
18cat > automake-grievous-hack/hello.c << EOF
19#include <stdio.h>
20int main(int argc, char **argv)
21{
22 printf("hello, world\n");
23 return 0;
24}
25EOF
26cat > automake-grievous-hack/Makefile.am << EOF
27bin_PROGRAMS = hello
28hello_SOURCES = hello.c
29EOF
30cat > automake-grievous-hack/configure.ac << EOF
31AC_INIT
32AM_INIT_AUTOMAKE(hello, 1.0)
33AC_CONFIG_FILES([Makefile])
34AC_PROG_CC
35AC_OUTPUT
36EOF
37echo Some news > automake-grievous-hack/NEWS
38echo Some text > automake-grievous-hack/README
39echo Some people > automake-grievous-hack/AUTHORS
40echo Some changes > automake-grievous-hack/ChangeLog
41rm -f install-sh # this won't work if we accidentally have one _here_
42(cd automake-grievous-hack && autoreconf -i && \
43 cp install-sh ../unix/install-sh)
44rm -rf automake-grievous-hack
45
46# That was the hard bit. Now run autoconf on our real configure.in.
47(cd unix && autoreconf && rm -rf aclocal.m4 autom4te.cache)