Make mhn.defaults a static file and removed the scripts that built it.
[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 SED = sed
25
26 .SUFFIXES:
27
28 # static configuration, format, and components files
29 STATIC_FILES = components digestcomps distcomps forwcomps  \
30                mhl.body mhl.digest mhl.format mhl.forward mhl.headers  \
31                mhl.reply rcvdistcomps rcvdistcomps.outbox              \
32                replcomps replgroupcomps scan.MMDDYY scan.YYYYMMDD      \
33                scan.nmh scan.mailx scan.nomime scan.size scan.time \
34                scan.timely scan.unseen mhn.defaults
35
36 # auxiliary files (included in distribution but not installed)
37 AUX = Makefile.in
38
39 # all non-generated files in this directory are included in the distribution
40 DIST = $(STATIC_FILES) $(AUX)
41
42 # ========= DEPENDENCIES FOR BUILDING ==========
43
44 all:
45
46 install: install-etc-files
47
48 install-etc-files:
49         mkdir -p $(DESTDIR)$(etcdir)
50         for file in $(STATIC_FILES); do \
51           if [ -f "$(DESTDIR)$(etcdir)/$$file" ]; then \
52             if cmp -s "$(srcdir)/$$file" "$(DESTDIR)$(etcdir)/$$file" ; then \
53               :; \
54             else \
55               $(INSTALL_DATA) "$(srcdir)/$$file" "$(DESTDIR)$(etcdir)/$$file.dist"; \
56               echo "$(DESTDIR)$(etcdir)/$$file has local modifications; installing with .dist suffix"; \
57             fi; \
58           else \
59             $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(etcdir)/$$file; \
60           fi; \
61         done
62
63 uninstall: uninstall-etc-files
64
65 uninstall-etc-files:
66         for file in $(STATIC_FILES) ; do \
67           rm -f $(DESTDIR)$(etcdir)/$$file; \
68         done
69
70 # ========== DEPENDENCIES FOR CLEANUP ==========
71
72 mostlyclean:
73         rm -f *~
74
75 clean: mostlyclean
76
77 distclean: clean
78         rm -f Makefile
79
80 realclean: distclean
81
82 superclean: realclean
83
84 # ========== DEPENDENCIES FOR MAINTENANCE ==========
85
86 subdir = etc
87
88 Makefile: Makefile.in ../config.status
89         cd .. && ./config.status $(subdir)/$@
90
91 distdir = ../`cat ../distname`/$(subdir)
92 mmhdist: $(DIST)
93         @echo "Copying distribution files in $(subdir)"
94         @for file in $(DIST); do \
95           cp -p $(srcdir)/$$file $(distdir); \
96         done