Makefile revision 686c0471389a2f92c1e43b38e1b97771bee482ab
#
# 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
# 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 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# include global definitions
# Headers are listed one per line so that TeamWare can auto-merge most changes
aio.h \
alloca.h \
ar.h \
assert.h \
atomic.h \
attr.h \
cpio.h \
crypt.h \
ctype.h \
deflt.h \
devid.h \
dial.h \
dirent.h \
dlfcn.h \
door.h \
elf.h \
err.h \
errno.h \
euc.h \
exacct.h \
fatal.h \
fcntl.h \
float.h \
fmtmsg.h \
ftw.h \
gelf.h \
getopt.h \
glob.h \
grp.h \
iconv.h \
ieeefp.h \
iso646.h \
klpd.h \
lber.h \
ldap.h \
libelf.h \
libgen.h \
libw.h \
limits.h \
link.h \
listen.h \
locale.h \
macros.h \
malloc.h \
memory.h \
meta.h \
mon.h \
mp.h \
mqueue.h \
nan.h \
ndbm.h \
ndpd.h \
netdb.h \
netdir.h \
nlist.h \
note.h \
nsctl.h \
paths.h \
pfmt.h \
pkgdev.h \
poll.h \
port.h \
priv.h \
procfs.h \
prof.h \
pw.h \
pwd.h \
rctl.h \
regex.h \
regexp.h \
resolv.h \
rje.h \
sac.h \
sched.h \
sdssc.h \
search.h \
setjmp.h \
sgtty.h \
shadow.h \
signal.h \
spawn.h \
stdarg.h \
stddef.h \
stdint.h \
stdio.h \
stdlib.h \
string.h \
synch.h \
syslog.h \
syms.h \
tar.h \
termio.h \
thread.h \
time.h \
tiuser.h \
tzfile.h \
ucred.h \
ulimit.h \
unistd.h \
ustat.h \
utime.h \
utmp.h \
utmpx.h \
values.h \
wait.h \
wchar.h \
wctype.h \
widec.h \
xti.h \
ISOHDRS = \
ARPAHDRS = \
ftp.h \
inet.h \
telnet.h \
tftp.h \
AUDIOHDRS = \
UUIDHDRS = \
# rpcsvc headers which are just headers (not derived from a .x file)
RPCSVC_SRC_HDRS = \
dbm.h \
nis_db.h \
nislib.h \
ypclnt.h \
ypupd.h \
# rpcsvc headers which are generated from .x files
RPCSVC_GEN_HDRS = \
mount.h \
nis.h \
rex.h \
rquota.h \
rstat.h \
rusers.h \
rwall.h \
spray.h \
LVMRPCHDRS = \
RPCGENFLAGS = -C -h
meta_basic.h := RPCGENFLAGS += -M
metad.h := RPCGENFLAGS += -M
metamed.h := RPCGENFLAGS += -M
mhdx.h := RPCGENFLAGS += -M
mdiox.h := RPCGENFLAGS += -M
metamhd.h := RPCGENFLAGS += -M
metacl.h := RPCGENFLAGS += -M
# rpcsvc rpcgen source (.x files)
#
# yp.x is an attempt at codifying what was hand coded in RPCL.
# Unfortunately it doesn't quite work. (The handcoded stuff isn't
# expressable in RPCL) this is due to the fact that YP was written
#
# There is no `.h' for nis_object.x because it is included by nis.x and
# the resulting .h is nis.h.
RPCSVCPROTS = \
LVMSVCPROTS = \
$(LVMRPCHDRS:%.h=%.x)
# check files really don't exist
#
# should do something with the rpcsvc headers
$(DOT_H_CHECK)
$(DOT_H_CHECK)
$(DOT_H_CHECK)
$(DOT_H_CHECK)
$(DOT_X_CHECK)
$(DOT_H_CHECK)
$(DOT_H_CHECK)
$(DOT_H_CHECK)
# Note that the derived headers (rpcgen) are not checked at this time. These
# need work at the source level and rpcgen itself has a bug which causes a
# cstyle violation. Furthermore, there seems to be good reasons for the
# generated headers to not pass all of the hdrchk rules.
#
# Add the following to the CHECKHDRS list to activate the .x checks:
# $(RPCSVCPROTS:%.x=rpcsvc/%.check) \
#
$(KRB5HDRS:%.h=kerberosv5/%.check) \
$(RPCSVC_SRC_HDRS:%.h=rpcsvc/%.check) \
# headers which won't quite meet the standards...
#
# assert.h is required by ansi-c to *not* be idempotent (section 4.1.2).
# Hence the trailing guard is not the last thing in the file nor can it
# be without playing silly games.
# install rules
$(INS.file)
$(INS.file)
$(INS.file)
$(INS.file)
$(INS.file)
$(INS.file)
$(INS.file)
$(INS.file)
$(INS.file)
$(SYMHDRFLOAT) $(SYMHDRISO646)
$(RM) $(LVMRPCHDRS);
$(ROOTDIRS):
$(INS.dir)
$(SYMHDRASSERT):
$(SYMHDRERRNO):
$(SYMHDRFLOAT):
$(SYMHDRISO646):
$(RPCGEN) $(RPCGENFLAGS) $< -o $@
$(SED) -e '/EDIT_START/,$$ d' > $@
/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
{ print $0 } \
' > $@
/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
{ print $0 } \
' > $@
/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
{ print $0 } \
' > $@
nawk '{sub(/sys\/lvm\/md_mhdx/, "mhdx"); print $$0}' | \
nawk '{sub(/sys\/lvm\/md_basic/, "meta_basic"); print $$0}' | \
/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
{ print $0 } \
' > $@
nawk '{sub(/sys\/lvm\/md_basic/, "meta_basic"); print $$0}' | \
/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
{ print $0 } \
' > $@
/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
{ print $0 } \
' > $@
/<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \
{ print $0 } \
' > $@