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