GNUmakefile.in 2.42 KB
Newer Older
1
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
Leigh B. Stoller's avatar
Leigh B. Stoller committed
4
# All rights reserved.
5
#
6 7 8 9
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= db
10
UNIFIED         = @UNIFIED_BOSS_AND_OPS@
11

12
include $(OBJDIR)/Makeconf
13

14
BIN_SCRIPTS	= nalloc nfree nodeip readycount 
15
SBIN_SCRIPTS	= avail inuse showgraph if2port backup webcontrol node_status \
16
                  genelists genelists.proxy dhcpd_makeconf nodelog unixgroups \
17
		  dbcheck interswitch dbboot grabron stategraph newwanode \
18
		  idletimes idlemail setsitevar audit changeuid changepid \
19 20
		  elabinelab_bossinit update_permissions mysqld_watchdog \
		  dumperrorlog
21 22
LIBEXEC_SCRIPTS = webnodelog webnfree webnewwanode webidlemail xmlconvert \
		  webchangeuid
23
LIB_SCRIPTS     = libdb.pm Node.pm libdb.py libadminctrl.pm Experiment.pm \
24
		  NodeType.pm Interface.pm User.pm Group.pm Project.pm 
25

26
# Stuff installed on plastic.
27
USERSBINS	= genelists.proxy dumperrorlog.proxy
28
USERLIBS	= libtbdb.pm
29

30 31 32 33 34
# These scripts installed setuid, with sudo. 
SETUID_BIN_SCRIPTS   = 
SETUID_SBIN_SCRIPTS  = genelists dhcpd_makeconf elabinelab_bossinit
SETUID_LIBX_SCRIPTS  = 

35
#
36 37 38
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
39
all:	$(BIN_SCRIPTS) $(SBIN_SCRIPTS) $(LIBEXEC_SCRIPTS) $(LIB_SCRIPTS) \
40
	$(USERSBINS) $(USERLIBS) schemacheck
41

42
include $(TESTBED_SRCDIR)/GNUmakerules
43

44 45
install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \
	$(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
46
	$(addprefix $(INSTALL_LIBDIR)/, $(LIB_SCRIPTS)) \
47 48 49
	$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS)) \
        $(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(USERSBINS)) \
        $(addprefix $(INSTALL_DIR)/opsdir/lib/, $(USERLIBS))
50

Leigh B. Stoller's avatar
Leigh B. Stoller committed
51 52
boss-install: install

53 54 55
post-install: 
	chown root $(INSTALL_SBINDIR)/genelists
	chmod u+s $(INSTALL_SBINDIR)/genelists
56 57
	chown root $(INSTALL_SBINDIR)/dhcpd_makeconf
	chmod u+s $(INSTALL_SBINDIR)/dhcpd_makeconf
58 59
	chown root $(INSTALL_SBINDIR)/elabinelab_bossinit
	chmod u+s $(INSTALL_SBINDIR)/elabinelab_bossinit
60

61 62 63
#
# Control node installation (okay, plastic)
#
64 65
control-install: $(addprefix $(INSTALL_SBINDIR)/, $(USERSBINS)) \
	$(addprefix $(INSTALL_LIBDIR)/, $(USERLIBS))
66

67
clean:
68 69 70 71 72 73 74 75 76 77 78

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

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