2 # Makefile for etc subdirectory
9 top_srcdir = @top_srcdir@
14 exec_prefix = @exec_prefix@
19 mailspool = @mailspool@
20 masquerade = @masquerade@
21 smtpservers = @smtpservers@
24 INSTALL_PROGRAM = @INSTALL_PROGRAM@
25 INSTALL_DATA = @INSTALL_DATA@
27 # Path to search for programs to handle MIME
28 # content. Used to create mhn.defaults
29 MHNSEARCHPATH = "$(PATH):/usr/demo/SOUND"
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
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
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
50 # files generated using above GENERATED_FILE_SRCs
51 GENERATED_FILES = mhn.defaults mts.conf sendfiles
53 # data files we need to install (in etc)
54 INSTALL_FILES = $(STATIC_FILES) $(GENERATED_FILES)
56 # scripts we need to install (in bin)
59 # auxiliary files (included in distribution but not installed)
62 # all non-generated files in this directory are included in the distribution
63 DIST = $(STATIC_FILES) $(GENERATED_FILE_SRCS) $(SCRIPTS) $(AUX)
65 # ========= DEPENDENCIES FOR BUILDING ==========
67 all: $(GENERATED_FILES)
69 mhn.defaults: $(srcdir)/mhn.defaults.sh $(MHNSEARCHPROG)
71 $(srcdir)/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
73 mts.conf: $(srcdir)/mts.conf.in Makefile
75 $(SED) -e 's,%mailspool%,$(mailspool),' \
76 -e 's,%etcdir%,$(etcdir),' \
77 -e 's,%masquerade%,$(masquerade),' \
78 -e 's,%smtpservers%,$(smtpservers),' < $(srcdir)/mts.conf.in > $@
80 sendfiles: $(srcdir)/sendfiles.in Makefile
82 $(SED) -e 's,%libdir%,$(libdir),' < $(srcdir)/sendfiles.in > $@
84 install: install-files install-scripts
87 $(top_srcdir)/mkinstalldirs $(etcdir)
88 for file in $(INSTALL_FILES); do \
90 if [ -f $(etcdir)/$$file ]; then \
91 mv $(etcdir)/$$file $(etcdir)/$$file.prev; \
93 $(INSTALL_DATA) $(srcdir)/$$file $(etcdir)/$$file; \
94 if diff $(etcdir)/$$file.prev $(etcdir)/$$file; then \
95 rm $(etcdir)/$$file.prev; \
100 $(top_srcdir)/mkinstalldirs $(bindir)
101 for script in $(SCRIPTS); do \
102 $(INSTALL_PROGRAM) $(srcdir)/$$script $(bindir)/$$script; \
105 uninstall: uninstall-files uninstall-scripts
108 for file in $(INSTALL_FILES); do \
109 rm -f $(etcdir)/$$file; \
113 for script in $(SCRIPTS); do \
114 rm -f $(bindir)/$$script; \
117 # ========== DEPENDENCIES FOR CLEANUP ==========
123 rm -f $(GENERATED_FILES)
130 superclean: realclean
132 # ========== DEPENDENCIES FOR MAINTENANCE ==========
136 Makefile: Makefile.in ../config.status
137 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
139 distdir = ../`cat ../distname`/$(subdir)
141 @echo "Copying distribution files in $(subdir)"
142 @for file in $(DIST); do \
143 cp -p $(srcdir)/$$file $(distdir); \