summaryrefslogtreecommitdiffstats
path: root/scripts/Configure-os.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:16:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:16:13 +0000
commite90fcc54809db2591dc083f43ef54c6ec8c60847 (patch)
treef20bc206c3c2d5d59d37c46c5cf5d53a20642556 /scripts/Configure-os.c
parentInitial commit. (diff)
downloadexim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.tar.xz
exim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.zip
Adding upstream version 4.96.upstream/4.96upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/Configure-os.c')
-rwxr-xr-xscripts/Configure-os.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/Configure-os.c b/scripts/Configure-os.c
new file mode 100755
index 0000000..f00a562
--- /dev/null
+++ b/scripts/Configure-os.c
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+# Shell script to build os.c. There doesn't have to be an OS-specific os.c
+# file, but if there is, it gets copied at the start of os.c. The basic src
+# copy of os.c contains generic functions, controlled in some cases by
+# macro switches so that where they are common to a number of OS, they can
+# just be switched in.
+
+scripts=../scripts
+
+# First off, get the OS type, and check that there is a make file for it.
+
+os=`$scripts/os-type -generic` || exit 1
+
+if test ! -r ../OS/Makefile-$os
+then echo ""
+ echo "*** Sorry - operating system $os is not supported"
+ echo "*** See OS/Makefile-* for supported systems" 1>&2
+ echo ""
+ exit 1;
+fi
+
+# Now build the file
+
+rm -f os.c
+echo '#include "exim.h"' > os.c || exit 1
+test -r ../OS/os.c-$os && cat ../OS/os.c-$os >> os.c
+echo '#include "../src/os.c"' >> os.c || exit 1
+
+# End of Configure-os.c