summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-05-26 12:55:59 +0300
committerToomas Soome <tsoome@me.com>2020-05-27 18:42:50 +0300
commit2aeafac3612e19716bf8164f89c3c9196342979c (patch)
tree960c72dec5c2fa381d83c5c205869ef6e14bef4d /usr/src
parent95adbecaacb2fe97eb8c9e49e7c1d6910c577bba (diff)
downloadillumos-joyent-2aeafac3612e19716bf8164f89c3c9196342979c.tar.gz
12787 build needs native rpcgen
Reviewed by: Jorge Schrauwen <jorge@blackdot.be> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/Makefile.master2
-rw-r--r--usr/src/cmd/rpcgen/Makefile18
-rw-r--r--usr/src/cmd/rpcgen/Makefile.common36
-rw-r--r--usr/src/tools/Makefile1
-rw-r--r--usr/src/tools/rpcgen/Makefile37
5 files changed, 77 insertions, 17 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index aa7bd524bd..568e36b841 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -148,7 +148,7 @@ GCCLIBDIR64= $(GNUC_ROOT)/lib/$(MACH64)
DOCBOOK_XSL_ROOT= /usr/share/sgml/docbook/xsl-stylesheets
-RPCGEN= /usr/bin/rpcgen
+RPCGEN= $(ONBLD_TOOLS)/bin/$(MACH)/rpcgen
STABS= $(ONBLD_TOOLS)/bin/$(MACH)/stabs
ELFEXTRACT= $(ONBLD_TOOLS)/bin/$(MACH)/elfextract
MBH_PATCH= $(ONBLD_TOOLS)/bin/$(MACH)/mbh_patch
diff --git a/usr/src/cmd/rpcgen/Makefile b/usr/src/cmd/rpcgen/Makefile
index 0d0dd2f82c..352ef22446 100644
--- a/usr/src/cmd/rpcgen/Makefile
+++ b/usr/src/cmd/rpcgen/Makefile
@@ -25,24 +25,12 @@
#
# cmd/rpcgen/Makefile
-PROG= rpcgen
-
-
-OBJS= rpc_clntout.o rpc_cout.o rpc_hout.o rpc_main.o rpc_parse.o \
- rpc_scan.o rpc_svcout.o rpc_tblout.o rpc_util.o rpc_sample.o
-SRCS= $(OBJS:%.o=%.c)
-
include ../Makefile.cmd
-
-LDLIBS +=
-CFLAGS += $(CCVERBOSE)
-CERRWARN += -_gcc=-Wno-switch
-CERRWARN += -_gcc=-Wno-parentheses
-CERRWARN += -_gcc=-Wno-char-subscripts
+include Makefile.common
.KEEP_STATE:
-all: $(PROG)
+all: $(PROG)
$(PROG): $(OBJS)
$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
@@ -53,6 +41,4 @@ install: all $(ROOTPROG)
clean:
$(RM) $(OBJS)
-lint: lint_SRCS
-
include ../Makefile.targ
diff --git a/usr/src/cmd/rpcgen/Makefile.common b/usr/src/cmd/rpcgen/Makefile.common
new file mode 100644
index 0000000000..a5cfe7d878
--- /dev/null
+++ b/usr/src/cmd/rpcgen/Makefile.common
@@ -0,0 +1,36 @@
+#
+# 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 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# cmd/rpcgen/Makefile
+
+PROG= rpcgen
+
+OBJS= rpc_clntout.o rpc_cout.o rpc_hout.o rpc_main.o rpc_parse.o \
+ rpc_scan.o rpc_svcout.o rpc_tblout.o rpc_util.o rpc_sample.o
+SRCS= $(OBJS:%.o=%.c)
+
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
diff --git a/usr/src/tools/Makefile b/usr/src/tools/Makefile
index 014464efe9..ab5b638510 100644
--- a/usr/src/tools/Makefile
+++ b/usr/src/tools/Makefile
@@ -76,6 +76,7 @@ UNSHIPPED_SUBDIRS = \
$(SGSLD) \
localedef \
mandoc \
+ rpcgen \
tic \
vtfontcvt \
zic
diff --git a/usr/src/tools/rpcgen/Makefile b/usr/src/tools/rpcgen/Makefile
new file mode 100644
index 0000000000..6108ec0700
--- /dev/null
+++ b/usr/src/tools/rpcgen/Makefile
@@ -0,0 +1,37 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2020 Toomas Soome <tsoome@me.com>
+#
+
+CMDDIR= $(SRC)/cmd/rpcgen
+
+include ../Makefile.tools
+include $(CMDDIR)/Makefile.common
+
+.KEEP_STATE:
+
+all: $(PROG)
+
+install: all .WAIT $(ROOTONBLDMACHPROG)
+
+clean:
+ $(RM) $(PROG) $(OBJS)
+
+$(PROG): $(OBJS)
+ $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
+ $(POST_PROCESS)
+
+%.o: $(CMDDIR)/%.c
+ $(COMPILE.c) -o $@ $<
+
+include ../Makefile.targ