GNUmakefile.in 2.49 KB
Newer Older
Mac Newbold's avatar
Mac Newbold committed
1
#
Leigh Stoller's avatar
Leigh Stoller committed
2
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
Leigh Stoller's avatar
Leigh Stoller committed
4
# All rights reserved.
Mac Newbold's avatar
Mac Newbold committed
5
#
Leigh Stoller's avatar
Leigh Stoller committed
6

Mac Newbold's avatar
Mac Newbold committed
7 8 9 10
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= utils
11
UNIFIED         = @UNIFIED_BOSS_AND_OPS@
Mac Newbold's avatar
Mac Newbold committed
12 13 14

include $(OBJDIR)/Makeconf

15 16
SUBDIRS		= nsgen

17
BIN_SCRIPTS	= delay_config sshtb create_image node_admin link_config \
18
                  setdest loghole webcopy linkmon_ctl snmp-if-deref.sh
Mac Newbold's avatar
Mac Newbold committed
19
SBIN_SCRIPTS	= vlandiff vlansync withadminprivs export_tables cvsupd.pl \
20
                  eventping grantnodetype import_commitlog dhcpd_wrapper \
21
		  opsreboot deletenode node_statewait grabwebcams \
22
		  grabswitchconfig backupswitches cvsinit checkquota \
23
		  spewconlog opsdb_control
24
LIBEXEC_SCRIPTS	= webcreateimage newnode webdeletenode spewleds webcopy \
25
                  websetdest spewsource weblinkmon_ctl webcvsweb \
26
		  webspewconlog xlogin webviewvc
27
CTRLSBIN_SCRIPTS= opsdb_control.proxy
28

Mac Newbold's avatar
Mac Newbold committed
29 30 31 32
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
33 34
all:	$(BIN_SCRIPTS) $(SBIN_SCRIPTS) $(LIBEXEC_SCRIPTS) $(CTRLSBIN_SCRIPTS) \
	$(SUBDIRS) firstuser setbuildinfo
Mac Newbold's avatar
Mac Newbold committed
35 36 37 38

include $(TESTBED_SRCDIR)/GNUmakerules

install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \
39
	$(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
40
	$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS)) \
41
	$(addprefix $(INSTALL_DIR)/opsdir/sbin/, $(CTRLSBIN_SCRIPTS)) \
42
	subdir-install
43 44 45 46
	$(INSTALL_PROGRAM) loghole $(INSTALL_DIR)/opsdir/bin/loghole
	-mkdir -p $(INSTALL_DIR)/opsdir/man/man1
	$(INSTALL) -m 0644 $(SRCDIR)/loghole.1 \
		$(INSTALL_DIR)/opsdir/man/man1/loghole.1
47 48
	rm -f $(INSTALL_SBINDIR)/wap
	ln -s withadminprivs $(INSTALL_SBINDIR)/wap
49
	@echo "Don't forget to do a post-install as root"
Mac Newbold's avatar
Mac Newbold committed
50

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

53 54 55
post-install: 
	chown root $(INSTALL_SBINDIR)/grabwebcams
	chmod u+s $(INSTALL_SBINDIR)/grabwebcams
56 57
	chown root $(INSTALL_SBINDIR)/checkquota
	chmod u+s $(INSTALL_SBINDIR)/checkquota
58 59
	chown root $(INSTALL_SBINDIR)/spewconlog
	chmod u+s $(INSTALL_SBINDIR)/spewconlog
60 61
	chown root $(INSTALL_SBINDIR)/opsdb_control
	chmod u+s $(INSTALL_SBINDIR)/opsdb_control
62 63
	chown root $(INSTALL_LIBEXECDIR)/xlogin
	chmod u+s $(INSTALL_LIBEXECDIR)/xlogin
64

Mac Newbold's avatar
Mac Newbold committed
65 66 67
#
# Control node installation (okay, plastic)
#
68 69
control-install:

70 71 72 73
#
# Automate this part at some point.
# 
subdir-install:
Mike Hibler's avatar
Mike Hibler committed
74
	@$(MAKE) -C nsgen install
75

Mike Hibler's avatar
Mike Hibler committed
76 77 78 79
clean:	subdir-clean

subdir-clean:
	@$(MAKE) -C nsgen clean
80 81 82 83 84 85

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