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