Removed the last masquerading type: username_extension.
[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 mts.conf.in 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 mts.conf
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 mts.conf: $(srcdir)/mts.conf.in Makefile
70         rm -f $@
71         $(SED) -e 's,%mailspool%,$(mailspool),' \
72                -e 's,%etcdir%,$(etcdir),' < $(srcdir)/mts.conf.in > $@
73
74 sendfiles: $(srcdir)/sendfiles.in Makefile
75         rm -f $@
76         $(SED) -e 's,%libdir%,$(libdir),' < $(srcdir)/sendfiles.in > $@
77
78 install: install-bin-files install-etc-files
79
80 install-bin-files:
81         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
82         for script in $(GENERATED_BIN_FILES); do \
83           $(INSTALL_SCRIPT) $$script $(DESTDIR)$(bindir)/$$script; \
84         done
85
86 install-etc-files:
87         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(etcdir)
88         INSTALL_FILES="$(GENERATED_ETC_FILES)"; \
89         for file in $(STATIC_FILES); do \
90           INSTALL_FILES="$$INSTALL_FILES $(srcdir)/$$file"; \
91         done; \
92         for path in $$INSTALL_FILES; do \
93           file=`basename $$path`; \
94           if [ -f "$(DESTDIR)$(etcdir)/$$file" ]; then \
95             if cmp -s "$$path" "$(DESTDIR)$(etcdir)/$$file" ; then \
96               :; \
97             else \
98               $(INSTALL_DATA) "$$path" "$(DESTDIR)$(etcdir)/$$file.dist"; \
99               echo "$(DESTDIR)$(etcdir)/$$file has local modifications; installing with .dist suffix"; \
100             fi; \
101           else \
102             $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \
103           fi; \
104         done
105
106 uninstall: uninstall-bin-files uninstall-etc-files
107
108 uninstall-bin-files:
109         for script in $(GENERATED_BIN_FILES); do \
110           rm -f $(DESTDIR)$(bindir)/$$script; \
111         done
112
113 uninstall-etc-files:
114         for file in $(STATIC_FILES) $(GENERATED_ETC_FILES); do \
115           rm -f $(DESTDIR)$(etcdir)/$$file; \
116         done
117
118 # ========== DEPENDENCIES FOR CLEANUP ==========
119
120 mostlyclean:
121         rm -f *~
122
123 clean: mostlyclean
124         rm -f $(GENERATED_ETC_FILES) $(GENERATED_BIN_FILES)
125
126 distclean: clean
127         rm -f Makefile
128
129 realclean: distclean
130
131 superclean: realclean
132
133 # ========== DEPENDENCIES FOR MAINTENANCE ==========
134
135 subdir = etc
136
137 Makefile: Makefile.in ../config.status
138         cd .. && ./config.status $(subdir)/$@
139
140 distdir = ../`cat ../distname`/$(subdir)
141 nmhdist: $(DIST)
142         @echo "Copying distribution files in $(subdir)"
143         @for file in $(DIST); do \
144           cp -p $(srcdir)/$$file $(distdir); \
145         done