GNUmakefile.in 1.77 KB
Newer Older
1
#
2
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2009 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.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 32 33 34 35
ifeq ($(SYSTEM),FreeBSD)
FBSDVERSION   := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/FreeBSD\1/')

ifeq ($(FBSDVERSION),FreeBSD6)
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
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

install: $(addprefix $(INSTALL_RCDIR)/, $(RC_SCRIPTS))
68 69

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

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

73 74 75
clrhouse-install:	$(INSTALL_RCDIR)/2.mysql-server.sh \
			$(INSTALL_RCDIR)/1.mysql-client.sh

76
tipserv-install:	$(addprefix $(INSTALL_RCDIR)/, $(TIP_SCRIPTS))