1#
2# Makefile for etc subdirectory
3#
4
5SHELL = /bin/sh
6
7top_srcdir = @top_srcdir@
8srcdir     = @srcdir@
9VPATH      = @srcdir@
10
11prefix      = @prefix@
12exec_prefix = @exec_prefix@
13bindir      = @bindir@
14libdir      = @libdir@
15etcdir      = @sysconfdir@
16
17mailspool   = @mailspool@
18
19INSTALL         = @INSTALL@
20INSTALL_PROGRAM = @INSTALL_PROGRAM@
21INSTALL_SCRIPT  = @INSTALL_SCRIPT@
22INSTALL_DATA    = @INSTALL_DATA@
23
24SED = sed
25
26.SUFFIXES:
27
28# static configuration, format, and components files
29STATIC_FILES = components digestcomps distcomps forwcomps \
30               mhl.body mhl.format mhl.forward mhl.headers \
31               mhl.reply mhl.whatnow2 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 scan.meillo scan.default \
35               mhn.defaults repllistcomps pick.default
36
37# ========= DEPENDENCIES FOR BUILDING ==========
38
39all:
40
41install: install-etc-files
42
43install-etc-files:
44	mkdir -p $(DESTDIR)$(etcdir)
45	for file in $(STATIC_FILES); do \
46	  if [ -f "$(DESTDIR)$(etcdir)/$$file" ]; then \
47	    if cmp -s "$(srcdir)/$$file" "$(DESTDIR)$(etcdir)/$$file" ; then \
48	      :; \
49	    else \
50	      $(INSTALL_DATA) "$(srcdir)/$$file" "$(DESTDIR)$(etcdir)/$$file.dist"; \
51	      echo "$(DESTDIR)$(etcdir)/$$file has local modifications; installing with .dist suffix"; \
52	    fi; \
53	  else \
54	    $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(etcdir)/$$file; \
55	  fi; \
56	done
57
58uninstall: uninstall-etc-files
59
60uninstall-etc-files:
61	for file in $(STATIC_FILES) ; do \
62	  rm -f $(DESTDIR)$(etcdir)/$$file; \
63	done
64
65# ========== DEPENDENCIES FOR CLEANUP ==========
66
67mostlyclean:
68	rm -f *~
69
70clean: mostlyclean
71
72distclean: clean
73	rm -f Makefile
74
75realclean: distclean
76
77superclean: realclean
78
79# ========== DEPENDENCIES FOR MAINTENANCE ==========
80
81subdir = etc
82
83Makefile: Makefile.in ../config.status
84	cd .. && ./config.status $(subdir)/$@
85
86