Makefile.am 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. EXTRA_DIST = corosync-qdevice.sysconfig.example corosync-qdevice.in \
  37. corosync-qdevice.service.in \
  38. corosync-qnetd.sysconfig.example corosync-qnetd.in \
  39. corosync-qnetd.service.in \
  40. corosync-qnetd.sysusers.conf.example
  41. if INSTALL_SYSTEMD
  42. systemdconfdir = $(SYSTEMDDIR)
  43. systemdconf_DATA =
  44. else
  45. initscriptdir = $(INITDDIR)
  46. initscript_SCRIPTS =
  47. endif
  48. if BUILD_QDEVICES
  49. if INSTALL_SYSTEMD
  50. systemdconf_DATA += corosync-qdevice.service
  51. else
  52. initscript_SCRIPTS += corosync-qdevice
  53. endif
  54. endif
  55. if BUILD_QNETD
  56. if INSTALL_SYSTEMD
  57. systemdconf_DATA += corosync-qnetd.service
  58. else
  59. initscript_SCRIPTS += corosync-qnetd
  60. endif
  61. endif
  62. if BUILD_INSTALL_QNETD_IN_SBIN
  63. qnetddir=$(sbindir)
  64. else
  65. qnetddir=$(bindir)
  66. endif
  67. %: %.in Makefile
  68. rm -f $@-t $@
  69. cat $< | sed \
  70. -e 's#@''SBINDIR@#$(sbindir)#g' \
  71. -e 's#@''BINDIR@#$(bindir)#g' \
  72. -e 's#@''SYSCONFDIR@#$(sysconfdir)#g' \
  73. -e 's#@''INITCONFIGDIR@#$(INITCONFIGDIR)#g' \
  74. -e 's#@''INITDDIR@#$(INITDDIR)#g' \
  75. -e 's#@''LOCALSTATEDIR@#$(localstatedir)#g' \
  76. -e 's#@''BASHPATH@#${BASHPATH}#g' \
  77. -e 's#@''QNETDDIR@#$(qnetddir)#g' \
  78. > $@-t
  79. mv $@-t $@
  80. all-local: $(initscript_SCRIPTS) $(systemdconf_DATA)
  81. clean-local:
  82. rm -rf $(initscript_SCRIPTS) $(systemdconf_DATA)