]>
Commit | Line | Data |
---|---|---|
f1a1da6c A |
1 | # |
2 | # Copyright (c) 2012-2013 Apple Inc. All rights reserved. | |
3 | # | |
4 | # @APPLE_LICENSE_HEADER_START@ | |
5 | # | |
6 | # This file contains Original Code and/or Modifications of Original Code | |
7 | # as defined in and that are subject to the Apple Public Source License | |
8 | # Version 2.0 (the 'License'). You may not use this file except in | |
9 | # compliance with the License. Please obtain a copy of the License at | |
10 | # http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | # file. | |
12 | # | |
13 | # The Original Code and all software distributed under the License are | |
14 | # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
15 | # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
16 | # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
17 | # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
18 | # Please see the License for the specific language governing rights and | |
19 | # limitations under the License. | |
20 | # | |
21 | # @APPLE_LICENSE_HEADER_END@ | |
22 | # | |
23 | ||
24 | if [ "$ACTION" = installhdrs ]; then exit 0; fi | |
25 | if [ "${RC_ProjectName%_Sim}" != "${RC_ProjectName}" ]; then exit 0; fi | |
c6e5f90c | 26 | if [ "${DRIVERKIT}" = 1 ]; then exit 0; fi |
f1a1da6c | 27 | |
2546420a A |
28 | set -x |
29 | set -e | |
30 | ||
f1a1da6c A |
31 | mkdir -p "$DSTROOT"/usr/share/man/man2 || true |
32 | mkdir -p "$DSTROOT"/usr/share/man/man3 || true | |
33 | mkdir -p "$DSTROOT"/usr/local/share/man/man2 || true | |
34 | mkdir -p "$DSTROOT"/usr/local/share/man/man3 || true | |
35 | ||
36 | # Copy man pages | |
37 | cd "$SRCROOT"/man | |
38 | ||
39 | BASE_PAGES="pthread_kill.2 \ | |
40 | pthread_sigmask.2" | |
41 | ||
42 | cp $BASE_PAGES "$DSTROOT"/usr/share/man/man2 | |
43 | ||
44 | BASE_PAGES="pthread.3 \ | |
45 | pthread_atfork.3 \ | |
46 | pthread_attr.3 \ | |
47 | pthread_attr_init_destroy.3 \ | |
f1a1da6c A |
48 | pthread_cancel.3 \ |
49 | pthread_cleanup_pop.3 \ | |
50 | pthread_cleanup_push.3 \ | |
51 | pthread_cond_broadcast.3 \ | |
52 | pthread_cond_destroy.3 \ | |
53 | pthread_cond_init.3 \ | |
54 | pthread_cond_signal.3 \ | |
55 | pthread_cond_timedwait.3 \ | |
56 | pthread_cond_wait.3 \ | |
57 | pthread_condattr.3 \ | |
58 | pthread_create.3 \ | |
59 | pthread_detach.3 \ | |
60 | pthread_equal.3 \ | |
61 | pthread_exit.3 \ | |
62 | pthread_getschedparam.3 \ | |
63 | pthread_getspecific.3 \ | |
64 | pthread_join.3 \ | |
65 | pthread_key_create.3 \ | |
66 | pthread_key_delete.3 \ | |
964d3577 | 67 | pthread_main_np.3 \ |
f1a1da6c A |
68 | pthread_mutex_destroy.3 \ |
69 | pthread_mutex_init.3 \ | |
70 | pthread_mutex_lock.3 \ | |
71 | pthread_mutex_trylock.3 \ | |
72 | pthread_mutex_unlock.3 \ | |
73 | pthread_mutexattr.3 \ | |
74 | pthread_once.3 \ | |
75 | pthread_rwlock_destroy.3 \ | |
76 | pthread_rwlock_init.3 \ | |
77 | pthread_rwlock_rdlock.3 \ | |
78 | pthread_rwlock_unlock.3 \ | |
79 | pthread_rwlock_wrlock.3 \ | |
80 | pthread_rwlockattr_destroy.3 \ | |
81 | pthread_rwlockattr_getpshared.3 \ | |
82 | pthread_rwlockattr_init.3 \ | |
83 | pthread_rwlockattr_setpshared.3 \ | |
84 | pthread_self.3 \ | |
85 | pthread_setcancelstate.3 \ | |
2546420a A |
86 | pthread_setname_np.3 \ |
87 | pthread_setspecific.3 \ | |
88 | pthread_threadid_np.3 \ | |
c1f56ec9 A |
89 | pthread_yield_np.3 \ |
90 | pthread_jit_write_protect_np.3" | |
91 | ||
f1a1da6c A |
92 | |
93 | cp $BASE_PAGES "$DSTROOT"/usr/share/man/man3 | |
94 | ||
2546420a A |
95 | for ATTR in \ |
96 | detachstate \ | |
97 | inheritsched \ | |
98 | schedparam \ | |
99 | schedpolicy \ | |
100 | scope \ | |
101 | stackaddr \ | |
102 | stacksize \ | |
103 | ; do | |
104 | cp pthread_attr_set_get$ATTR.3 "$DSTROOT"/usr/share/man/man3/pthread_attr_set$ATTR.3 | |
105 | cp pthread_attr_set_get$ATTR.3 "$DSTROOT"/usr/share/man/man3/pthread_attr_get$ATTR.3 | |
106 | done | |
107 | ||
f1a1da6c A |
108 | # Make hard links |
109 | ||
110 | cd "$DSTROOT"/usr/share/man/man3 | |
111 | ||
112 | chown ${INSTALL_OWNER}:${INSTALL_GROUP} $BASE_PAGES | |
113 | chmod $INSTALL_MODE_FLAG $BASE_PAGES | |
114 | ||
115 | ln -fh pthread_getschedparam.3 pthread_setschedparam.3 | |
116 | ln -fh pthread_rwlock_rdlock.3 pthread_rwlock_tryrdlock.3 | |
117 | ln -fh pthread_rwlock_wrlock.3 pthread_rwlock_trywrlock.3 | |
c1f56ec9 | 118 | ln -fh pthread_jit_write_protect_np.3 pthread_jit_write_protect_supported_np.3 |
f1a1da6c A |
119 | |
120 | for M in \ | |
121 | pthread_attr_destroy.3 \ | |
f1a1da6c | 122 | pthread_attr_init.3 \ |
2546420a A |
123 | pthread_attr_setstack.3 \ |
124 | pthread_attr_getstack.3 \ | |
125 | pthread_attr_setguardsize.3 \ | |
126 | pthread_attr_getguardsize.3 \ | |
f1a1da6c A |
127 | ; do |
128 | ln -fh pthread_attr.3 $M | |
129 | done | |
130 | ||
131 | for M in \ | |
132 | pthread_mutexattr_destroy.3 \ | |
133 | pthread_mutexattr_getprioceiling.3 \ | |
134 | pthread_mutexattr_getprotocol.3 \ | |
135 | pthread_mutexattr_gettype.3 \ | |
136 | pthread_mutexattr_init.3 \ | |
137 | pthread_mutexattr_setprioceiling.3 \ | |
138 | pthread_mutexattr_setprotocol.3 \ | |
139 | pthread_mutexattr_settype.3 \ | |
140 | ; do | |
141 | ln -fh pthread_mutexattr.3 $M | |
142 | done | |
143 | ||
144 | for M in \ | |
145 | pthread_condattr_destroy.3 \ | |
146 | pthread_condattr_init.3 \ | |
147 | ; do | |
148 | ln -fh pthread_condattr.3 $M | |
149 | done | |
150 | ||
151 | for M in \ | |
152 | pthread_setcanceltype.3 \ | |
153 | pthread_testcancel.3 \ | |
154 | ; do | |
155 | ln -fh pthread_setcancelstate.3 $M | |
156 | done |