summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2013-03-29 17:37:20 +0000
committerRobert Mustacchi <rm@joyent.com>2013-11-17 20:51:07 -0800
commite119f2433126d4147d64877f8987520e416038e5 (patch)
tree5306f775a131758de9bfa4e673d9e6bc2204a764
parentc50d56f667f119d78fa3d94d6bef2c298ba556f6 (diff)
downloadillumos-joyent-e119f2433126d4147d64877f8987520e416038e5.tar.gz
4129 ON tools should honor $MAKE
4130 cmd/refer Makefile is a bit bogus 4131 xref hardcodes its path 4132 ndmp makefiles need to use $(RPCGEN) 4133 Need a way to specify ast binary directory Reviewed by: Gordon Ross <gwr@nexenta.com> Reviewed by: Cedric Blancher <cedric.blancher@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--usr/src/Makefile.master2
-rw-r--r--usr/src/cmd/ndmpd/ndmp/Makefile.rpcgen6
-rw-r--r--usr/src/cmd/refer/Makefile2
-rw-r--r--usr/src/tools/scripts/bldenv.sh7
-rw-r--r--usr/src/tools/scripts/nightly.sh7
-rw-r--r--usr/src/tools/scripts/xref.sh15
6 files changed, 26 insertions, 13 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 669ebacc57..8c16554a6c 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -186,6 +186,8 @@ ELFSIGN= /usr/bin/elfsign
DTRACE= /usr/sbin/dtrace -xnolibs
UNIQ= /usr/bin/uniq
TAR= /usr/bin/tar
+ASTBINDIR= /usr/ast/bin
+MSGCC= $(ASTBINDIR)/msgcc
FILEMODE= 644
DIRMODE= 755
diff --git a/usr/src/cmd/ndmpd/ndmp/Makefile.rpcgen b/usr/src/cmd/ndmpd/ndmp/Makefile.rpcgen
index 8db34d372d..2b82d41938 100644
--- a/usr/src/cmd/ndmpd/ndmp/Makefile.rpcgen
+++ b/usr/src/cmd/ndmpd/ndmp/Makefile.rpcgen
@@ -39,13 +39,13 @@
all: $(NDMP_DIR)/ndmp.h $(NDMP_DIR)/ndmp_xdr.c $(NDMP_DIR)/ndmp_xdr.h
$(NDMP_DIR)/ndmp.h: $(NDMP_DIR)/ndmp.x
- rpcgen -C -h -o $(NDMP_DIR)/ndmp.h $(NDMP_DIR)/ndmp.x
+ $(RPCGEN) -C -h -o $(NDMP_DIR)/ndmp.h $(NDMP_DIR)/ndmp.x
$(NDMP_DIR)/ndmp_xdr.c: $(NDMP_DIR)/ndmp.x
- rpcgen -c -o $(NDMP_DIR)/ndmp_xdr.c $(NDMP_DIR)/ndmp.x
+ $(RPCGEN) -c -o $(NDMP_DIR)/ndmp_xdr.c $(NDMP_DIR)/ndmp.x
$(NDMP_DIR)/ndmp_xdr.h: $(NDMP_DIR)/ndmp.x
- rpcgen -C -h -o $(NDMP_DIR)/ndmp_xdr.h $(NDMP_DIR)/ndmp.x
+ $(RPCGEN) -C -h -o $(NDMP_DIR)/ndmp_xdr.h $(NDMP_DIR)/ndmp.x
rpcclean:
rm -f $(NDMP_DIR)/ndmp.h $(NDMP_DIR)/ndmp_xdr.h $(NDMP_DIR)/ndmp_xdr.c
diff --git a/usr/src/cmd/refer/Makefile b/usr/src/cmd/refer/Makefile
index 323c2652ac..3c2ed48157 100644
--- a/usr/src/cmd/refer/Makefile
+++ b/usr/src/cmd/refer/Makefile
@@ -93,7 +93,7 @@ sortbib:= POBJS= sortbib.o
.PARALLEL: $(OBJS)
-all: $(PROG) $(PROG3) $(OTXTS) $(SUBDIRS)
+all: $(PROG) $(PROG3) $(OTXTS)
$(PROG1) $(PROG3): $$(POBJS)
$(LINK.c) -o $@ $(POBJS) $(LDFLAGS) $(LDLIBS)
diff --git a/usr/src/tools/scripts/bldenv.sh b/usr/src/tools/scripts/bldenv.sh
index f5e732886b..9a73aced58 100644
--- a/usr/src/tools/scripts/bldenv.sh
+++ b/usr/src/tools/scripts/bldenv.sh
@@ -273,6 +273,13 @@ if [[ "${SUNWSPRO}" != "" ]]; then
export PATH="${SUNWSPRO}/bin:$PATH"
fi
+if [[ -x "${MAKE}" ]]; then
+ export PATH="$(dirname -- "${MAKE}"):$PATH"
+else
+ print "\$MAKE points to garbage"
+ exit 1
+fi
+
TOOLS="${SRC}/tools"
TOOLS_PROTO="${TOOLS}/proto/root_${MACH}-nd" ; export TOOLS_PROTO
diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh
index 6b911466dd..f0114f81c3 100644
--- a/usr/src/tools/scripts/nightly.sh
+++ b/usr/src/tools/scripts/nightly.sh
@@ -1166,7 +1166,12 @@ DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\""
export o_FLAG X_FLAG POUND_SIGN RELEASE_DATE DEV_CM
maketype="distributed"
-MAKE=dmake
+if [[ -z "$MAKE" ]]; then
+ MAKE=dmake
+elif [[ ! -x "$MAKE" ]]; then
+ echo "\$MAKE is set to garbage in the environment"
+ exit 1
+fi
# get the dmake version string alone
DMAKE_VERSION=$( $MAKE -v )
DMAKE_VERSION=${DMAKE_VERSION#*: }
diff --git a/usr/src/tools/scripts/xref.sh b/usr/src/tools/scripts/xref.sh
index 78c85bae81..d69a364fda 100644
--- a/usr/src/tools/scripts/xref.sh
+++ b/usr/src/tools/scripts/xref.sh
@@ -28,11 +28,10 @@
ONBLDDIR=$(dirname $(whence $0))
-PATH=/usr/bin:/usr/ccs/bin:${BUILD_TOOLS:-/opt}/teamware/bin:$ONBLDDIR
-export PATH
PROG=`basename $0`
XREFMK=`dirname $0`/xref.mk
XRMAKEFILE=Makefile export XRMAKEFILE
+MAKE="dmake -m serial"
#
# The CSCOPEOPTIONS variable can cause problems if it's set in the environment
@@ -163,7 +162,7 @@ if [ -z "$xrefs" ]; then
# Disable etags if we can't find it.
#
xrefs="cscope ctags"
- make -e -f $XREFMK xref.etags.check 2>/dev/null 1>&2 && \
+ $MAKE -e -f $XREFMK xref.etags.check 2>/dev/null 1>&2 && \
xrefs="$xrefs etags"
else
oldifs=$IFS
@@ -219,7 +218,7 @@ for dir in $dirs; do
# to purge any crud that may be lying around from previous aborted runs.
#
if [ -z "$clobber" ]; then
- make -e -f $XREFMK xref.clean > /dev/null
+ $MAKE -e -f $XREFMK xref.clean > /dev/null
fi
#
@@ -228,7 +227,7 @@ for dir in $dirs; do
if [ -z "$noflg" -a -z "$clobber" ]; then
SECONDS=0
info "$reldir: finding flg-related source files"
- make -e -f $XREFMK xref.flg > /dev/null
+ $MAKE -e -f $XREFMK xref.flg > /dev/null
if [ $? -ne 0 ]; then
warn "$reldir: unable to find flg-related source files"
else
@@ -248,19 +247,19 @@ for dir in $dirs; do
for xref in $xrefs; do
if [ -n "$clobber" ]; then
info "$reldir: clobbering $xref cross-reference"
- make -e -f $XREFMK xref.${xref}.clobber > /dev/null ||
+ $MAKE -e -f $XREFMK xref.${xref}.clobber > /dev/null ||
warn "$reldir: cannot clobber $xref cross-reference"
continue
fi
SECONDS=0
info "$reldir: building $xref cross-reference"
- make -e -f $XREFMK xref.${xref} > /dev/null ||
+ $MAKE -e -f $XREFMK xref.${xref} > /dev/null ||
fail "$reldir: cannot build $xref cross-reference"
timeinfo "$reldir: built $xref cross-reference"
done
- make -e -f $XREFMK xref.clean > /dev/null ||
+ $MAKE -e -f $XREFMK xref.clean > /dev/null ||
warn "$reldir: cannot clean up temporary files"
cd - > /dev/null
done