summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-05-15 11:49:44 +0300
committerRobert Mustacchi <rm@joyent.com>2018-06-01 00:07:34 +0000
commit69d4acec15909325d6df21fec172510a50f77a8a (patch)
treea7e038501850b022d491002907f5e56e94b7c8e3
parent5e832498d1743a9c84b5f53b983c9f469290b34b (diff)
downloadillumos-joyent-69d4acec15909325d6df21fec172510a50f77a8a.tar.gz
9538 rcapd make install fails due to race in subdirs
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com> Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r--usr/src/cmd/rcap/rcapd/Makefile6
-rw-r--r--usr/src/cmd/rcap/rcapd/Makefile.ins34
-rw-r--r--usr/src/cmd/rcap/rcapd/Makefile.rcapd23
-rw-r--r--usr/src/cmd/rcap/rcapd/amd64/Makefile9
-rw-r--r--usr/src/cmd/rcap/rcapd/i386/Makefile8
-rw-r--r--usr/src/cmd/rcap/rcapd/sparc/Makefile8
-rw-r--r--usr/src/cmd/rcap/rcapd/sparcv9/Makefile8
7 files changed, 51 insertions, 45 deletions
diff --git a/usr/src/cmd/rcap/rcapd/Makefile b/usr/src/cmd/rcap/rcapd/Makefile
index 62112abd00..36d36882f9 100644
--- a/usr/src/cmd/rcap/rcapd/Makefile
+++ b/usr/src/cmd/rcap/rcapd/Makefile
@@ -45,9 +45,13 @@ install := TARGET = install
lint := TARGET = lint
_msg := TARGET = _msg
+include Makefile.ins
+
all clean clobber lint: $(SUBDIRS)
-install: all $(SUBDIRS) $(ROOTMANIFEST)
+install: all $(SUBDIRS) $(ROOTMANIFEST) $(ISAEXEC)
+ -$(RM) $(ROOTUSRLIBRCAPPROG)
+ $(LN) $(ISAEXEC) $(ROOTUSRLIBRCAPPROG)
check: $(CHKMANIFEST)
diff --git a/usr/src/cmd/rcap/rcapd/Makefile.ins b/usr/src/cmd/rcap/rcapd/Makefile.ins
new file mode 100644
index 0000000000..97c85e98d8
--- /dev/null
+++ b/usr/src/cmd/rcap/rcapd/Makefile.ins
@@ -0,0 +1,34 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# Copyright 2018 Toomas Soome <tsoome@me.com>
+#
+
+PROG = rcapd
+ROOTUSRLIBRCAP = $(ROOT)/usr/lib/rcap
+ROOTUSRLIBRCAP32 = $(ROOTUSRLIBRCAP)/$(MACH32)
+ROOTUSRLIBRCAP64 = $(ROOTUSRLIBRCAP)/$(MACH64)
+ROOTUSRLIBRCAPPROG = $(ROOTUSRLIBRCAP)/$(PROG)
+ROOTUSRLIBRCAPPROG32 = $(ROOTUSRLIBRCAP32)/$(PROG)
+ROOTUSRLIBRCAPPROG64 = $(ROOTUSRLIBRCAP64)/$(PROG)
diff --git a/usr/src/cmd/rcap/rcapd/Makefile.rcapd b/usr/src/cmd/rcap/rcapd/Makefile.rcapd
index f0ff0e0669..975ff1388a 100644
--- a/usr/src/cmd/rcap/rcapd/Makefile.rcapd
+++ b/usr/src/cmd/rcap/rcapd/Makefile.rcapd
@@ -22,16 +22,17 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
.KEEP_STATE:
.SUFFIXES:
-#
+#
# subdirs must define COMMON_DIR and include Makefile.com
#
+# For PROG and ROOT* variables
+include ../Makefile.ins
+
SRCS = rcapd_main.c \
rcapd_collection.c \
rcapd_collection_project.c \
@@ -50,18 +51,17 @@ LINTSRCS = ../rcapd_main.c \
../rcapd_rfd.c \
../rcapd_scanner.c \
$(COMMON_DIR)/rcapd_stat.c \
- $(COMMON_DIR)/utils.c
+ $(COMMON_DIR)/utils.c
-$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
+$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CPPFLAGS += -DDEBUG_MSG
-CPPFLAGS += -I$(COMMON_DIR)
-LDLIBS += -lkstat -lproc -lproject -lzonecfg -lumem -lscf
+CPPFLAGS += -I$(COMMON_DIR)
+LDLIBS += -lkstat -lproc -lproject -lzonecfg -lumem -lscf
LDLIBS += $(EXTRA_LDLIBS)
LINTFLAGS += -u
LINTFLAGS64 += -u
-PROG = rcapd
OBJS = $(SRCS:%.c=%.o) rcapd_conf.o
POFILES = $(OBJS:%.o=%.po)
@@ -96,13 +96,6 @@ $(POFILE): $(POFILES)
$(RM) $@
$(CAT) $(POFILES) > $@
-
-ROOTUSRLIBRCAP = $(ROOT)/usr/lib/rcap
-ROOTUSRLIBRCAP32 = $(ROOTUSRLIBRCAP)/$(MACH32)
-ROOTUSRLIBRCAP64 = $(ROOTUSRLIBRCAP)/$(MACH64)
-ROOTUSRLIBRCAPPROG = $(ROOTUSRLIBRCAP)/$(PROG)
-ROOTUSRLIBRCAPPROG32 = $(ROOTUSRLIBRCAP32)/$(PROG)
-ROOTUSRLIBRCAPPROG64 = $(ROOTUSRLIBRCAP64)/$(PROG)
$(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) %
$(INS.file)
$(ROOTUSRLIBRCAP32)/%: $(ROOTUSRLIBRCAP32) %
diff --git a/usr/src/cmd/rcap/rcapd/amd64/Makefile b/usr/src/cmd/rcap/rcapd/amd64/Makefile
index 489c7f4148..217cce4e25 100644
--- a/usr/src/cmd/rcap/rcapd/amd64/Makefile
+++ b/usr/src/cmd/rcap/rcapd/amd64/Makefile
@@ -23,8 +23,6 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include ../../../Makefile.cmd
include ../../../Makefile.cmd.64
@@ -32,9 +30,4 @@ COMMON_DIR= ../../common # for Makefile.com
include ../Makefile.rcapd
include ../../Makefile.com
-ROOTUSRLIBRCAPLINK=$(ROOTUSRLIBRCAPPROG)
-$(ROOTUSRLIBRCAPLINK): $(ISAEXEC) $(ROOTUSRLIBRCAP) $(ROOTUSRLIBRCAPPROG64)
- -$(RM) $(ROOTUSRLIBRCAPPROG)
- $(LN) $(ISAEXEC) $(ROOTUSRLIBRCAPPROG)
-
-install: all $(ROOTUSRLIBRCAPPROG64) $(ROOTUSRLIBRCAPLINK)
+install: all $(ROOTUSRLIBRCAPPROG64) $(ROOTUSRLIBRCAP)
diff --git a/usr/src/cmd/rcap/rcapd/i386/Makefile b/usr/src/cmd/rcap/rcapd/i386/Makefile
index 22f6ebe30c..1cb37d65f8 100644
--- a/usr/src/cmd/rcap/rcapd/i386/Makefile
+++ b/usr/src/cmd/rcap/rcapd/i386/Makefile
@@ -23,16 +23,10 @@
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
include ../../../Makefile.cmd
COMMON_DIR= ../../common # for Makefile.com
include ../Makefile.rcapd
include ../../Makefile.com
-ROOTUSRLIBRCAPLINK=$(ROOTUSRLIBRCAPPROG)
-$(ROOTUSRLIBRCAPLINK): $(ISAEXEC) $(ROOTUSRLIBRCAP) $(ROOTUSRLIBRCAPPROG32)
- -$(RM) $(ROOTUSRLIBRCAPPROG)
- $(LN) $(ISAEXEC) $(ROOTUSRLIBRCAPPROG)
-
-install: all $(ROOTUSRLIBRCAPPROG32) $(ROOTUSRLIBRCAPLINK)
+install: all $(ROOTUSRLIBRCAPPROG32) $(ROOTUSRLIBRCAP)
diff --git a/usr/src/cmd/rcap/rcapd/sparc/Makefile b/usr/src/cmd/rcap/rcapd/sparc/Makefile
index 54841664c5..1cb37d65f8 100644
--- a/usr/src/cmd/rcap/rcapd/sparc/Makefile
+++ b/usr/src/cmd/rcap/rcapd/sparc/Makefile
@@ -23,16 +23,10 @@
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
include ../../../Makefile.cmd
COMMON_DIR= ../../common # for Makefile.com
include ../Makefile.rcapd
include ../../Makefile.com
-ROOTUSRLIBRCAPLINK=$(ROOTUSRLIBRCAPPROG)
-$(ROOTUSRLIBRCAPLINK): $(ISAEXEC) $(ROOTUSRLIBRCAPPROG32)
- -$(RM) $(ROOTUSRLIBRCAPPROG)
- $(LN) $(ISAEXEC) $(ROOTUSRLIBRCAPPROG)
-
-install: all $(ROOTUSRLIBRCAPPROG32) $(ROOTUSRLIBRCAPLINK)
+install: all $(ROOTUSRLIBRCAPPROG32) $(ROOTUSRLIBRCAP)
diff --git a/usr/src/cmd/rcap/rcapd/sparcv9/Makefile b/usr/src/cmd/rcap/rcapd/sparcv9/Makefile
index 322d709cd6..aedc9bb793 100644
--- a/usr/src/cmd/rcap/rcapd/sparcv9/Makefile
+++ b/usr/src/cmd/rcap/rcapd/sparcv9/Makefile
@@ -23,7 +23,6 @@
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
include ../../../Makefile.cmd
include ../../../Makefile.cmd.64
@@ -31,9 +30,4 @@ COMMON_DIR= ../../common # for Makefile.com
include ../Makefile.rcapd
include ../../Makefile.com
-ROOTUSRLIBRCAPLINK=$(ROOTUSRLIBRCAPPROG)
-$(ROOTUSRLIBRCAPLINK): $(ISAEXEC) $(ROOTUSRLIBRCAP) $(ROOTUSRLIBRCAPPROG64)
- -$(RM) $(ROOTUSRLIBRCAPPROG)
- $(LN) $(ISAEXEC) $(ROOTUSRLIBRCAPPROG)
-
-install: all $(ROOTUSRLIBRCAPPROG64) $(ROOTUSRLIBRCAPLINK)
+install: all $(ROOTUSRLIBRCAPPROG64) $(ROOTUSRLIBRCAP)