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