From 471e3f81b09483663afe00bc7e8c863fb7990216 Mon Sep 17 00:00:00 2001
From: "Leigh B. Stoller" <stoller@flux.utah.edu>
Date: Fri, 5 Jan 2001 00:22:17 +0000
Subject: [PATCH] Another small set of install changes for ops vs control node.
 I put in simple autogen of the symlinks to plasticwrap on the control node,
 and added control-install targets in several more directories.

---
 GNUmakefile.in         | 12 +++++++++++-
 db/GNUmakefile.in      |  9 +++++++++
 os/GNUmakefile.in      |  5 ++++-
 tbsetup/GNUmakefile.in |  4 ++++
 tip/GNUmakefile.in     |  6 ++++++
 5 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/GNUmakefile.in b/GNUmakefile.in
index f50bfd4175..edf260f4b3 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -13,7 +13,13 @@ SUBDIRS = lib assign discvr tbsetup db os security pxe tmcd www tip capture
 
 all:		all-subdirs
 
-install:	install-subdirs install-mkdirs
+install:	
+	@echo "Choose either ops-install (paper) or control-install (plastic)"
+
+#
+# For installation on ops node (okay, paper).
+# 
+ops-install:	install-subdirs install-mkdirs 
 	@echo "DON'T FORGET TO RUN A POST-INSTALL AS ROOT"
 
 post-install:
@@ -26,6 +32,10 @@ post-install:
 control-install:
 	@$(MAKE) -C tbsetup control-install
 	@$(MAKE) -C security control-install
+	@$(MAKE) -C tip control-install
+	@$(MAKE) -C os control-install
+	@$(MAKE) -C db control-install
+	@$(MAKE) -C tbsetup control-install
 
 install-mkdirs:
 	-mkdir -p $(INSTALL_TOPDIR)/locks
diff --git a/db/GNUmakefile.in b/db/GNUmakefile.in
index 8f9cb73d4f..2026ebaf3f 100644
--- a/db/GNUmakefile.in
+++ b/db/GNUmakefile.in
@@ -24,4 +24,13 @@ install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \
 	$(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
 	$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS))
 
+#
+# Control node installation (okay, plastic)
+#
+control-install:
+	cd /tmp/gg && \
+		list='$(BIN_SCRIPTS)'; for file in $$list; do \
+			ln -s plasticwrap $$file; \
+		done;
+
 clean:
diff --git a/os/GNUmakefile.in b/os/GNUmakefile.in
index 8e094bf993..b438136916 100644
--- a/os/GNUmakefile.in
+++ b/os/GNUmakefile.in
@@ -18,7 +18,10 @@ imagezip:
 	@$(MAKE) -C imagezip all
 
 install: 
-	@$(MAKE) -C imagezip install	
+	@$(MAKE) -C imagezip install
+
+control-install: 
+	@$(MAKE) -C imagezip install
 
 clean:		subdir-clean
 
diff --git a/tbsetup/GNUmakefile.in b/tbsetup/GNUmakefile.in
index a6563c17b8..a532c85487 100644
--- a/tbsetup/GNUmakefile.in
+++ b/tbsetup/GNUmakefile.in
@@ -76,6 +76,10 @@ post-install:
 # Control node installation (okay, plastic)
 #
 control-install:	$(addprefix $(INSTALL_SBINDIR)/, console_setup.proxy)
+	cd $(INSTALL_BINDIR) && \
+		list='$(BIN_STUFF)'; for file in $$list; do \
+			ln -s plasticwrap $$file; \
+		done;
 
 clean:	subdir-clean
 	rm -f *.o core tbreport
diff --git a/tip/GNUmakefile.in b/tip/GNUmakefile.in
index 3d11538961..2141fbc4a8 100644
--- a/tip/GNUmakefile.in
+++ b/tip/GNUmakefile.in
@@ -28,7 +28,13 @@ tip.static: $(OBJS)
 $(OBJS): tipconf.h tip.h
 
 install: all
+	-mkdir -p $(INSTALL_BINDIR)
 	$(INSTALL_PROGRAM) tip.static $(INSTALL_BINDIR)/tip
 
+#
+# Control node installation (okay, plastic)
+#
+control-install:	install
+
 clean:
 	rm -f $(OBJS) tip tip.static
-- 
GitLab