geniconvtbl: put full cpp path in its argv
[unleashed.git] / usr / src / lib / libbsm / mkhdr.sh
blob237ff2fe814bd93f9cf8a06f2c91e8b580346664
1 #!/bin/sh
3 # CDDL HEADER START
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
20 # CDDL HEADER END
22 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
25 # Automagically generate the audit_uevents.h header file.
27 DATABASE=audit_event.txt
28 HEADER_FILE=audit_uevents.h
29 CR_YEAR=`/usr/bin/date '+%Y'`
31 cat <<EOF > $HEADER_FILE
33 * CDDL HEADER START
35 * The contents of this file are subject to the terms of the
36 * Common Development and Distribution License (the "License").
37 * You may not use this file except in compliance with the License.
39 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
40 * or http://www.opensolaris.org/os/licensing.
41 * See the License for the specific language governing permissions
42 * and limitations under the License.
44 * When distributing Covered Code, include this CDDL HEADER in each
45 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
46 * If applicable, add the following below this CDDL HEADER, with the
47 * fields enclosed by brackets "[]" replaced with your own identifying
48 * information: Portions Copyright [yyyy] [name of copyright owner]
50 * CDDL HEADER END
53 * Copyright (c) 1992, $CR_YEAR, Oracle and/or its affiliates. All rights reserved.
56 #ifndef _BSM_AUDIT_UEVENTS_H
57 #define _BSM_AUDIT_UEVENTS_H
59 EOF
61 cat <<EOF >> $HEADER_FILE
64 * User level audit event numbers.
66 * 0 Reserved as an invalid event number.
67 * 1 - 2047 Reserved for the Solaris Kernel events.
68 * 2048 - 32767 Reserved for the Solaris TCB programs.
69 * 32768 - 65535 Available for third party TCB applications.
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
77 EOF
79 nawk -F: '{if ((NF == 4) && substr($1,0,1) != "#")
80 if ($1 >= 2048) {
81 tlen = length($2);
83 printf("#define\t%s\t", $2)
84 if (tlen < 8)
85 printf("\t");
86 if (tlen < 16)
87 printf("\t");
88 if (tlen < 24)
89 printf("\t");
90 printf("%s\n", $1);
92 }' \
93 < $DATABASE >> $HEADER_FILE
95 cat <<EOF >> $HEADER_FILE
97 #ifdef __cplusplus
99 #endif
101 #endif /* _BSM_AUDIT_UEVENTS_H */
104 exit 0