Commit | Line | Data |
---|---|---|
61ec970d | 1 | #!/bin/sh |
61ec970d PH |
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. | |
80fea873 | 5 | # |
9242a7e8 | 6 | # Copyright (c) The Exim Maintainers 2017 |
61ec970d PH |
7 | |
8 | test ! -d ../src && \ | |
9 | echo "*** $0 should be run in a system-specific subdirectory." && \ | |
10 | exit 1 | |
11 | test -r version.c && \ | |
12 | echo "*** It appears that $0 has already been run." && \ | |
13 | exit 1 | |
14 | if [ -r pcre/Makefile ] ; then | |
15 | echo "*** It appears that $0 was previously interrupted." | |
16 | echo "*** You need to remove the build directory, and then run 'make' again." | |
17 | exit 1 | |
18 | fi | |
19 | ||
20 | ||
61ec970d PH |
21 | echo "" |
22 | echo ">>> Creating links to source files..." | |
23 | ||
24 | ||
74fc64f2 TF |
25 | # The sources for modular parts of Exim have to be linked independently |
26 | # in their own sub-directories, since their .o files are built using | |
27 | # their own Makefile in their sub-directory. | |
61ec970d | 28 | |
74fc64f2 | 29 | # Firstly the lookups |
61ec970d PH |
30 | mkdir lookups |
31 | cd lookups | |
0a349494 | 32 | # Makefile is generated |
93893bd9 | 33 | for f in README cdb.c dbmdb.c dnsdb.c dsearch.c ibase.c ldap.h ldap.c \ |
5bde3efa | 34 | lmdb.c lsearch.c mysql.c redis.c nis.c nisplus.c oracle.c passwd.c \ |
93893bd9 JH |
35 | pgsql.c spf.c sqlite.c testdb.c whoson.c \ |
36 | lf_functions.h lf_check_file.c lf_quote.c lf_sqlperform.c | |
37 | do | |
38 | ln -s ../../src/lookups/$f $f | |
39 | done | |
61ec970d PH |
40 | |
41 | cd .. | |
42 | ||
43 | # Likewise for the code for the routers | |
44 | mkdir routers | |
45 | cd routers | |
93893bd9 JH |
46 | for f in README Makefile accept.h accept.c dnslookup.h dnslookup.c \ |
47 | ipliteral.h ipliteral.c iplookup.h iplookup.c manualroute.h \ | |
48 | manualroute.c queryprogram.h queryprogram.c redirect.h redirect.c \ | |
49 | rf_functions.h rf_change_domain.c rf_expand_data.c rf_get_errors_address.c \ | |
50 | rf_get_munge_headers.c rf_get_transport.c rf_get_ugid.c rf_queue_add.c \ | |
51 | rf_lookup_hostlist.c rf_self_action.c rf_set_ugid.c | |
52 | do | |
53 | ln -s ../../src/routers/$f $f | |
54 | done | |
61ec970d PH |
55 | |
56 | cd .. | |
57 | ||
58 | # Likewise for the code for the transports | |
59 | mkdir transports | |
60 | cd transports | |
93893bd9 | 61 | for f in README Makefile appendfile.h appendfile.c autoreply.h \ |
3369a853 ACK |
62 | autoreply.c lmtp.h lmtp.c pipe.h pipe.c queuefile.c queuefile.h \ |
63 | smtp.h smtp.c smtp_socks.c tf_maildir.c tf_maildir.h | |
93893bd9 JH |
64 | do |
65 | ln -s ../../src/transports/$f $f | |
66 | done | |
61ec970d PH |
67 | |
68 | cd .. | |
69 | ||
70 | # Likewise for the code for the authorization functions | |
71 | mkdir auths | |
72 | cd auths | |
f4d091fb | 73 | for f in README Makefile call_pam.c call_pwcheck.c \ |
93893bd9 JH |
74 | call_radius.c check_serv_cond.c cyrus_sasl.c cyrus_sasl.h gsasl_exim.c \ |
75 | gsasl_exim.h get_data.c get_no64_data.c heimdal_gssapi.c heimdal_gssapi.h \ | |
76 | md5.c xtextencode.c xtextdecode.c cram_md5.c cram_md5.h plaintext.c plaintext.h \ | |
77 | pwcheck.c pwcheck.h auth-spa.c auth-spa.h dovecot.c dovecot.h sha1.c spa.c \ | |
b3ef41c9 | 78 | spa.h tls.c tls.h |
93893bd9 JH |
79 | do |
80 | ln -s ../../src/auths/$f $f | |
81 | done | |
61ec970d PH |
82 | cd .. |
83 | ||
80a47a2c TK |
84 | # Likewise for the code for the PDKIM library |
85 | mkdir pdkim | |
86 | cd pdkim | |
2592e6c0 | 87 | for f in README Makefile crypt_ver.h pdkim.c \ |
9b2583c4 | 88 | pdkim.h hash.c hash.h signing.c signing.h blob.h |
93893bd9 JH |
89 | do |
90 | ln -s ../../src/pdkim/$f $f | |
91 | done | |
2592e6c0 | 92 | cd .. |
80a47a2c | 93 | |
61ec970d PH |
94 | # The basic source files for Exim and utilities. NB local_scan.h gets linked, |
95 | # but local_scan.c does not, because its location is taken from the build-time | |
96 | # configuration. Likewise for the os.c file, which gets build dynamically. | |
97 | ||
63af6f3a JH |
98 | for f in blob.h dbfunctions.h dbstuff.h exim.h functions.h globals.h \ |
99 | hash.h local_scan.h \ | |
100 | macros.h mytypes.h osfunctions.h store.h structs.h lookupapi.h sha_ver.h \ | |
93893bd9 | 101 | \ |
f4d091fb | 102 | acl.c buildconfig.c base64.c child.c crypt16.c daemon.c dbfn.c debug.c deliver.c \ |
93893bd9 JH |
103 | directory.c dns.c drtables.c dummies.c enq.c exim.c exim_dbmbuild.c \ |
104 | exim_dbutil.c exim_lock.c expand.c filter.c filtertest.c globals.c \ | |
63af6f3a | 105 | hash.c header.c host.c ip.c log.c lss.c match.c moan.c parse.c perl.c queue.c \ |
93893bd9 | 106 | rda.c readconf.c receive.c retry.c rewrite.c rfc2047.c route.c search.c \ |
bc3c7bb7 | 107 | setenv.c environment.c \ |
93893bd9 JH |
108 | sieve.c smtp_in.c smtp_out.c spool_in.c spool_out.c std-crypto.c store.c \ |
109 | string.c tls.c tlscert-gnu.c tlscert-openssl.c tls-gnu.c tls-openssl.c \ | |
42055a33 JH |
110 | tod.c transport.c tree.c verify.c version.c \ |
111 | dkim.c dkim.h dkim_transport.c dmarc.c dmarc.h \ | |
d185889f | 112 | valgrind.h memcheck.h \ |
5f69a529 | 113 | macro_predef.c macro_predef.h |
93893bd9 JH |
114 | do |
115 | ln -s ../src/$f $f | |
116 | done | |
61ec970d | 117 | |
8523533c | 118 | # WITH_CONTENT_SCAN |
93893bd9 JH |
119 | for f in spam.c spam.h spool_mbox.c regex.c mime.c mime.h malware.c |
120 | do | |
121 | ln -s ../src/$f $f | |
122 | done | |
8523533c | 123 | |
8523533c | 124 | # EXPERIMENTAL_* |
93893bd9 JH |
125 | for f in bmi_spam.c bmi_spam.h dcc.c dcc.h dane.c dane-gnu.c dane-openssl.c \ |
126 | danessl.h imap_utf7.c spf.c spf.h srs.c srs.h utf8.c | |
127 | do | |
128 | ln -s ../src/$f $f | |
129 | done | |
6a8f9482 | 130 | |
8523533c | 131 | |
61ec970d | 132 | # End of MakeLinks |