17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate# with the License. 87c478bd9Sstevel@tonic-gate# 97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate# and limitations under the License. 137c478bd9Sstevel@tonic-gate# 147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate# 207c478bd9Sstevel@tonic-gate# CDDL HEADER END 217c478bd9Sstevel@tonic-gate# 22*61961e0fSrobinson 237c478bd9Sstevel@tonic-gate# 247c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 257c478bd9Sstevel@tonic-gate# Use is subject to license terms. 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 287c478bd9Sstevel@tonic-gate# 297c478bd9Sstevel@tonic-gate# lib/libnsl/Makefile 307c478bd9Sstevel@tonic-gate# 317c478bd9Sstevel@tonic-gatePROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc 327c478bd9Sstevel@tonic-gatePROTOCOL_SRCDIR= $(SRC)/head/rpcsvc 337c478bd9Sstevel@tonic-gatePROTOCOL_UTS_SRCDIR= $(SRC)/uts/common/rpc 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gateSUBDIRS = spec .WAIT $(MACH) $(BUILD64) .WAIT $(MACH64) 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate# objects are listed by source directory 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate# common utility code used in more than one directory 40*61961e0fSrobinsonRPC_DERIVED_FILES= 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gateGEN_DERIVED_FILES= \ 437c478bd9Sstevel@tonic-gate nis/gen/nis_clnt.h \ 44*61961e0fSrobinson nis/gen/nis_clnt.c 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gateCACHE_DERIVED_FILES= \ 477c478bd9Sstevel@tonic-gate nis/cache/nis_clnt.h \ 487c478bd9Sstevel@tonic-gate nis/cache/nis_cache.h \ 497c478bd9Sstevel@tonic-gate nis/cache/nis_cache_clnt.cc \ 507c478bd9Sstevel@tonic-gate nis/cache/nis_cache_xdr.cc 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gatePROTOCOL_FILES= \ 537c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/daemon_utils.h \ 547c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis.x \ 557c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis.h \ 567c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_object.x \ 577c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_callback.x \ 587c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_callback.h \ 597c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_cache.x \ 607c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/nis_cache.h 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gatePROTOCOL_FILES_UTS= \ 637c478bd9Sstevel@tonic-gate $(PROTOCOL_DIR)/key_prot.x 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gateDERIVED_FILES= $(GEN_DERIVED_FILES) $(CACHE_DERIVED_FILES) $(RPC_DERIVED_FILES) 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate# 687c478bd9Sstevel@tonic-gate# Make sure they get cleaned when necessary 697c478bd9Sstevel@tonic-gate# 707c478bd9Sstevel@tonic-gateCLEANFILES += $(DERIVED_FILES) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate# include library definitions 737c478bd9Sstevel@tonic-gateinclude ../Makefile.lib 747c478bd9Sstevel@tonic-gate 75*61961e0fSrobinsonTXTS += dial/uucp.h dial/parms.h dial/sysfiles.h 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gateSED= sed 787c478bd9Sstevel@tonic-gateCP= cp 797c478bd9Sstevel@tonic-gateGREP= grep 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gateLIBRARY= libnsl.a 827c478bd9Sstevel@tonic-gateTEXT_DOMAIN= SUNW_OST_NETRPC 837c478bd9Sstevel@tonic-gatePOFILE= $(LIBRARY:.a=.po) 847c478bd9Sstevel@tonic-gatePOFILES= generic.po _errlst.po 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gateall := TARGET= all 877c478bd9Sstevel@tonic-gateclean := TARGET= clean 887c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 897c478bd9Sstevel@tonic-gatedelete := TARGET= delete 907c478bd9Sstevel@tonic-gateinstall := TARGET= install 917c478bd9Sstevel@tonic-gatelint := TARGET= lint 927c478bd9Sstevel@tonic-gate_msg := TARGET= _msg 937c478bd9Sstevel@tonic-gatepackage := TARGET= package 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate.KEEP_STATE: 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gateall: $(PROTOCOL_DIR) $(DERIVED_FILES) txts .WAIT $(SUBDIRS) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gateheaders: $(PROTOCOL_DIR) .WAIT $(PROTOCOL_FILES) $(PROTOCOL_FILES_UTS) \ 1017c478bd9Sstevel@tonic-gate $(DERIVED_FILES) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gatetxts: $(TXTS) 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gateinstall: all $(SUBDIRS) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gateclean clobber delete lint package: $(SUBDIRS) 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR): 1107c478bd9Sstevel@tonic-gate $(INS.dir) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/%.h: $(PROTOCOL_SRCDIR)/%.h 1137c478bd9Sstevel@tonic-gate $(INS.file) 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/nis.h: $(PROTOCOL_SRCDIR)/nis.x $(PROTOCOL_SRCDIR)/nis_object.x 1167c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis.x > nis-tmp.h 1177c478bd9Sstevel@tonic-gate $(SED) -e '/EDIT_START/,$$ d' < nis-tmp.h > nis.h 1187c478bd9Sstevel@tonic-gate $(RM) $@ 1197c478bd9Sstevel@tonic-gate $(INS) -s -m $(FILEMODE) -f $(@D) nis.h 1207c478bd9Sstevel@tonic-gate $(RM) nis.h nis-tmp.h 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/nis_callback.h: $(PROTOCOL_SRCDIR)/nis_callback.x 1237c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis_callback.x -o nis_callback.h 1247c478bd9Sstevel@tonic-gate $(RM) $@ 1257c478bd9Sstevel@tonic-gate $(INS) -s -m $(FILEMODE) -f $(@D) nis_callback.h 1267c478bd9Sstevel@tonic-gate $(RM) nis_callback.h 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/nis_cache.h: $(PROTOCOL_SRCDIR)/nis_cache.x 1297c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis_cache.x -o nis_cache.h 1307c478bd9Sstevel@tonic-gate $(RM) $@ 1317c478bd9Sstevel@tonic-gate $(INS) -s -m $(FILEMODE) -f $(@D) nis_cache.h 1327c478bd9Sstevel@tonic-gate $(RM) nis_cache.h 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/%.x: $(PROTOCOL_SRCDIR)/%.x 1357c478bd9Sstevel@tonic-gate $(INS.file) 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate$(PROTOCOL_DIR)/%.x: $(PROTOCOL_UTS_SRCDIR)/%.x 1387c478bd9Sstevel@tonic-gate $(INS.file) 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gate# 1417c478bd9Sstevel@tonic-gate# Rules for building the derived files 1427c478bd9Sstevel@tonic-gate# 1437c478bd9Sstevel@tonic-gate# Derived header files 1447c478bd9Sstevel@tonic-gate# 1457c478bd9Sstevel@tonic-gatenis/gen/nis_clnt.h: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x 1467c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis.x > nis_clnt-gen.h 1477c478bd9Sstevel@tonic-gate $(SED) -n -e '/EDIT_START/,$$ p' < nis_clnt-gen.h |\ 1487c478bd9Sstevel@tonic-gate $(SED) -e 's/_3_svc/_svc/' |\ 1497c478bd9Sstevel@tonic-gate $(SED) -e 's/_3/_clnt/' > $@ 1507c478bd9Sstevel@tonic-gate $(RM) nis_clnt-gen.h 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gatenis/cache/nis_clnt.h: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x 1537c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis.x > nis_clnt-cache.h 1547c478bd9Sstevel@tonic-gate $(SED) -n -e '/EDIT_START/,$$ p' < nis_clnt-cache.h |\ 1557c478bd9Sstevel@tonic-gate $(SED) -e 's/_3_svc/_svc/' |\ 1567c478bd9Sstevel@tonic-gate $(SED) -e 's/_3/_clnt/' > $@ 1577c478bd9Sstevel@tonic-gate $(RM) nis_clnt-cache.h 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gate# 1607c478bd9Sstevel@tonic-gate# Derived source files 1617c478bd9Sstevel@tonic-gate# 1627c478bd9Sstevel@tonic-gatenis/gen/nis_clnt.c: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x 1637c478bd9Sstevel@tonic-gate $(RPCGEN) -C -l $(PROTOCOL_DIR)/nis.x > nis_clnt-tmp.c 1647c478bd9Sstevel@tonic-gate $(SED) -e 's!\"$(PROTOCOL_DIR)/nis.h\"!\<rpcsvc/nis.h\>!' \ 1657c478bd9Sstevel@tonic-gate < nis_clnt-tmp.c |\ 1667c478bd9Sstevel@tonic-gate $(SED) -e 's/_3/_clnt/' > $@ 1677c478bd9Sstevel@tonic-gate $(RM) nis_clnt-tmp.c 1687c478bd9Sstevel@tonic-gate 1697c478bd9Sstevel@tonic-gatenis/cache/nis_cache_xdr.cc: $(PROTOCOL_DIR)/nis_cache.x 1707c478bd9Sstevel@tonic-gate $(RPCGEN) -C -c $(PROTOCOL_DIR)/nis_cache.x |\ 1717c478bd9Sstevel@tonic-gate $(SED) -e 's!\"$(PROTOCOL_DIR)/nis_cache.h\"!"nis_cache.h"!' > $@ 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gatenis/cache/nis_cache_clnt.cc: $(PROTOCOL_DIR)/nis_cache.x 1747c478bd9Sstevel@tonic-gate $(RPCGEN) -C -l $(PROTOCOL_DIR)/nis_cache.x |\ 1757c478bd9Sstevel@tonic-gate $(SED) -e 's!\"$(PROTOCOL_DIR)/nis_cache.h\"!"nis_cache.h"!' > $@ 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gatenis/cache/nis_cache.h: $(PROTOCOL_DIR)/nis_cache.x 1787c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis_cache.x |\ 1797c478bd9Sstevel@tonic-gate $(SED) -e 's!\"$(PROTOCOL_DIR)/nis_cache.h\"!"nis_cache.h"!' > $@ 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate# include library targets 1827c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate# EXPORT DELETE START 1857c478bd9Sstevel@tonic-gate# CRYPT DELETE START 1867c478bd9Sstevel@tonic-gate# Special target to clean up the source tree for export distribution 1877c478bd9Sstevel@tonic-gate# Warning: This target changes the source tree 1887c478bd9Sstevel@tonic-gateEXPORT_SRC: 1897c478bd9Sstevel@tonic-gate $(RM) Makefile+ des/des_crypt.c+ des/des_soft.c+ key/xcrypt.c+ 1907c478bd9Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1917c478bd9Sstevel@tonic-gate < des/des_crypt.c > des/des_crypt.c+ 1927c478bd9Sstevel@tonic-gate $(MV) des/des_crypt.c+ des/des_crypt.c 1937c478bd9Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1947c478bd9Sstevel@tonic-gate < des/des_soft.c > des/des_soft.c+ 1957c478bd9Sstevel@tonic-gate $(MV) des/des_soft.c+ des/des_soft.c 1967c478bd9Sstevel@tonic-gate $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1977c478bd9Sstevel@tonic-gate < key/xcrypt.c > key/xcrypt.c+ 1987c478bd9Sstevel@tonic-gate $(MV) key/xcrypt.c+ key/xcrypt.c 1997c478bd9Sstevel@tonic-gate $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 2007c478bd9Sstevel@tonic-gate < Makefile > Makefile+ 2017c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 2027c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile des/des_crypt.c des/des_soft.c key/xcrypt.c 2037c478bd9Sstevel@tonic-gate 2047c478bd9Sstevel@tonic-gateCRYPT_SRC: 2057c478bd9Sstevel@tonic-gate $(RM) Makefile+ 2067c478bd9Sstevel@tonic-gate $(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \ 2077c478bd9Sstevel@tonic-gate < Makefile \ 2087c478bd9Sstevel@tonic-gate | $(SED) -e "/EXPORT DELETE/d" \ 2097c478bd9Sstevel@tonic-gate > Makefile+ 2107c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 2117c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gate# CRYPT DELETE END 2147c478bd9Sstevel@tonic-gate# EXPORT DELETE END 2157c478bd9Sstevel@tonic-gate 2167c478bd9Sstevel@tonic-gate_msg: $(MSGDOMAIN) $(POFILE) 2177c478bd9Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 2187c478bd9Sstevel@tonic-gate $(CP) $(POFILE) $(MSGDOMAIN) 2197c478bd9Sstevel@tonic-gate 2207c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 2217c478bd9Sstevel@tonic-gate $(RM) $@ 2227c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 2237c478bd9Sstevel@tonic-gate 2247c478bd9Sstevel@tonic-gate_errlst.po: 2257c478bd9Sstevel@tonic-gate $(RM) messages.po 2267c478bd9Sstevel@tonic-gate $(XGETTEXT) -a nsl/_errlst.c 2277c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 2287c478bd9Sstevel@tonic-gate $(RM) messages.po 2297c478bd9Sstevel@tonic-gate 2307c478bd9Sstevel@tonic-gategeneric.po: 2317c478bd9Sstevel@tonic-gate $(RM) messages.po 2327c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext */*.[ch] nis/*/*.[ch]*` 2337c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 2347c478bd9Sstevel@tonic-gate $(RM) messages.po 2357c478bd9Sstevel@tonic-gate 2367c478bd9Sstevel@tonic-gate$(MSGDOMAIN): 2377c478bd9Sstevel@tonic-gate $(INS.dir) 2387c478bd9Sstevel@tonic-gate 2397c478bd9Sstevel@tonic-gatespec $(MACH) $(MACH64) $(SPEC) $(SPEC64): FRC 2407c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gateFRC: 243