GNUmakefile.in 2.88 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 22 23 24 25 26 27 28 29 30 31 32 33 34
# 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

all:

include $(TESTBED_SRCDIR)/GNUmakerules

DESTDIR		=
ETCDIR		= $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR		= $(DESTDIR)$(CLIENT_BINDIR)
VARDIR		= $(DESTDIR)$(CLIENT_VARDIR)
RCDIR		= $(DESTDIR)/usr/local/etc/rc.d
INSTALL		= /usr/bin/install -c

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


39
local-install:	path-install local-script-install
40
remote-install:	path-install remote-script-install
41 42 43

other-install:
	(cd ../../os; $(MAKE) client-install)
44
	(cd ../../event; $(MAKE) client-install)
45 46 47 48 49 50 51 52 53 54

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
55
	$(INSTALL) -m 755 -o root -g wheel -d $(VARDIR)/lock
56 57 58 59 60

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

61
common-script-install:	dir-install
62
	$(INSTALL) -m 755 $(SRCDIR)/../libsetup.pm $(BINDIR)/libsetup.pm
63
	$(INSTALL) -m 755 $(SRCDIR)/watchdog $(BINDIR)/watchdog
64 65 66
	$(INSTALL) -m 755 $(SRCDIR)/ntpstart $(BINDIR)/ntpstart
	$(INSTALL) -m 755 $(SRCDIR)/runstartup $(BINDIR)/runstartup
	$(INSTALL) -m 755 $(SRCDIR)/runcvsup.sh $(BINDIR)/runcvsup.sh
67 68 69 70 71
	$(INSTALL) -m 755 $(SRCDIR)/update $(BINDIR)/update
	$(INSTALL) -m 755 $(SRCDIR)/vnodesetup $(BINDIR)/vnodesetup
	$(INSTALL) -m 755 $(SRCDIR)/bootvnodes $(BINDIR)/bootvnodes

local-script-install:	common-script-install
72 73 74 75 76 77 78
	$(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
79 80 81 82 83
	# 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

84
remote-script-install:	common-script-install
85 86
	-chown root $(BINDIR)/vnodesetup
	-chmod u+s $(BINDIR)/vnodesetup