GNUmakefile.in 3.59 KB
Newer Older
1 2 3 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#

#
# XXX ONLY RUN THIS INSTALL ON A CYGWIN / WINDOWS XP NODE!
# Similar to linux9, cygwinxp is an overlay on linux, which is an overlay
# on common.
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
#
#
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= @top_builddir@
SUBDIR		= $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))

include $(OBJDIR)/Makeconf

SCRIPTS		= 

#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
all:	$(SCRIPTS)

include $(TESTBED_SRCDIR)/GNUmakerules

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

install client-install:	baselinux-install common-install etc-install \
			sup-install script-install ##bin-install
	@echo "Remember to install the PEM files if necessary"

simple-install:	common-install script-install ##bin-install

dir-install:

baselinux-install: dir-install
	(cd ../linux; $(MAKE) DIRGROUP=wheel client-install)
	rm -f $(BINDIR)/rc/rc.healthd
	rm -f $(BINDIR)/rc/rc.slothd

common-install:	dir-install
	(cd ../common; $(MAKE) local-install)

sup-install:	dir-install

SYSTEM32 = /cygdrive/c/Windows/System32
WBEM = $(SYSTEM32)/Wbem
bin-install:	dir-install
	# These are found in the /share/windows directory.
	$(INSTALL) -m 755 $(SRCDIR)/WSName.exe $(BINDIR)/WSName.exe
	$(INSTALL) -m 755 $(SRCDIR)/addusers.exe $(BINDIR)/addusers.exe
	$(INSTALL) -m 755 $(SRCDIR)/usrtogrp.exe $(BINDIR)/usrtogrp.exe
	# Setx is run under CMD early in the user login to make HOME for Emacs.
	$(INSTALL) -m 755 $(SRCDIR)/setx.exe $(SYSTEM32)/setx.exe
	# Devcon is used by rc.cygwin and rc.ifc to disable/enable NIC's.
	$(INSTALL) -m 755 $(SRCDIR)/devcon.exe $(BINDIR)/devcon.exe
	# These are used by tmcd/findif.
	$(INSTALL) -m 755 $(SYSTEM32)/getmac.exe $(BINDIR)/getmac.exe
	$(INSTALL) -m 755 $(WBEM)/framedyn.dll $(BINDIR)/framedyn.dll

etc-install:	dir-install sysetc-install

sysetc-install:	dir-install ###ifcfgs
	# Watchdog assumes the ssh keys are in /etc/ssh.
	mkdir -p /etc/ssh
	ln -f -s /etc/ssh* /etc/ssh
	# Boot log files have to be writable by root under rc.cygwin .
	$(INSTALL) -c -m 775 -o root -d /var/log
	$(INSTALL) -c -m 775 -o root -d /var/db

script-install:	dir-install $(SCRIPTS)
	$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
	$(INSTALL) -m 755 $(SRCDIR)/prepare $(BINDIR)/prepare
	$(INSTALL) -m 755 $(SRCDIR)/tbshutdown $(BINDIR)/tbshutdown
	$(INSTALL) -c -m 755 -o root -d /sbin
	#$(INSTALL) -m 755 $(SRCDIR)/reboot /sbin/reboot
	# Put the tcsh desktop startup script in the CygWin root directory.
	#$(INSTALL) -m 755 $(SRCDIR)/cygwin-tcsh.bat /
	ln -f -s /bin/shutdown /sbin/shutdown
	ln -f -s /bin/reboot   /sbin/reboot
	# Everybody is in the Administrators group already, so sudo is irrelevant.
	$(INSTALL) -m 755 $(SRCDIR)/sudo.dummy /bin/sudo
	$(INSTALL) -m 755 $(SRCDIR)/rc.firstboot $(BINDIR)/rc/rc.firstboot
	$(INSTALL) -m 755 $(SRCDIR)/rc.cygwinxp $(BINDIR)/rc/rc.cygwin
	#$(INSTALL) -m 755 $(SRCDIR)/clean_logonui $(BINDIR)/clean_logonui
	$(INSTALL) -m 755 $(SRCDIR)/rc.reboot $(BINDIR)/rc/rc.reboot
	$(INSTALL) -m 755 $(SRCDIR)/rc.lmhosts $(BINDIR)/rc/rc.lmhosts
	$(INSTALL) -m 755 $(SRCDIR)/netbt $(BINDIR)/netbt

sfs-install:

# create ifcfg-eth? files
ifcfgs:	$(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
	$(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template