Makefile.am 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Copyright (c) 2004 MontaVista Software, Inc.
  2. # Copyright (c) 2009 - 2018 Red Hat, Inc.
  3. #
  4. # Authors: Jan Friesse (jfriesse@redhat.com)
  5. # Steven Dake (sdake@redhat.com)
  6. # Fabio M. Di Nitto (fdinitto@redhat.com)
  7. #
  8. # All rights reserved.
  9. #
  10. # This software licensed under BSD license, the text of which follows:
  11. #
  12. # Redistribution and use in source and binary forms, with or without
  13. # modification, are permitted provided that the following conditions are met:
  14. #
  15. # - Redistributions of source code must retain the above copyright notice,
  16. # this list of conditions and the following disclaimer.
  17. # - Redistributions in binary form must reproduce the above copyright notice,
  18. # this list of conditions and the following disclaimer in the documentation
  19. # and/or other materials provided with the distribution.
  20. # - Neither the name of the Red Hat, Inc. nor the names of its
  21. # contributors may be used to endorse or promote products derived from this
  22. # software without specific prior written permission.
  23. #
  24. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  25. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  27. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  28. # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  29. # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  30. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  31. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  32. # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  33. # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  34. # THE POSSIBILITY OF SUCH DAMAGE.
  35. MAINTAINERCLEANFILES = Makefile.in
  36. qnetd_man = corosync-qnetd-tool.8 \
  37. corosync-qnetd-certutil.8 \
  38. corosync-qnetd.8
  39. qdevices_man = corosync-qdevice-tool.8 \
  40. corosync-qdevice-net-certutil.8 \
  41. corosync-qdevice.8
  42. EXTRA_DIST = $(qnetd_man) \
  43. $(qdevices_man)
  44. dist_man_MANS =
  45. if BUILD_QNETD
  46. dist_man_MANS += $(qnetd_man)
  47. endif
  48. if BUILD_QDEVICES
  49. dist_man_MANS += $(qdevices_man)
  50. endif
  51. HTML_DOCS = $(dist_man_MANS:%=%.html) $(man_MANS:%=%.html)
  52. # developer man page generation
  53. %.3: %.3.in $(autogen_common)
  54. @echo Generating $@ man page && \
  55. rm -f $@-t-t $@-t $@ && \
  56. date="$$(LC_ALL=C date "+%F" $${SOURCE_DATE_EPOCH+-d @$$SOURCE_DATE_EPOCH})" && \
  57. awk "{print}(\$$1 ~ /@COMMONIPCERRORS@/){exit 0}" ${top_srcdir}/man/$@.in > $@-t-t && \
  58. cat ${top_srcdir}/man/$(autogen_common) >> $@-t-t && \
  59. awk -v p=0 "(\$$1 ~ /@COMMONIPCERRORS@/){p = 1} {if(p==1)print}" ${top_srcdir}/man/$@.in >> $@-t-t && \
  60. cat $@-t-t | \
  61. sed -e 's#@BUILDDATE@#'$$date'#g' \
  62. -e 's#@COMMONIPCERRORS@##g' \
  63. > $@-t && \
  64. rm -f $@-t-t && \
  65. mv $@-t $@
  66. clean-local:
  67. rm -rf $(HTML_DOCS) $(autogen_man)
  68. if BUILD_HTML_DOCS
  69. %.html: %
  70. $(GROFF) -mandoc -Thtml $^ > $@
  71. install-data-local:
  72. $(INSTALL) -d $(DESTDIR)/${docdir}/html
  73. $(INSTALL) -m 644 $(HTML_DOCS) $(DESTDIR)/${docdir}/html/
  74. uninstall-local:
  75. cd $(DESTDIR)/${docdir}/html && rm -f $(HTML_DOCS)
  76. rmdir $(DESTDIR)/${docdir}/html 2> /dev/null || :
  77. all-local: $(HTML_DOCS)
  78. endif