GNUmakefile.in 2.11 KB
Newer Older
1
2
#
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
4
5
6
7
8
9
10
11
12
13
14
15
# All rights reserved.
#

SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= wiki

include $(OBJDIR)/Makeconf

SBIN_SCRIPTS		= addwikiuser addwikiproj wikisetup delwikiuser \
			  setwikigroups
16
LIBEXEC_SCRIPTS		= wikixlogin
17
18
19

CTRL_SBIN_SCRIPTS	= wikiproxy
CTRL_LIB_FILES		= usertemplate webhometemplate
20
TWIKIFILES		= UserPermNotes.txt GroupPermNotes.txt LocalSite.cfg
21

22
23
24
# These scripts installed setuid, with sudo. 
SETUID_BIN_SCRIPTS   = 
SETUID_SBIN_SCRIPTS  = addwikiuser delwikiuser addwikiproj setwikigroups 
25
SETUID_SUEXEC_SCRIPTS  = wikixlogin
26

27
28
29
30
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
31
all:	$(SBIN_SCRIPTS) $(CTRL_SBIN_SCRIPTS) $(CTRL_LIB_FILES) \
32
	$(LIBEXEC_SCRIPTS) $(TWIKIFILES)
33
34
35
36

include $(TESTBED_SRCDIR)/GNUmakerules

install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
37
	 $(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS)) \
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
	 $(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(CTRL_SBIN_SCRIPTS)) \
	 $(addprefix $(INSTALL_DIR)/opsdir/lib/wiki/, $(CTRL_LIB_FILES))

boss-install: install

post-install: 
	chown root $(INSTALL_SBINDIR)/addwikiuser
	chmod u+s $(INSTALL_SBINDIR)/addwikiuser
	chown root $(INSTALL_SBINDIR)/delwikiuser
	chmod u+s $(INSTALL_SBINDIR)/delwikiuser
	chown root $(INSTALL_SBINDIR)/addwikiproj
	chmod u+s $(INSTALL_SBINDIR)/addwikiproj
	chown root $(INSTALL_SBINDIR)/addwikiproj
	chmod u+s $(INSTALL_SBINDIR)/addwikiproj
	chown root $(INSTALL_SBINDIR)/setwikigroups
	chmod u+s $(INSTALL_SBINDIR)/setwikigroups
54
55
	chown root $(INSTALL_LIBEXECDIR)/wikixlogin
	chmod u+s $(INSTALL_LIBEXECDIR)/wikixlogin
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

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

clean:
	rm -f *.o core

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

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