10111e7c30ff6365f728cbb3301611e3d42a7b2c
[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
46
47 # non-scripts generated using above GENERATED_FILE_SRCs
48 GENERATED_ETC_FILES = mhn.defaults
49
50 # auxiliary files (included in distribution but not installed)
51 AUX = Makefile.in
52
53 # all non-generated files in this directory are included in the distribution
54 DIST = $(STATIC_FILES) $(GENERATED_FILE_SRCS) $(AUX)
55
56 # ========= DEPENDENCIES FOR BUILDING ==========
57
58 all: $(GENERATED_ETC_FILES)
59
60 mhn.defaults: $(srcdir)/mhn.defaults.sh $(MHNSEARCHPROG)
61         rm -f $@
62         $(srcdir)/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
63
64 install: install-etc-files
65
66 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"; \
71         done; \
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 \
76               :; \
77             else \
78               $(INSTALL_DATA) "$$path" "$(DESTDIR)$(etcdir)/$$file.dist"; \
79               echo "$(DESTDIR)$(etcdir)/$$file has local modifications; installing with .dist suffix"; \
80             fi; \
81           else \
82             $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \
83           fi; \
84         done
85
86 uninstall: uninstall-etc-files
87
88 uninstall-etc-files:
89         for file in $(STATIC_FILES) $(GENERATED_ETC_FILES); do \
90           rm -f $(DESTDIR)$(etcdir)/$$file; \
91         done
92
93 # ========== DEPENDENCIES FOR CLEANUP ==========
94
95 mostlyclean:
96         rm -f *~
97
98 clean: mostlyclean
99         rm -f $(GENERATED_ETC_FILES)
100
101 distclean: clean
102         rm -f Makefile
103
104 realclean: distclean
105
106 superclean: realclean
107
108 # ========== DEPENDENCIES FOR MAINTENANCE ==========
109
110 subdir = etc
111
112 Makefile: Makefile.in ../config.status
113         cd .. && ./config.status $(subdir)/$@
114
115 distdir = ../`cat ../distname`/$(subdir)
116 nmhdist: $(DIST)
117         @echo "Copying distribution files in $(subdir)"
118         @for file in $(DIST); do \
119           cp -p $(srcdir)/$$file $(distdir); \
120         done