install-manpages.sh 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #!/bin/bash -e
  2. #
  3. # Copyright (c) 2010-2012 Apple Inc. All rights reserved.
  4. #
  5. # @APPLE_APACHE_LICENSE_HEADER_START@
  6. #
  7. # Licensed under the Apache License, Version 2.0 (the "License");
  8. # you may not use this file except in compliance with the License.
  9. # You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS,
  15. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. # See the License for the specific language governing permissions and
  17. # limitations under the License.
  18. #
  19. # @APPLE_APACHE_LICENSE_HEADER_END@
  20. #
  21. if [ "$ACTION" = installhdrs ]; then exit 0; fi
  22. if [ "${RC_ProjectName%_Sim}" != "${RC_ProjectName}" ]; then exit 0; fi
  23. mkdir -p "$DSTROOT"/usr/share/man/man3 || true
  24. mkdir -p "$DSTROOT"/usr/local/share/man/man3 || true
  25. # Copy man pages
  26. cd "$SRCROOT"/man
  27. BASE_PAGES="dispatch.3 dispatch_after.3 dispatch_api.3 dispatch_apply.3 \
  28. dispatch_async.3 dispatch_group_create.3 dispatch_object.3 \
  29. dispatch_once.3 dispatch_queue_create.3 dispatch_semaphore_create.3 \
  30. dispatch_source_create.3 dispatch_time.3 dispatch_data_create.3 \
  31. dispatch_io_create.3 dispatch_io_read.3 dispatch_read.3"
  32. PRIVATE_PAGES="dispatch_benchmark.3"
  33. cp ${BASE_PAGES} "$DSTROOT"/usr/share/man/man3
  34. cp ${PRIVATE_PAGES} "$DSTROOT"/usr/local/share/man/man3
  35. # Make hard links (lots of hard links)
  36. cd "$DSTROOT"/usr/local/share/man/man3
  37. ln -f dispatch_benchmark.3 dispatch_benchmark_f.3
  38. chown ${INSTALL_OWNER}:${INSTALL_GROUP} $PRIVATE_PAGES
  39. chmod $INSTALL_MODE_FLAG $PRIVATE_PAGES
  40. cd $DSTROOT/usr/share/man/man3
  41. chown ${INSTALL_OWNER}:${INSTALL_GROUP} $BASE_PAGES
  42. chmod $INSTALL_MODE_FLAG $BASE_PAGES
  43. ln -f dispatch_after.3 dispatch_after_f.3
  44. ln -f dispatch_apply.3 dispatch_apply_f.3
  45. ln -f dispatch_once.3 dispatch_once_f.3
  46. for m in dispatch_async_f dispatch_sync dispatch_sync_f; do
  47. ln -f dispatch_async.3 ${m}.3
  48. done
  49. for m in dispatch_group_enter dispatch_group_leave dispatch_group_wait \
  50. dispatch_group_async dispatch_group_async_f dispatch_group_notify \
  51. dispatch_group_notify_f; do
  52. ln -f dispatch_group_create.3 ${m}.3
  53. done
  54. for m in dispatch_retain dispatch_release dispatch_suspend dispatch_resume dispatch_activate \
  55. dispatch_get_context dispatch_set_context dispatch_set_finalizer_f; do
  56. ln -f dispatch_object.3 ${m}.3
  57. done
  58. for m in dispatch_semaphore_signal dispatch_semaphore_wait; do
  59. ln -f dispatch_semaphore_create.3 ${m}.3
  60. done
  61. for m in dispatch_get_current_queue dispatch_main dispatch_get_main_queue \
  62. dispatch_get_global_queue dispatch_queue_get_label \
  63. dispatch_set_target_queue; do
  64. ln -f dispatch_queue_create.3 ${m}.3
  65. done
  66. for m in dispatch_source_set_event_handler dispatch_source_set_event_handler_f \
  67. dispatch_source_set_registration_handler dispatch_source_set_registration_handler_f \
  68. dispatch_source_set_cancel_handler dispatch_source_set_cancel_handler_f \
  69. dispatch_source_cancel dispatch_source_testcancel \
  70. dispatch_source_get_handle dispatch_source_get_mask \
  71. dispatch_source_get_data dispatch_source_merge_data \
  72. dispatch_source_set_timer; do
  73. ln -f dispatch_source_create.3 ${m}.3
  74. done
  75. ln -f dispatch_time.3 dispatch_walltime.3
  76. for m in dispatch_data_create_concat dispatch_data_create_subrange \
  77. dispatch_data_create_map dispatch_data_apply \
  78. dispatch_data_copy_region dispatch_data_get_size; do
  79. ln -f dispatch_data_create.3 ${m}.3
  80. done
  81. for m in dispatch_io_create_with_path dispatch_io_set_high_water \
  82. dispatch_io_set_low_water dispatch_io_set_interval \
  83. dispatch_io_close dispatch_io_barrier; do
  84. ln -f dispatch_io_create.3 ${m}.3
  85. done
  86. ln -f dispatch_io_read.3 dispatch_io_write.3
  87. ln -f dispatch_read.3 dispatch_write.3