header-vars.am 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. ## automake - create Makefile.in from Makefile.am
  2. ## Copyright (C) 1994-2017 Free Software Foundation, Inc.
  3. ## This program is free software; you can redistribute it and/or modify
  4. ## it under the terms of the GNU General Public License as published by
  5. ## the Free Software Foundation; either version 2, or (at your option)
  6. ## any later version.
  7. ## This program is distributed in the hope that it will be useful,
  8. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ## GNU General Public License for more details.
  11. ## You should have received a copy of the GNU General Public License
  12. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. VPATH = @srcdir@
  14. @SET_MAKE@
  15. ## We used to define this. However, we don't because vendor makes
  16. ## (e.g., Solaris, Irix) won't correctly propagate variables that are
  17. ## defined in Makefile. This particular variable can't be correctly
  18. ## defined by configure (at least, not the current configure), so we
  19. ## simply avoid defining it to allow the user to use this feature with
  20. ## a vendor make.
  21. ## DESTDIR =
  22. ## Shell code that determines whether we are running under GNU make.
  23. ##
  24. ## Why the this needs to be so convoluted?
  25. ##
  26. ## (1) We can't unconditionally use make functions or special variables
  27. ## starting with a dot, as those cause non-GNU implmentations to
  28. ## crash hard.
  29. ##
  30. ## (2) We can't use $(MAKE_VERSION) here, as it is also defined in some
  31. ## non-GNU make implementations (e.g., FreeBSD make). But at least
  32. ## BSD make does *not* define the $(CURDIR) variable -- it uses
  33. ## $(.CURDIR) instead.
  34. ##
  35. ## (3) We can't use $(MAKEFILE_LIST) here, as in some situations it
  36. ## might cause the shell to die with "Arg list too long" (see
  37. ## automake bug#18744).
  38. ##
  39. ## (4) We can't use $(MAKE_HOST) unconditionally, as it is only
  40. ## defined in GNU make 4.0 or later.
  41. ##
  42. am__is_gnu_make = { \
  43. if test -z '$(MAKELEVEL)'; then \
  44. false; \
  45. elif test -n '$(MAKE_HOST)'; then \
  46. true; \
  47. elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
  48. true; \
  49. else \
  50. false; \
  51. fi; \
  52. }
  53. ## Shell code that determines whether the current make instance is
  54. ## running with a given one-letter option (e.g., -k, -n) that takes
  55. ## no argument.
  56. am__make_running_with_option = \
  57. case $${target_option-} in \
  58. ?) ;; \
  59. *) echo "am__make_running_with_option: internal error: invalid" \
  60. "target option '$${target_option-}' specified" >&2; \
  61. exit 1;; \
  62. esac; \
  63. has_opt=no; \
  64. sane_makeflags=$$MAKEFLAGS; \
  65. if $(am__is_gnu_make); then \
  66. ## The format of $(MAKEFLAGS) is quite tricky with GNU make; the
  67. ## variable $(MFLAGS) behaves much better in that regard. So use it.
  68. sane_makeflags=$$MFLAGS; \
  69. else \
  70. ## Non-GNU make: we must rely on $(MAKEFLAGS). This is tricker and more
  71. ## brittle, but is the best we can do.
  72. case $$MAKEFLAGS in \
  73. ## If we run "make TESTS='snooze nap'", FreeBSD make will export MAKEFLAGS
  74. ## to " TESTS=foo\ nap", so that the simpler loop below (on word-split
  75. ## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
  76. ## misinterpret that as and indication that make is running in dry mode.
  77. ## This has already happened in practice. So we need this hack.
  78. *\\[\ \ ]*) \
  79. ## Extra indirection with ${bs} required by FreeBSD 8.x make.
  80. ## Not sure why (so sorry for the cargo-cult programming here).
  81. bs=\\; \
  82. sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
  83. | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
  84. esac; \
  85. fi; \
  86. skip_next=no; \
  87. strip_trailopt () \
  88. { \
  89. flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  90. }; \
  91. for flg in $$sane_makeflags; do \
  92. test $$skip_next = yes && { skip_next=no; continue; }; \
  93. case $$flg in \
  94. *=*|--*) continue;; \
  95. ##
  96. ## GNU make 4.0 has changed the format of $MFLAGS, and removed the space
  97. ## between an option and its argument (e.g., from "-I dir" to "-Idir").
  98. ## So we need to handle both formats, at least for options valid in GNU
  99. ## make. OTOH, BSD make formats $(MAKEFLAGS) by separating all options,
  100. ## and separating any option from its argument, so things are easier
  101. ## there.
  102. ##
  103. ## For GNU make and BSD make.
  104. -*I) strip_trailopt 'I'; skip_next=yes;; \
  105. -*I?*) strip_trailopt 'I';; \
  106. ## For GNU make >= 4.0.
  107. -*O) strip_trailopt 'O'; skip_next=yes;; \
  108. -*O?*) strip_trailopt 'O';; \
  109. ## For GNU make (possibly overkill, this one).
  110. -*l) strip_trailopt 'l'; skip_next=yes;; \
  111. -*l?*) strip_trailopt 'l';; \
  112. ## For BSD make.
  113. -[dEDm]) skip_next=yes;; \
  114. ## For NetBSD make.
  115. -[JT]) skip_next=yes;; \
  116. esac; \
  117. case $$flg in \
  118. *$$target_option*) has_opt=yes; break;; \
  119. esac; \
  120. done; \
  121. test $$has_opt = yes
  122. ## Shell code that determines whether make is running in "dry mode"
  123. ## ("make -n") or not. Useful in rules that invoke make recursively,
  124. ## and are thus executed also with "make -n" -- either because they
  125. ## are declared as dependencies to '.MAKE' (NetBSD make), or because
  126. ## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
  127. am__make_dryrun = (target_option=n; $(am__make_running_with_option))
  128. ## Shell code that determines whether make is running in "keep-going mode"
  129. ## ("make -k") or not. Useful in rules that must recursively descend into
  130. ## subdirectories, and decide whether to stop at the first error or not.
  131. am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
  132. ## Some derived variables that have been found to be useful.
  133. pkgdatadir = $(datadir)/@PACKAGE@
  134. pkgincludedir = $(includedir)/@PACKAGE@
  135. pkglibdir = $(libdir)/@PACKAGE@
  136. pkglibexecdir = $(libexecdir)/@PACKAGE@
  137. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
  138. install_sh_DATA = $(install_sh) -c -m 644
  139. install_sh_PROGRAM = $(install_sh) -c
  140. install_sh_SCRIPT = $(install_sh) -c
  141. INSTALL_HEADER = $(INSTALL_DATA)
  142. transform = $(program_transform_name)
  143. ## These are defined because otherwise make on NetBSD V1.1 will print
  144. ## (eg): $(NORMAL_INSTALL) expands to empty string.
  145. NORMAL_INSTALL = :
  146. PRE_INSTALL = :
  147. POST_INSTALL = :
  148. NORMAL_UNINSTALL = :
  149. PRE_UNINSTALL = :
  150. POST_UNINSTALL = :
  151. ## dejagnu.am uses these variables. Some users might rely on them too.
  152. ?BUILD?build_triplet = @build@
  153. ?HOST?host_triplet = @host@
  154. ?TARGET?target_triplet = @target@