1# Copyright (C) 1998-2018 by the Free Software Foundation, Inc.
2#
3# This program is free software; you can redistribute it and/or
4# modify it under the terms of the GNU General Public License
5# as published by the Free Software Foundation; either version 2
6# of the License, or (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16
17# NOTE: Makefile.in is converted into Makefile by the configure script
18# in the parent directory.  Once configure has run, you can recreate
19# the Makefile by running just config.status.
20
21# Variables set by configure
22
23VERSION=	@VERSION@
24
25VPATH=		@srcdir@
26srcdir= 	@srcdir@
27bindir= 	@bindir@
28prefix=   	@prefix@
29exec_prefix=	@exec_prefix@
30DESTDIR=
31
32CC=		@CC@
33CHMOD=  	@CHMOD@
34INSTALL=	@INSTALL@
35
36DEFS=   	@DEFS@
37
38# Customizable but not set by configure
39
40OPT=		@OPT@
41CFLAGS=		$(OPT) $(DEFS)
42PACKAGEDIR= 	$(prefix)/Mailman
43SHELL=		/bin/sh
44
45MODULES=	$(srcdir)/*.py
46SUBDIRS=	Cgi Logging Archiver Handlers Bouncers Queue MTA Gui Commands
47
48# Modes for directories and executables created by the install
49# process.  Default to group-writable directories but
50# user-only-writable for executables.
51DIRMODE=	775
52EXEMODE=	755
53FILEMODE=	644
54INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
55
56
57# Rules
58
59all:
60	for d in $(SUBDIRS); \
61	do \
62	    (cd $$d; $(MAKE)); \
63	done
64
65install-here:
66	for f in $(MODULES); \
67	do \
68	    $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(PACKAGEDIR); \
69	done
70	$(INSTALL) -m $(FILEMODE) mm_cfg.py.dist $(DESTDIR)$(PACKAGEDIR)
71	if [ ! -f $(DESTDIR)$(PACKAGEDIR)/mm_cfg.py ]; \
72	then \
73	    $(INSTALL) -m $(FILEMODE) mm_cfg.py.dist $(DESTDIR)$(PACKAGEDIR)/mm_cfg.py; \
74	fi
75
76install: install-here
77	for d in $(SUBDIRS); \
78	do \
79	    (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \
80	done
81
82finish:
83	@for d in $(SUBDIRS); \
84	do \
85	    (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) finish); \
86	done
87
88clean:
89	for d in $(SUBDIRS); \
90	do \
91	    (cd $$d; $(MAKE) clean); \
92	done
93
94distclean:
95	-rm Makefile Defaults.py mm_cfg.py.dist
96	-rm *.pyc
97	for d in $(SUBDIRS); \
98	do \
99	    (cd $$d; $(MAKE) distclean); \
100	done
101