GNUmakefile.in 2.2 KB
Newer Older
1
#
2
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
4 5
# All rights reserved.
#
6 7 8 9 10 11 12
# For installation.
#
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= rc.d

13
WINSUPPORT      = @WINSUPPORT@
14
PELABSUPPORT    = @PELABSUPPORT@
15
ELVINCOMPAT	= @ELVIN_COMPAT@
16 17
SYSTEM         := $(shell uname -s)

18 19
include $(OBJDIR)/Makeconf

20
RC_SCRIPTS	= 2.mysql-server.sh 3.mfrisbeed.sh 3.testbed.sh \
21
		  2.dhcpd.sh 1.mysql-client.sh
Ryan Jackson's avatar
Ryan Jackson committed
22
SUBBOSS_SCRIPTS	= 2.dhcpd.sh
23 24 25 26
OPS_SCRIPTS     = 3.and.sh 1.mysql-client.sh 1.mysql-server.sh
ifeq ($(ELVINCOMPAT),1)
OPS_SCRIPTS    += 2.elvind.sh 3.elvin_gateway.sh
endif
27
TIP_SCRIPTS	=
Mike Hibler's avatar
Mike Hibler committed
28

29 30 31
ifeq ($(SYSTEM),FreeBSD)
FBSDVERSION   := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/FreeBSD\1/')

32
ifneq ($(FBSDVERSION),FreeBSD4)
33 34 35
ifeq ($(WINSUPPORT),1)
OPS_SCRIPTS += silly.sh
endif
36 37
# install without .sh
TIP_SCRIPTS += capture
38 39
else
RC_SCRIPTS  += 1.named.sh
40
TIP_SCRIPTS += capture.sh
41
endif
42
endif
Mike Hibler's avatar
Mike Hibler committed
43
ifeq ($(PELABSUPPORT),1)
44 45
OPS_SCRIPTS += pelab.sh
endif
46

47 48 49 50
#
# Force dependencies to make sure configure regenerates if the .in file
# is changed.
# 
51
all: $(RC_SCRIPTS) $(OPS_SCRIPTS) capture.sh 3.v0_gateway.sh
52 53 54 55 56 57 58 59 60

include $(TESTBED_SRCDIR)/GNUmakerules

# Like the INSTALL_BINDIR target
$(INSTALL_RCDIR)/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_RCDIR)
	$(INSTALL_PROGRAM) $< $@

61 62 63 64 65
# special case for capture.sh -> capture
$(INSTALL_RCDIR)/capture: capture.sh
	@echo "Installing $<"
	-mkdir -p $(INSTALL_RCDIR)
	$(INSTALL_PROGRAM) capture.sh $@
66

67 68 69 70 71 72 73
#
# Well, this is awkward.  Make sure we don't try to install anything from
# a dev tree both because it doesn't make any sense and because it would
# clobber the "real" version.
#
ifeq ($(TBROOT),/usr/testbed)

74
install: $(addprefix $(INSTALL_RCDIR)/, $(RC_SCRIPTS))
75 76

control-install:	$(addprefix $(INSTALL_RCDIR)/, $(OPS_SCRIPTS))
77

Ryan Jackson's avatar
Ryan Jackson committed
78 79
subboss-install:	$(addprefix $(INSTALL_RCDIR)/, $(SUBBOSS_SCRIPTS))

80 81 82
clrhouse-install:	$(INSTALL_RCDIR)/2.mysql-server.sh \
			$(INSTALL_RCDIR)/1.mysql-client.sh

83 84 85
gateway-install:	$(INSTALL_RCDIR)/3.v0_gateway.sh


86
tipserv-install:	$(addprefix $(INSTALL_RCDIR)/, $(TIP_SCRIPTS))
87 88 89 90
else
install control-install subboss-install clrhouse-install tipserv-install:
	@echo "Cannot install startup scripts in dev tree"
endif