Makefile.am 3.0 KB

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