Makefile.am 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. # Copyright (c) 2004 MontaVista Software, Inc.
  2. # Copyright (c) 2009, 2012, 2014 Red Hat, Inc.
  3. #
  4. # Authors: Steven Dake (sdake@redhat.com)
  5. # Fabio M. Di Nitto (fdinitto@redhat.com)
  6. #
  7. # All rights reserved.
  8. #
  9. # This software licensed under BSD license, the text of which follows:
  10. #
  11. # Redistribution and use in source and binary forms, with or without
  12. # modification, are permitted provided that the following conditions are met:
  13. #
  14. # - Redistributions of source code must retain the above copyright notice,
  15. # this list of conditions and the following disclaimer.
  16. # - Redistributions in binary form must reproduce the above copyright notice,
  17. # this list of conditions and the following disclaimer in the documentation
  18. # and/or other materials provided with the distribution.
  19. # - Neither the name of the MontaVista Software, Inc. nor the names of its
  20. # contributors may be used to endorse or promote products derived from this
  21. # software without specific prior written permission.
  22. #
  23. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  24. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  25. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  26. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  27. # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  28. # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  29. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  30. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  31. # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  32. # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  33. # THE POSSIBILITY OF SUCH DAMAGE.
  34. MAINTAINERCLEANFILES = Makefile.in
  35. xml_man = corosync-xmlproc.8 \
  36. corosync.xml.5
  37. corosync_vqsim_man = corosync-vqsim.8
  38. INDEX_HTML = index.html
  39. autogen_man = cpg_context_get.3 \
  40. cpg_context_set.3 \
  41. cpg_dispatch.3 \
  42. cpg_fd_get.3 \
  43. cpg_finalize.3 \
  44. cpg_initialize.3 \
  45. cpg_join.3 \
  46. cpg_leave.3 \
  47. cpg_local_get.3 \
  48. cpg_mcast_joined.3 \
  49. cpg_model_initialize.3 \
  50. cpg_zcb_mcast_joined.3 \
  51. cpg_zcb_alloc.3 \
  52. cpg_zcb_free.3 \
  53. cpg_membership_get.3 \
  54. cpg_iteration_finalize.3 \
  55. cpg_iteration_initialize.3 \
  56. cpg_iteration_next.3 \
  57. quorum_initialize.3 \
  58. quorum_model_initialize.3 \
  59. quorum_finalize.3 \
  60. quorum_fd_get.3 \
  61. quorum_dispatch.3 \
  62. quorum_context_get.3 \
  63. quorum_context_set.3 \
  64. quorum_getquorate.3 \
  65. quorum_trackstart.3 \
  66. quorum_trackstop.3 \
  67. votequorum_dispatch.3 \
  68. votequorum_fd_get.3 \
  69. votequorum_context_get.3 \
  70. votequorum_context_set.3 \
  71. votequorum_finalize.3 \
  72. votequorum_getinfo.3 \
  73. votequorum_initialize.3 \
  74. votequorum_setexpected.3 \
  75. votequorum_setvotes.3 \
  76. votequorum_trackstart.3 \
  77. votequorum_trackstop.3 \
  78. votequorum_qdevice_register.3 \
  79. votequorum_qdevice_unregister.3 \
  80. votequorum_qdevice_update.3 \
  81. votequorum_qdevice_master_wins.3 \
  82. votequorum_qdevice_poll.3 \
  83. sam_data_getsize.3 \
  84. sam_data_restore.3 \
  85. sam_data_store.3 \
  86. sam_finalize.3 \
  87. sam_hc_callback_register.3 \
  88. sam_hc_send.3 \
  89. sam_initialize.3 \
  90. sam_mark_failed.3 \
  91. sam_register.3 \
  92. sam_start.3 \
  93. sam_stop.3 \
  94. sam_warn_signal_set.3 \
  95. cmap_context_get.3 \
  96. cmap_dec.3 \
  97. cmap_iter_init.3 \
  98. cmap_get.3 \
  99. cmap_inc.3 \
  100. cmap_set.3 \
  101. cmap_iter_next.3 \
  102. cmap_delete.3 \
  103. cmap_iter_finalize.3 \
  104. cmap_finalize.3 \
  105. cmap_dispatch.3 \
  106. cmap_initialize.3 \
  107. cmap_initialize_map.3 \
  108. cmap_track_add.3 \
  109. cmap_context_set.3 \
  110. cmap_fd_get.3 \
  111. cmap_track_delete.3
  112. autogen_common = ipc_common.sh.errors
  113. EXTRA_DIST = $(INDEX_HTML) \
  114. $(xml_man) \
  115. $(corosync_vqsim_man) \
  116. $(autogen_man:%=%.in) \
  117. $(autogen_common)
  118. man_MANS = $(autogen_man)
  119. dist_man_MANS = corosync.conf.5 \
  120. votequorum.5 \
  121. corosync.8 \
  122. corosync-cmapctl.8 \
  123. corosync-blackbox.8 \
  124. corosync-keygen.8 \
  125. corosync-cfgtool.8 \
  126. corosync-cpgtool.8 \
  127. corosync-notifyd.8 \
  128. corosync-quorumtool.8 \
  129. corosync_overview.7 \
  130. cpg_overview.3 \
  131. quorum_overview.3 \
  132. votequorum_overview.3 \
  133. sam_overview.3 \
  134. cmap_overview.3 \
  135. cmap_keys.7
  136. if BUILD_VQSIM
  137. dist_man_MANS += $(corosync_vqsim_man)
  138. endif
  139. if INSTALL_XMLCONF
  140. dist_man_MANS += $(xml_man)
  141. endif
  142. HTML_DOCS = $(dist_man_MANS:%=%.html) $(man_MANS:%=%.html)
  143. # developer man page generation
  144. %.3: %.3.in $(autogen_common)
  145. @echo Generating $@ man page && \
  146. rm -f $@-t-t $@-t $@ && \
  147. DATE_FMT="%Y-%m-%d" && \
  148. SOURCE_DATE_EPOCH="$${SOURCE_DATE_EPOCH:-$$(date +%s)}" && \
  149. date="$$(date -u -d "@$$SOURCE_DATE_EPOCH" "+$$DATE_FMT" 2>/dev/null || date -u -r "$$SOURCE_DATE_EPOCH" "+$$DATE_FMT" 2>/dev/null || date -u "+$$DATE_FMT")" && \
  150. $(AWK) "{print}(\$$1 ~ /@COMMONIPCERRORS@/){exit 0}" ${top_srcdir}/man/$@.in > $@-t-t && \
  151. cat ${top_srcdir}/man/$(autogen_common) >> $@-t-t && \
  152. $(AWK) -v p=0 "(\$$1 ~ /@COMMONIPCERRORS@/){p = 1} {if(p==1)print}" ${top_srcdir}/man/$@.in >> $@-t-t && \
  153. cat $@-t-t | \
  154. $(SED) -e 's#@BUILDDATE@#'$$date'#g' \
  155. -e 's#@COMMONIPCERRORS@##g' \
  156. > $@-t && \
  157. rm -f $@-t-t && \
  158. mv $@-t $@
  159. clean-local:
  160. rm -rf $(HTML_DOCS) $(autogen_man)
  161. if BUILD_HTML_DOCS
  162. %.html: %
  163. $(GROFF) -mandoc -Thtml $^ > $@
  164. install-data-local:
  165. $(INSTALL) -d $(DESTDIR)/${docdir}/html
  166. $(INSTALL) -m 644 ${srcdir}/$(INDEX_HTML) $(HTML_DOCS) $(DESTDIR)/${docdir}/html/
  167. uninstall-local:
  168. cd $(DESTDIR)/${docdir}/html && rm -f $(INDEX_HTML) $(HTML_DOCS)
  169. rmdir $(DESTDIR)/${docdir}/html 2> /dev/null || :
  170. all-local: $(HTML_DOCS)
  171. endif