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