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

#
# XXX ONLY RUN THIS INSTALL ON A TESTBED NODE!
#
# These things need to be installed into the right place on a testbed
# node before cutting an image. This directory is installed first,
# followed by the system-specific directory.
#
#
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
SUBDIR		= tmcd/common

include $(OBJDIR)/Makeconf

22
all:
23 24 25 26 27 28 29 30

include $(TESTBED_SRCDIR)/GNUmakerules

DESTDIR		=
ETCDIR		= $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR		= $(DESTDIR)$(CLIENT_BINDIR)
VARDIR		= $(DESTDIR)$(CLIENT_VARDIR)
RCDIR		= $(DESTDIR)/usr/local/etc/rc.d
31
TBBINDIR	= $(DESTDIR)/usr/testbed/bin
32 33 34 35
INSTALL		= /usr/bin/install -c

install:
	@echo "You should probably not run this install directly!"
36
	@echo "If you do, be sure to install from the system specific "
37 38 39
	@echo "directory afterwards."


40
local-install:		path-install local-script-install symlinks
41 42
remote-install:		path-install remote-script-install
control-install:	path-install control-script-install
43 44 45

other-install:
	(cd ../../os; $(MAKE) client-install)
46
	(cd ../../event; $(MAKE) client-install)
47
	(cd ../../sensors/slothd; $(MAKE) client-install)
48 49 50 51 52 53 54 55 56 57

dir-install:
	$(INSTALL) -m 755 -o root -g wheel -d $(ETCDIR)
	$(INSTALL) -m 755 -o root -g wheel -d $(BINDIR)
	$(INSTALL) -m 755 -o root -g wheel -d $(RCDIR)
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/db
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/jails
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/logs
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/boot
58
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/lock
59
	$(INSTALL) -m 755 -o root -g wheel -d $(TBBINDIR)
60 61 62 63 64

path-install:	dir-install
	$(INSTALL) -m 755 $(SRCDIR)/paths.pm $(ETCDIR)/paths.pm
	$(INSTALL) -m 755 $(SRCDIR)/paths.sh $(ETCDIR)/paths.sh

65
common-script-install:	dir-install
66
	$(INSTALL) -m 755 $(SRCDIR)/../libsetup.pm $(BINDIR)/libsetup.pm
67 68
	$(INSTALL) -m 755 $(SRCDIR)/libtmcc.pm $(BINDIR)/libtmcc.pm
	$(INSTALL) -m 755 $(SRCDIR)/tmcc.pl $(BINDIR)/tmcc
69
	$(INSTALL) -m 755 $(SRCDIR)/watchdog $(BINDIR)/watchdog
70 71 72
	$(INSTALL) -m 755 $(SRCDIR)/ntpstart $(BINDIR)/ntpstart
	$(INSTALL) -m 755 $(SRCDIR)/runstartup $(BINDIR)/runstartup
	$(INSTALL) -m 755 $(SRCDIR)/runcvsup.sh $(BINDIR)/runcvsup.sh
73
	$(INSTALL) -m 755 $(SRCDIR)/update $(BINDIR)/update
74
	$(INSTALL) -m 755 $(SRCDIR)/vnodesetup $(BINDIR)/vnodesetup
75
	$(INSTALL) -m 755 $(SRCDIR)/bootsubnodes $(BINDIR)/bootsubnodes
76
	$(INSTALL) -m 755 $(SRCDIR)/bootvnodes $(BINDIR)/bootvnodes
77 78 79 80 81 82 83
	$(INSTALL) -m 755 $(SRCDIR)/startcmddone $(BINDIR)/startcmddone

symlinks:	dir-install
	rm -f $(TBBINDIR)/tevc
	ln -s $(BINDIR)/tevc $(TBBINDIR)/tevc
	rm -f $(TBBINDIR)/emulab-sync
	ln -s $(BINDIR)/emulab-sync $(TBBINDIR)/emulab-sync
84 85

local-script-install:	common-script-install
86 87 88 89 90 91 92
	$(INSTALL) -m 755 $(SRCDIR)/bootsetup $(BINDIR)/bootsetup
	$(INSTALL) -m 755 $(SRCDIR)/sendevent $(BINDIR)/sendevent
	$(INSTALL) -m 755 $(SRCDIR)/rc.testbed $(BINDIR)/rc.testbed
	$(INSTALL) -m 755 $(SRCDIR)/rc.agents $(BINDIR)/rc.agents
	$(INSTALL) -m 755 $(SRCDIR)/rc.delta $(BINDIR)/rc.delta
	$(INSTALL) -m 755 $(SRCDIR)/rc.progagent $(BINDIR)/rc.progagent
	$(INSTALL) -m 755 $(SRCDIR)/rc.setup $(BINDIR)/rc.setup
93
	$(INSTALL) -m 755 $(SRCDIR)/rc.slothd $(BINDIR)/rc.slothd
94 95 96 97 98
	# Symlink this cause we invoke it from boss, and its too much
	# of a hassle to worry about right now.
	rm -f $(ETCDIR)/update
	-ln -s $(BINDIR)/update $(ETCDIR)/update

99
remote-script-install:	common-script-install
100 101
	-chown root $(BINDIR)/vnodesetup
	-chmod u+s $(BINDIR)/vnodesetup
102 103 104 105 106

control-script-install:	dir-install
	$(INSTALL) -m 755 $(SRCDIR)/../libsetup.pm $(BINDIR)/libsetup.pm
	$(INSTALL) -m 755 $(SRCDIR)/watchdog $(BINDIR)/watchdog
	$(INSTALL) -m 755 $(SRCDIR)/update $(BINDIR)/update