Removed --with-smtpservers configure option and thelike
[mmh] / etc / Makefile.in
1 #
2 # Makefile for etc subdirectory
3 #
4
5 SHELL = /bin/sh
6
7 top_srcdir = @top_srcdir@
8 srcdir     = @srcdir@
9 VPATH      = @srcdir@
10
11 prefix      = @prefix@
12 exec_prefix = @exec_prefix@
13 bindir      = @bindir@
14 libdir      = @libdir@
15 etcdir      = @sysconfdir@
16
17 MTS         = @MTS@
18 mailspool   = @mailspool@
19 masquerade  = @masquerade@
20
21 INSTALL         = @INSTALL@
22 INSTALL_PROGRAM = @INSTALL_PROGRAM@
23 INSTALL_SCRIPT  = @INSTALL_SCRIPT@
24 INSTALL_DATA    = @INSTALL_DATA@
25
26 # Path to search for programs to handle MIME
27 # content.  Used to create mhn.defaults
28 MHNSEARCHPATH = "$(PATH):/usr/demo/SOUND"
29
30 # Program used to search path for various programs to
31 # handle MIME content.  Used to create mhn.defaults
32 MHNSEARCHPROG = $(srcdir)/mhn.find.sh
33
34 SED = sed
35
36 .SUFFIXES:
37
38 # static configuration, format, and components files
39 STATIC_FILES =  MailAliases components digestcomps distcomps forwcomps  \
40                 mhl.body mhl.digest mhl.format mhl.forward mhl.headers  \
41                 mhl.reply rcvdistcomps rcvdistcomps.outbox              \
42                 replcomps replgroupcomps scan.MMDDYY scan.YYYYMMDD      \
43                 scan.default scan.mailx scan.nomime scan.size scan.time \
44                 scan.timely scan.unseen
45
46 # templates and scripts from which non-static files are generated
47 GENERATED_FILE_SRCS = mhn.defaults.sh mhn.find.sh mts.conf.in sendfiles.in
48
49 # scripts generated using above GENERATED_FILE_SRCs; don't add binaries
50 # to this list, as they'll get installed with INSTALL_SCRIPT and won't
51 # be stripped.
52 GENERATED_BIN_FILES = sendfiles
53
54 # non-scripts generated using above GENERATED_FILE_SRCs
55 GENERATED_ETC_FILES = mhn.defaults mts.conf
56
57 # auxiliary files (included in distribution but not installed)
58 AUX = Makefile.in
59
60 # all non-generated files in this directory are included in the distribution
61 DIST = $(STATIC_FILES) $(GENERATED_FILE_SRCS) $(AUX)
62
63 # ========= DEPENDENCIES FOR BUILDING ==========
64
65 all: $(GENERATED_BIN_FILES) $(GENERATED_ETC_FILES)
66
67 mhn.defaults: $(srcdir)/mhn.defaults.sh $(MHNSEARCHPROG)
68         rm -f $@
69         $(srcdir)/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
70
71 mts.conf: $(srcdir)/mts.conf.in Makefile
72         rm -f $@
73         $(SED) -e 's,%mts%,$(MTS),' \
74                -e 's,%mailspool%,$(mailspool),' \
75                -e 's,%etcdir%,$(etcdir),' \
76                -e 's,%masquerade%,$(masquerade),' < $(srcdir)/mts.conf.in > $@
77
78 sendfiles: $(srcdir)/sendfiles.in Makefile
79         rm -f $@
80         $(SED) -e 's,%libdir%,$(libdir),' < $(srcdir)/sendfiles.in > $@
81
82 install: install-bin-files install-etc-files
83
84 install-bin-files:
85         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
86         for script in $(GENERATED_BIN_FILES); do \
87           $(INSTALL_SCRIPT) $$script $(DESTDIR)$(bindir)/$$script; \
88         done
89
90 install-etc-files:
91         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(etcdir)
92         INSTALL_FILES="$(GENERATED_ETC_FILES)"; \
93         for file in $(STATIC_FILES); do \
94           INSTALL_FILES="$$INSTALL_FILES $(srcdir)/$$file"; \
95         done; \
96         for path in $$INSTALL_FILES; do \
97           file=`basename $$path`; \
98           echo "Installing $$file..."; \
99           if [ -f "$(DESTDIR)$(etcdir)/$$file" ]; then \
100             if cmp -s "$$path" "$(DESTDIR)$(etcdir)/$$file"; then \
101               echo "$(DESTDIR)$(etcdir)/$$file unchanged, skipped"; \
102             else \
103               $(INSTALL_DATA) "$$path" "$(DESTDIR)$(etcdir)/$$file.dist"; \
104               echo "INFO: $(DESTDIR)$(etcdir)/$$file installed with .dist extension"; \
105             fi; \
106           else \
107             $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \
108           fi; \
109         done
110
111 uninstall: uninstall-bin-files uninstall-etc-files
112
113 uninstall-bin-files:
114         for script in $(GENERATED_BIN_FILES); do \
115           rm -f $(DESTDIR)$(bindir)/$$script; \
116         done
117
118 uninstall-etc-files:
119         for file in $(STATIC_FILES) $(GENERATED_ETC_FILES); do \
120           rm -f $(DESTDIR)$(etcdir)/$$file; \
121         done
122
123 # ========== DEPENDENCIES FOR CLEANUP ==========
124
125 mostlyclean:
126         rm -f *~
127
128 clean: mostlyclean
129         rm -f $(GENERATED_ETC_FILES) $(GENERATED_BIN_FILES)
130
131 distclean: clean
132         rm -f Makefile
133
134 realclean: distclean
135
136 superclean: realclean
137
138 # ========== DEPENDENCIES FOR MAINTENANCE ==========
139
140 subdir = etc
141
142 Makefile: Makefile.in ../config.status
143         cd .. && ./config.status $(subdir)/$@
144  
145 distdir = ../`cat ../distname`/$(subdir)
146 nmhdist: $(DIST)
147         @echo "Copying distribution files in $(subdir)"
148         @for file in $(DIST); do \
149           cp -p $(srcdir)/$$file $(distdir); \
150         done
151