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