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