Merge from EXISCAN branch.
[exim.git] / src / scripts / Configure-os.c
1 #! /bin/sh
2 # $Cambridge: exim/src/scripts/Configure-os.c,v 1.1 2004/10/06 15:07:40 ph10 Exp $
3
4 # Shell script to build os.c. There doesn't have to be an OS-specific os.c
5 # file, but if there is, it gets copied at the start of os.c. The basic src
6 # copy of os.c contains generic functions, controlled in some cases by
7 # macro switches so that where they are common to a number of OS, they can
8 # just be switched in.
9
10 scripts=../scripts
11
12 # First off, get the OS type, and check that there is a make file for it.
13
14 os=`$scripts/os-type -generic` || exit 1
15
16 if test ! -r ../OS/Makefile-$os
17 then echo ""
18 echo "*** Sorry - operating system $os is not supported"
19 echo "*** See OS/Makefile-* for supported systems" 1>&2
20 echo ""
21 exit 1;
22 fi
23
24 # Now build the file
25
26 rm -f os.c
27 echo '#include "exim.h"' > os.c || exit 1
28 test -r ../OS/os.c-$os && cat ../OS/os.c-$os >> os.c
29 echo '#include "../src/os.c"' >> os.c || exit 1
30
31 # End of Configure-os.c