Split out hintsdb backend shims to separate files
[exim.git] / src / scripts / MakeLinks
1 #!/bin/sh
2
3 # Script to build links for all the exim source files from the system-
4 # specific build directory. It should be run from within that directory.
5 #
6 # Copyright (c) The Exim Maintainers 1995 - 2024
7 # SPDX-License-Identifier: GPL-2.0-or-later
8
9 test ! -d ../src && \
10   echo "*** $0 should be run in a system-specific subdirectory." && \
11   exit 1
12 test -r version.c && \
13   echo "*** It appears that $0 has already been run." && \
14   exit 1
15 if [ -r pcre/Makefile ] ; then
16   echo "*** It appears that $0 was previously interrupted."
17   echo "*** You need to remove the build directory, and then run 'make' again."
18   exit 1
19 fi
20
21
22 echo ""
23 echo ">>> Creating links to source files..."
24
25
26 # The sources for modular parts of Exim have to be linked independently
27 # in their own sub-directories, since their .o files are built using
28 # their own Makefile in their sub-directory.
29
30 # Firstly the lookups
31 d="lookups"
32 mkdir $d
33 cd $d
34 # Makefile is generated
35 for f in README cdb.c dbmdb.c dnsdb.c dsearch.c ibase.c json.c ldap.h ldap.c \
36   lmdb.c lsearch.c mysql.c nis.c nisplus.c oracle.c passwd.c \
37   pgsql.c readsock.c redis.c spf.c sqlite.c testdb.c whoson.c \
38   lf_functions.h lf_check_file.c lf_quote.c lf_sqlperform.c
39 do
40   ln -s ../../src/$d/$f $f
41 done
42
43 cd ..
44
45 # Likewise for the code for the routers
46 d="routers"
47 mkdir $d
48 cd $d
49 for f in README Makefile accept.h accept.c dnslookup.h dnslookup.c \
50   ipliteral.h ipliteral.c iplookup.h iplookup.c manualroute.h \
51   manualroute.c queryprogram.h queryprogram.c redirect.h redirect.c \
52   rf_functions.h rf_change_domain.c rf_expand_data.c rf_get_errors_address.c \
53   rf_get_munge_headers.c rf_get_transport.c rf_get_ugid.c rf_queue_add.c \
54   rf_lookup_hostlist.c rf_self_action.c rf_set_ugid.c
55 do
56   ln -s ../../src/$d/$f $f
57 done
58
59 cd ..
60
61 # Likewise for the code for the transports
62 d="transports"
63 mkdir $d
64 cd $d
65 for f in README Makefile appendfile.h appendfile.c autoreply.h \
66   autoreply.c lmtp.h lmtp.c pipe.h pipe.c queuefile.c queuefile.h \
67   smtp.h smtp.c smtp_socks.c tf_maildir.c tf_maildir.h
68 do
69   ln -s ../../src/$d/$f $f
70 done
71
72 cd ..
73
74 # Likewise for the code for the authentication drivers
75 d="auths"
76 mkdir $d
77 cd $d
78 for f in README Makefile call_pam.c call_pwcheck.c \
79   call_radius.c check_serv_cond.c cyrus_sasl.c cyrus_sasl.h gsasl_exim.c \
80   gsasl_exim.h get_data.c get_no64_data.c heimdal_gssapi.c heimdal_gssapi.h \
81   xtextencode.c xtextdecode.c cram_md5.c cram_md5.h plaintext.c plaintext.h \
82   pwcheck.c pwcheck.h auth-spa.c auth-spa.h dovecot.c dovecot.h sha1.c spa.c \
83   spa.h tls.c tls.h external.c external.h
84 do
85   ln -s ../../src/$d/$f $f
86 done
87 cd ..
88
89 # and the hintsdb implementations
90 d="hintsdb"
91 mkdir $d
92 cd $d
93 for f in hints_bdb.h hints_gdbm.h hints_ndbm.h hints_sqlite.h hints_tdb.h
94 do
95   ln -s ../../src/$d/$f $f
96 done
97 cd ..
98
99 # Likewise for the code for the PDKIM library
100 d="pdkim"
101 mkdir $d
102 cd $d
103 for f in README Makefile crypt_ver.h pdkim.c \
104   pdkim.h hash.c hash.h signing.c signing.h blob.h
105 do
106   ln -s ../../src/$d/$f $f
107 done
108 cd ..
109
110 # The basic source files for Exim and utilities. NB local_scan.h gets linked,
111 # but local_scan.c does not, because its location is taken from the build-time
112 # configuration. Likewise for the os.c file, which gets build dynamically.
113
114 for f in blob.h dbfunctions.h exim.h functions.h globals.h \
115   hash.h hintsdb.h hintsdb_structs.h local_scan.h \
116   macros.h mytypes.h osfunctions.h path_max.h store.h \
117   structs.h lookupapi.h sha_ver.h \
118   \
119   acl.c buildconfig.c base64.c child.c crypt16.c daemon.c dbfn.c debug.c \
120   deliver.c directory.c dns.c dnsbl.c drtables.c dummies.c enq.c exim.c \
121   exim_dbmbuild.c exim_dbutil.c exim_lock.c expand.c filter.c filtertest.c \
122   globals.c hash.c header.c host.c host_address.c ip.c log.c lss.c match.c md5.c moan.c \
123   parse.c perl.c priv.c proxy.c queue.c rda.c readconf.c receive.c retry.c rewrite.c \
124   regex_cache.c rfc2047.c route.c search.c setenv.c environment.c \
125   sieve.c smtp_in.c smtp_out.c spool_in.c spool_out.c std-crypto.c store.c \
126   string.c tls.c tlscert-gnu.c tlscert-openssl.c tls-cipher-stdname.c \
127   tls-gnu.c tls-openssl.c \
128   tod.c transport.c tree.c verify.c version.c \
129   dkim.c dkim.h dkim_transport.c dmarc.c dmarc.h \
130   valgrind.h memcheck.h \
131   macro_predef.c macro_predef.h
132 do
133   ln -s ../src/$f $f
134 done
135
136 # WITH_CONTENT_SCAN
137 for f in  spam.c spam.h spool_mbox.c regex.c mime.c mime.h malware.c
138 do
139   ln -s ../src/$f $f
140 done
141
142 # EXPERIMENTAL_*
143 for f in  arc.c bmi_spam.c bmi_spam.h dcc.c dcc.h dane.c dane-openssl.c \
144   danessl.h imap_utf7.c spf.c spf.h srs.c srs.h utf8.c xclient.c
145 do
146   ln -s ../src/$f $f
147 done
148
149
150 # End of MakeLinks