2 # Makefile for etc subdirectory
7 top_srcdir = @top_srcdir@
12 exec_prefix = @exec_prefix@
17 mailspool = @mailspool@
20 INSTALL_PROGRAM = @INSTALL_PROGRAM@
21 INSTALL_SCRIPT = @INSTALL_SCRIPT@
22 INSTALL_DATA = @INSTALL_DATA@
24 # Path to search for programs to handle MIME
25 # content. Used to create mhn.defaults
26 MHNSEARCHPATH = "$(PATH):/usr/demo/SOUND"
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
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
44 # templates and scripts from which non-static files are generated
45 GENERATED_FILE_SRCS = mhn.defaults.sh mhn.find.sh
47 # non-scripts generated using above GENERATED_FILE_SRCs
48 GENERATED_ETC_FILES = mhn.defaults
50 # auxiliary files (included in distribution but not installed)
53 # all non-generated files in this directory are included in the distribution
54 DIST = $(STATIC_FILES) $(GENERATED_FILE_SRCS) $(AUX)
56 # ========= DEPENDENCIES FOR BUILDING ==========
58 all: $(GENERATED_ETC_FILES)
60 mhn.defaults: $(srcdir)/mhn.defaults.sh $(MHNSEARCHPROG)
62 $(srcdir)/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
64 install: install-etc-files
67 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(etcdir)
68 INSTALL_FILES="$(GENERATED_ETC_FILES)"; \
69 for file in $(STATIC_FILES); do \
70 INSTALL_FILES="$$INSTALL_FILES $(srcdir)/$$file"; \
72 for path in $$INSTALL_FILES; do \
73 file=`basename $$path`; \
74 if [ -f "$(DESTDIR)$(etcdir)/$$file" ]; then \
75 if cmp -s "$$path" "$(DESTDIR)$(etcdir)/$$file" ; then \
78 $(INSTALL_DATA) "$$path" "$(DESTDIR)$(etcdir)/$$file.dist"; \
79 echo "$(DESTDIR)$(etcdir)/$$file has local modifications; installing with .dist suffix"; \
82 $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \
86 uninstall: uninstall-etc-files
89 for file in $(STATIC_FILES) $(GENERATED_ETC_FILES); do \
90 rm -f $(DESTDIR)$(etcdir)/$$file; \
93 # ========== DEPENDENCIES FOR CLEANUP ==========
99 rm -f $(GENERATED_ETC_FILES)
106 superclean: realclean
108 # ========== DEPENDENCIES FOR MAINTENANCE ==========
112 Makefile: Makefile.in ../config.status
113 cd .. && ./config.status $(subdir)/$@
115 distdir = ../`cat ../distname`/$(subdir)
117 @echo "Copying distribution files in $(subdir)"
118 @for file in $(DIST); do \
119 cp -p $(srcdir)/$$file $(distdir); \