1## This file is part of GNU Mailutils
2## Copyright (C) 2000-2021 Free Software Foundation, Inc.
3##
4## GNU Mailutils is free software; you can redistribute it and/or
5## modify it under the terms of the GNU General Public License as
6## published by the Free Software Foundation; either version 3, or (at
7## your option) any later version.
8##
9## GNU Mailutils is distributed in the hope that it will be useful, but
10## WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12## General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
16
17ACLOCAL_AMFLAGS = -I m4 -I am -I gint -I doc/imprimatur
18
19if MU_COND_LIBMU_SCM
20  GINT_DIR = gint
21  LIBMU_SCM_DIR = libmu_scm
22  SCHEME_DIR = scheme
23endif
24
25if MU_COND_SUPPORT_CXX
26  LIBMU_CPP_DIR = libmu_cpp
27endif
28
29if MU_COND_DBM
30  LIBMU_DBM_DIR = libmu_dbm
31endif
32
33if MU_COND_PYTHON
34  PYTHON_DIR = python
35endif
36
37SUBDIRS = . \
38 mu-aux\
39 include\
40 po\
41 testsuite\
42 libmailutils\
43 sql\
44 libmu_auth\
45 libproto\
46 libtests\
47 lib\
48 $(LIBMU_CPP_DIR)\
49 $(GINT_DIR)\
50 $(LIBMU_SCM_DIR)\
51 $(LIBMU_DBM_DIR)\
52 libmu_sieve\
53 $(PYTHON_DIR)\
54 doc\
55 examples\
56 mu\
57 $(SCHEME_DIR)
58
59if MU_COND_FRM
60  SUBDIRS += frm
61endif
62
63if MU_COND_POP3D
64  SUBDIRS += pop3d
65endif
66
67if MU_COND_IMAP4D
68  SUBDIRS += imap4d
69endif
70
71if MU_COND_MDA_TOOLS
72  SUBDIRS += mda
73endif
74
75if MU_COND_MAIL
76  SUBDIRS += mail
77endif
78
79if MU_COND_SIEVE
80  SUBDIRS += sieve
81endif
82
83if MU_COND_MESSAGES
84  SUBDIRS += messages
85endif
86
87if MU_COND_COMSAT
88  SUBDIRS += comsat
89endif
90
91if MU_COND_READMSG
92  SUBDIRS += readmsg
93endif
94
95if MU_COND_DOTLOCK
96  SUBDIRS += dotlock
97endif
98
99if MU_COND_MH
100  SUBDIRS += mh
101endif
102
103if MU_COND_MOVEMAIL
104  SUBDIRS += movemail
105endif
106
107if MU_COND_DECODEMAIL
108  SUBDIRS += decodemail
109endif
110
111if MU_COND_MIMEVIEW
112  SUBDIRS += mimeview
113endif
114
115EXTRA_DIST = COPYING.LESSER paths
116DISTCLEANFILES = pathdefs.h
117
118gen_start_date = "2008-12-08"
119prev_change_log = "doc/ChangeLog.CVS"
120amend_file = ChangeLog.amend
121
122# Trigger creation of the ChangeLog
123noinst_DATA = ChangeLog
124.PHONY: ChangeLog
125ChangeLog:
126	$(AM_V_at)if test -d .git; then					\
127	    $(top_srcdir)/mu-aux/gencl --verbose --append-dot           \
128                    --email=$(PACKAGE_BUGREPORT)                        \
129		    --append=$(prev_change_log)     		        \
130                    --amend=$(amend_file)                               \
131	            --since=$(gen_start_date);    			\
132	elif test "$(builddir)" = "$(srcdir)" && test ! -e ChangeLog; then \
133	    echo "This file is a placeholder." > ChangeLog;             \
134	fi
135
136dist-hook: ChangeLog
137	@if test -f ChangeLog && test -f NEWS; then			\
138	  PATCHLEV=`echo "$(PACKAGE_VERSION)" | sed -r "s/[0-9]+\.[0-9]+\.?//"`;\
139	  if test $${PATCHLEV:-0} -lt 50; then				     \
140	    if head -n 6 ChangeLog | grep -q 'Uncommitted changes' ;	     \
141	    then							     \
142	      echo >&2 "*** Source tree contains uncommitted changes";	     \
143	      echo >&2 "*** Aborting";					     \
144	      exit 1;							     \
145	    fi;								     \
146	    if grep -q FIXME NEWS; then					     \
147	      echo >&2 "*** NEWS file contains FIXMEs";			     \
148	      echo >&2 "*** Aborting";					     \
149	      exit 1;							     \
150	    fi;								     \
151	  fi;                                                                \
152	fi
153
154alpha:
155	version=`$(GITINFO) -H'$$refversion{?$$refdist>0??-$$refdist?}'`;\
156	if test -n "$$version"; then\
157	  $(MAKE) dist distdir=$(PACKAGE)-$$version; \
158	else \
159	  $(MAKE) dist; \
160	fi
161
162
163alphacheck:
164	version=`$(GITINFO) -H'$$refversion{?$$refdist>0??-$$refdist?}'`;\
165	if test -n "$$version"; then\
166	  $(MAKE) distcheck distdir=$(PACKAGE)-$$version; \
167	else \
168	  $(MAKE) distcheck; \
169	fi
170
171