4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
27 PROTOCOL_DIR
= $(ROOTHDRDIR
)/rpcsvc
28 PROTOCOL_SRCDIR
= $(SRC
)/head
/rpcsvc
29 PROTOCOL_UTS_SRCDIR
= $(SRC
)/uts
/common
/rpc
32 $(BUILD64
)SUBDIRS
+= $(MACH64
)
34 # objects are listed by source directory
36 # common utility code used in more than one directory
44 $(PROTOCOL_DIR
)/daemon_utils.h \
45 $(PROTOCOL_DIR
)/nis.x \
46 $(PROTOCOL_DIR
)/nis.h \
47 $(PROTOCOL_DIR
)/nis_object.x
50 $(PROTOCOL_DIR
)/key_prot.x
52 DERIVED_FILES
= $(GEN_DERIVED_FILES
) $(RPC_DERIVED_FILES
)
55 # Make sure they get cleaned when necessary
57 CLEANFILES
+= $(DERIVED_FILES
)
59 # include library definitions
60 include ..
/Makefile.lib
62 # header file delivered to /usr/include; internal to ON build process
67 TEXT_DOMAIN
= SUNW_OST_NETRPC
68 POFILE
= $(LIBRARY
:.a
=.po
)
69 POFILES
= generic.po _errlst.po
72 clean := TARGET
= clean
73 clobber := TARGET
= clobber
74 delete
:= TARGET
= delete
75 install := TARGET
= install
78 package
:= TARGET
= package
83 all: $(PROTOCOL_DIR
) $(DERIVED_FILES
) .WAIT
$(SUBDIRS
)
85 headers
: $(PROTOCOL_DIR
) .WAIT
$(PROTOCOL_FILES
) $(PROTOCOL_FILES_UTS
) \
88 install: all .WAIT
$(SUBDIRS
)
90 install_h
: $(ROOTHDRS
)
92 # nss.h isn't delivered; no reason to check
95 clean clobber delete lint package
: $(SUBDIRS
)
100 $(PROTOCOL_DIR
)/%.h
: $(PROTOCOL_SRCDIR
)/%.h
103 $(PROTOCOL_DIR
)/nis.h
: $(PROTOCOL_SRCDIR
)/nis.x
$(PROTOCOL_SRCDIR
)/nis_object.x
104 $(RPCGEN
) -C
-h
$(PROTOCOL_SRCDIR
)/nis.x
> nis-tmp.h
105 $(SED
) -e
'/EDIT_START/,$$ d' < nis-tmp.h
> nis.h
107 $(INS
) -s
-m
$(FILEMODE
) -f
$(@D
) nis.h
108 $(RM
) nis.h nis-tmp.h
110 $(PROTOCOL_DIR
)/%.x
: $(PROTOCOL_SRCDIR
)/%.x
113 $(PROTOCOL_DIR
)/%.x
: $(PROTOCOL_UTS_SRCDIR
)/%.x
117 # Rules for building the derived files
119 # Derived header files
121 nis
/gen
/nis_clnt.h
: $(PROTOCOL_DIR
)/nis.x
$(PROTOCOL_DIR
)/nis_object.x
122 $(RPCGEN
) -C
-h
$(PROTOCOL_DIR
)/nis.x
> nis_clnt-gen.h
123 $(SED
) -n
-e
'/EDIT_START/,$$ p' < nis_clnt-gen.h |\
124 $(SED
) -e
's/_3_svc/_svc/' |\
125 $(SED
) -e
's/_3/_clnt/' > $@
129 # Derived source files
132 # include library targets
133 include ..
/Makefile.targ
135 _msg
: $(MSGDOMAIN
) $(POFILE
)
136 $(RM
) $(MSGDOMAIN
)/$(POFILE
)
137 $(CP
) $(POFILE
) $(MSGDOMAIN
)
139 $(POFILE
): $(DERIVED_FILES
) .WAIT
$(POFILES
)
141 $(CAT
) $(POFILES
) > $@
145 $(XGETTEXT
) -a nsl
/_errlst.c
146 $(SED
) -e
'/^# msg/d' -e
'/^domain/d' messages.po
> $@
151 $(XGETTEXT
) $(XGETFLAGS
) `$(GREP) -l gettext */*.[ch] nis/*/*.[ch]*`
152 $(SED
) -e
'/^# msg/d' -e
'/^domain/d' messages.po
> $@
159 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)