2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A#
2N/A# Copyright (c) 1989, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/A#
2N/A
2N/APROTOCOL_DIR= $(ROOTHDRDIR)/rpcsvc
2N/APROTOCOL_SRCDIR= $(SRC)/head/rpcsvc
2N/APROTOCOL_UTS_SRCDIR= $(SRC)/uts/common/rpc
2N/A
2N/ASUBDIRS = $(MACH)
2N/A$(BUILD64)SUBDIRS += $(MACH64)
2N/A
2N/A# objects are listed by source directory
2N/A
2N/A# common utility code used in more than one directory
2N/ARPC_DERIVED_FILES=
2N/A
2N/AGEN_DERIVED_FILES= \
2N/A nis/gen/nis_clnt.h
2N/A
2N/A
2N/APROTOCOL_FILES= \
2N/A $(PROTOCOL_DIR)/daemon_utils.h \
2N/A $(PROTOCOL_DIR)/nis.x \
2N/A $(PROTOCOL_DIR)/nis.h \
2N/A $(PROTOCOL_DIR)/nis_object.x
2N/A
2N/APROTOCOL_FILES_UTS= \
2N/A $(PROTOCOL_DIR)/key_prot.x
2N/A
2N/ADERIVED_FILES= $(GEN_DERIVED_FILES) $(RPC_DERIVED_FILES)
2N/A
2N/A#
2N/A# Make sure they get cleaned when necessary
2N/A#
2N/ACLEANFILES += $(DERIVED_FILES)
2N/A
2N/A# include library definitions
2N/Ainclude ../Makefile.lib
2N/A
2N/A# header file delivered to /usr/include; internal to ON build process
2N/AHDRS = nss.h
2N/AHDRDIR = nss
2N/A
2N/ALIBRARY= libnsl.a
2N/ATEXT_DOMAIN= SUNW_OST_NETRPC
2N/APOFILE= $(LIBRARY:.a=.po)
2N/APOFILES= generic.po _errlst.po
2N/A
2N/Aall := TARGET= all
2N/Aclean := TARGET= clean
2N/Aclobber := TARGET= clobber
2N/Adelete := TARGET= delete
2N/Ainstall := TARGET= install
2N/Alint := TARGET= lint
2N/A_msg := TARGET= _msg
2N/Apackage := TARGET= package
2N/Astub := TARGET= stub
2N/Astubinstall := TARGET= stubinstall
2N/A
2N/A
2N/A.KEEP_STATE:
2N/A
2N/Aall: $(PROTOCOL_DIR) $(DERIVED_FILES) .WAIT $(SUBDIRS)
2N/A
2N/Aheaders: $(PROTOCOL_DIR) .WAIT $(PROTOCOL_FILES) $(PROTOCOL_FILES_UTS) \
2N/A $(DERIVED_FILES)
2N/A
2N/Ainstall: all .WAIT $(SUBDIRS)
2N/A
2N/Ainstall_h: $(ROOTHDRS)
2N/A
2N/A# nss.h isn't delivered; no reason to check
2N/Acheck:
2N/A
2N/Aclean clobber delete lint package stub stubinstall: $(SUBDIRS)
2N/A
2N/A$(PROTOCOL_DIR):
2N/A $(INS.dir)
2N/A
2N/A$(PROTOCOL_DIR)/%.h: $(PROTOCOL_SRCDIR)/%.h
2N/A $(INS.file)
2N/A
2N/A$(PROTOCOL_DIR)/nis.h: $(PROTOCOL_SRCDIR)/nis.x $(PROTOCOL_SRCDIR)/nis_object.x
2N/A $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis.x > nis-tmp.h
2N/A $(SED) -e '/EDIT_START/,$$ d' < nis-tmp.h > nis.h
2N/A $(RM) $@
2N/A $(INS) -s -m $(FILEMODE) -f $(@D) nis.h
2N/A $(RM) nis.h nis-tmp.h
2N/A
2N/A$(PROTOCOL_DIR)/%.x: $(PROTOCOL_SRCDIR)/%.x
2N/A $(INS.file)
2N/A
2N/A$(PROTOCOL_DIR)/%.x: $(PROTOCOL_UTS_SRCDIR)/%.x
2N/A $(INS.file)
2N/A
2N/A#
2N/A# Rules for building the derived files
2N/A#
2N/A# Derived header files
2N/A#
2N/Anis/gen/nis_clnt.h: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x
2N/A $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis.x > nis_clnt-gen.h
2N/A $(SED) -n -e '/EDIT_START/,$$ p' < nis_clnt-gen.h |\
2N/A $(SED) -e 's/_3_svc/_svc/' |\
2N/A $(SED) -e 's/_3/_clnt/' > $@
2N/A $(RM) nis_clnt-gen.h
2N/A
2N/A#
2N/A# Derived source files
2N/A#
2N/A
2N/A# include library targets
2N/Ainclude ../Makefile.targ
2N/A
2N/A# EXPORT DELETE START
2N/A# CRYPT DELETE START
2N/A# Special target to clean up the source tree for export distribution
2N/A# Warning: This target changes the source tree
2N/AEXPORT_SRC:
2N/A $(RM) Makefile+ des/des_crypt.c+ des/des_soft.c+ key/xcrypt.c+
2N/A $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
2N/A < des/des_crypt.c > des/des_crypt.c+
2N/A $(MV) des/des_crypt.c+ des/des_crypt.c
2N/A $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
2N/A < des/des_soft.c > des/des_soft.c+
2N/A $(MV) des/des_soft.c+ des/des_soft.c
2N/A $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
2N/A < key/xcrypt.c > key/xcrypt.c+
2N/A $(MV) key/xcrypt.c+ key/xcrypt.c
2N/A $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
2N/A < Makefile > Makefile+
2N/A $(MV) Makefile+ Makefile
2N/A $(CHMOD) 444 Makefile des/des_crypt.c des/des_soft.c key/xcrypt.c
2N/A
2N/ACRYPT_SRC:
2N/A $(RM) Makefile+
2N/A $(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \
2N/A < Makefile \
2N/A | $(SED) -e "/EXPORT DELETE/d" \
2N/A > Makefile+
2N/A $(MV) Makefile+ Makefile
2N/A $(CHMOD) 444 Makefile
2N/A
2N/A# CRYPT DELETE END
2N/A# EXPORT DELETE END
2N/A
2N/A_msg: $(MSGDOMAIN) $(POFILE)
2N/A $(RM) $(MSGDOMAIN)/$(POFILE)
2N/A $(CP) $(POFILE) $(MSGDOMAIN)
2N/A
2N/A$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
2N/A $(RM) $@
2N/A $(CAT) $(POFILES) > $@
2N/A
2N/A_errlst.po:
2N/A $(RM) messages.po
2N/A $(XGETTEXT) -a nsl/_errlst.c
2N/A $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
2N/A $(RM) messages.po
2N/A
2N/Ageneric.po:
2N/A $(RM) messages.po
2N/A $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext */*.[ch] nis/*/*.[ch]*`
2N/A $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
2N/A $(RM) messages.po
2N/A
2N/A$(MSGDOMAIN):
2N/A $(INS.dir)
2N/A
2N/A$(SUBDIRS): FRC
2N/A @cd $@; pwd; $(MAKE) $(TARGET)
2N/A
2N/AFRC: