GNUmakefile.in 1.73 KB
Newer Older
Leigh B. Stoller's avatar
Leigh B. Stoller committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved.
#

SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
SUBDIR		= collab/mailman

include $(OBJDIR)/Makeconf

SBIN_SCRIPTS		= addmmlist setmmlistmembers mmsetup
CTRL_LIBEXEC_SCRIPTS	= genaliases
CTRL_LIB_FILES		= mmscript.py

CTRL_SBIN_SCRIPTS	= mailmanproxy

#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
all:	$(SBIN_SCRIPTS) $(CTRL_SBIN_SCRIPTS) $(CTRL_LIBEXEC_SCRIPTS) \
	$(CTRL_LIB_FILES)

include $(TESTBED_SRCDIR)/GNUmakerules

install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
	 $(addprefix $(INSTALL_DIR)/opsdir/libexec/mailman/, $(CTRL_LIBEXEC_SCRIPTS)) \
	 $(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(CTRL_SBIN_SCRIPTS)) \
	 $(addprefix $(INSTALL_DIR)/opsdir/lib/mailman/, $(CTRL_LIB_FILES))

boss-install: install

post-install: 
	chown root $(INSTALL_SBINDIR)/addmmlist
	chmod u+s $(INSTALL_SBINDIR)/addmmlist
	chown root $(INSTALL_SBINDIR)/setmmlistmembers
	chmod u+s $(INSTALL_SBINDIR)/setmmlistmembers

#
# Control node installation (okay, plastic)
#
control-install:	\
	$(addprefix $(INSTALL_SBINDIR)/, $(CTRL_SBIN_SCRIPTS)) \
	$(addprefix $(INSTALL_LIBDIR)/mailman/, $(CTRL_LIB_FILES)) \
	$(addprefix $(INSTALL_LIBEXECDIR)/mailman/, $(CTRL_LIBEXEC_FILES))

clean:
	rm -f *.o core

$(INSTALL_DIR)/opsdir/sbin/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/sbin
	$(INSTALL) $< $@

$(INSTALL_DIR)/opsdir/lib/mailman/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/lib/mailman
	$(INSTALL_DATA) $< $@

$(INSTALL_DIR)/opsdir/libexec/mailman/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/libexec/mailman
	$(INSTALL) $< $@