Makefile revision fc2512cfb727d49529d8ed99164db871f4829b73
286N/A# The contents of this file are subject to the terms of the 286N/A# Common Development and Distribution License (the "License"). 286N/A# You may not use this file except in compliance with the License. 286N/A# See the License for the specific language governing permissions 286N/A# and limitations under the License. 286N/A# When distributing Covered Code, include this CDDL HEADER in each 286N/A# If applicable, add the following below this CDDL HEADER, with the 286N/A# fields enclosed by brackets "[]" replaced with your own identifying 286N/A# information: Portions Copyright [yyyy] [name of copyright owner] 286N/A# Copyright 2011 Nexenta Systems, Inc. All rights reserved. 286N/A# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 286N/A# Use is subject to license terms. 286N/A# Copyright 2013 Garrett D'Amore <garrett@damore.org> 286N/A# Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com> 286N/A# include global definitions 286N/A# Headers are listed one per line so that TeamWare can auto-merge most changes 286N/A# rpcsvc headers which are just headers (not derived from a .x file) 286N/A# rpcsvc headers which are generated from .x files 286N/A# rpcsvc rpcgen source (.x files) 286N/A# yp.x is an attempt at codifying what was hand coded in RPCL. 286N/A# Unfortunately it doesn't quite work. (The handcoded stuff isn't 286N/A# expressable in RPCL) this is due to the fact that YP was written 286N/A# check files really don't exist 286N/A# should do something with the rpcsvc headers 286N/A# Note that the derived headers (rpcgen) are not checked at this time. These 286N/A# need work at the source level and rpcgen itself has a bug which causes a 286N/A# cstyle violation. Furthermore, there seems to be good reasons for the 286N/A# generated headers to not pass all of the hdrchk rules. 286N/A# Add the following to the CHECKHDRS list to activate the .x checks: 286N/A# $(RPCSVCPROTS:%.x=rpcsvc/%.check) \ 286N/A# headers which won't quite meet the standards... 286N/A# assert.h is required by ansi-c to *not* be idempotent (section 4.1.2). 286N/A# Hence the trailing guard is not the last thing in the file nor can it 286N/A# be without playing silly games. 286N/A $(AWK) '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A /<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A $(AWK) '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A /<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A $(AWK) '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A /<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A $(AWK) '{sub(/sys\/lvm\/md_mhdx/, "mhdx"); print $$0}' | \
286N/A $(AWK) '{sub(/sys\/lvm\/md_basic/, "meta_basic"); print $$0}' | \
286N/A $(AWK) '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A /<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A $(AWK) '{sub(/sys\/lvm\/md_basic/, "meta_basic"); print $$0}' | \
286N/A $(AWK) '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A /<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A $(AWK) '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A /<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A $(AWK) '/<synch.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \ 286N/A /<thread.h>/ { print "#ifdef _REENTRANT"; print $$0; print "#endif\t/* _REENTRANT */"; next } \