Makefile.in 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. # Makefile template for Configure for the sim library.
  2. # Copyright (C) 1993-2015 Free Software Foundation, Inc.
  3. # Written by Cygnus Support.
  4. #
  5. # This file is part of BFD, the Binary File Descriptor library.
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. VPATH = @srcdir@
  20. srcdir = @srcdir@
  21. prefix = @prefix@
  22. exec_prefix = @exec_prefix@
  23. host_alias = @host_alias@
  24. target_alias = @target_alias@
  25. program_transform_name = @program_transform_name@
  26. bindir = @bindir@
  27. libdir = @libdir@
  28. tooldir = $(libdir)/$(target_alias)
  29. datarootdir = @datarootdir@
  30. datadir = @datadir@
  31. mandir = @mandir@
  32. man1dir = $(mandir)/man1
  33. man2dir = $(mandir)/man2
  34. man3dir = $(mandir)/man3
  35. man4dir = $(mandir)/man4
  36. man5dir = $(mandir)/man5
  37. man6dir = $(mandir)/man6
  38. man7dir = $(mandir)/man7
  39. man8dir = $(mandir)/man8
  40. man9dir = $(mandir)/man9
  41. infodir = @infodir@
  42. includedir = @includedir@
  43. SHELL = @SHELL@
  44. INSTALL = @INSTALL@
  45. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  46. INSTALL_DATA = @INSTALL_DATA@
  47. AR = @AR@
  48. AR_FLAGS = rc
  49. CC = @CC@
  50. CFLAGS = @CFLAGS@
  51. CC_FOR_BUILD = @CC_FOR_BUILD@
  52. CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
  53. MAKEINFO = makeinfo
  54. RANLIB = @RANLIB@
  55. SUBDIRS = @subdirs@
  56. INCDIR = $(srcdir)/../include
  57. CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
  58. DEP = mkdep
  59. #### Makefile fragments come in here.
  60. # @target_makefile_frag@
  61. ###
  62. # Name of the ChangeLog file.
  63. ChangeLog = ChangeLog
  64. RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
  65. echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
  66. fi`
  67. RUNTESTFLAGS=
  68. FLAGS_TO_PASS = \
  69. "prefix=$(prefix)" \
  70. "exec_prefix=$(exec_prefix)" \
  71. "bindir=$(bindir)" \
  72. "mandir=$(mandir)" \
  73. "libdir=$(libdir)" \
  74. "against=$(against)" \
  75. "AR=$(AR)" \
  76. "AR_FLAGS=$(AR_FLAGS)" \
  77. "CC=$(CC)" \
  78. "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
  79. "CFLAGS=$(CFLAGS)" \
  80. "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
  81. "RANLIB=$(RANLIB)" \
  82. "MAKEINFO=$(MAKEINFO)" \
  83. "INSTALL=$(INSTALL)" \
  84. "INSTALL_DATA=$(INSTALL_DATA)" \
  85. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  86. "RUNTEST=$(RUNTEST)" \
  87. "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  88. "SHELL=$(SHELL)"
  89. # The use of $$(x_FOR_TARGET) reduces the command line length by not
  90. # duplicating the lengthy definition.
  91. TARGET_FLAGS_TO_PASS = \
  92. "prefix=$(prefix)" \
  93. "exec_prefix=$(exec_prefix)" \
  94. "against=$(against)" \
  95. 'CC=$$(CC_FOR_TARGET)' \
  96. "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  97. "CFLAGS=$(CFLAGS)" \
  98. "CHILLFLAGS=$(CHILLFLAGS)" \
  99. 'CHILL=$$(CHILL_FOR_TARGET)' \
  100. "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
  101. "CHILL_LIB=$(CHILL_LIB)" \
  102. 'CXX=$$(CXX_FOR_TARGET)' \
  103. "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
  104. "CXXFLAGS=$(CXXFLAGS)" \
  105. "INSTALL=$(INSTALL)" \
  106. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  107. "INSTALL_DATA=$(INSTALL_DATA)" \
  108. "MAKEINFO=$(MAKEINFO)" \
  109. "RUNTEST=$(RUNTEST)" \
  110. "RUNTESTFLAGS=$(RUNTESTFLAGS)"
  111. all:
  112. @rootme=`pwd` ; export rootme ; \
  113. for dir in . `echo ${SUBDIRS} | sed 's/testsuite//'` ; do \
  114. if [ "$$dir" = "." ]; then \
  115. true; \
  116. elif [ -d $$dir ]; then \
  117. (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)) || exit 1; \
  118. else true; fi; \
  119. done
  120. clean mostlyclean:
  121. @rootme=`pwd` ; export rootme ; \
  122. for dir in . ${SUBDIRS}; do \
  123. if [ "$$dir" = "." ]; then \
  124. true; \
  125. elif [ -d $$dir ]; then \
  126. (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
  127. else true; fi; \
  128. done
  129. distclean maintainer-clean realclean:
  130. @rootme=`pwd` ; export rootme ; \
  131. for dir in . ${SUBDIRS}; do \
  132. if [ "$$dir" = "." ]; then \
  133. true; \
  134. elif [ -d $$dir ]; then \
  135. (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
  136. else true; fi; \
  137. done
  138. rm -f Makefile config.cache config.log config.status
  139. install:
  140. @rootme=`pwd` ; export rootme ; \
  141. for dir in . ${SUBDIRS}; do \
  142. if [ "$$dir" = "." ]; then \
  143. true; \
  144. elif [ -d $$dir ]; then \
  145. (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install) || exit 1; \
  146. else true; fi; \
  147. done
  148. installcheck:
  149. @echo No installcheck target is available yet for the GNU simulators.
  150. installcheck:
  151. # The check target can not use subdir_do, because subdir_do does not
  152. # use TARGET_FLAGS_TO_PASS.
  153. check: force
  154. @if [ -f testsuite/Makefile ]; then \
  155. rootme=`pwd`; export rootme; \
  156. rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  157. cd testsuite; \
  158. $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
  159. else true; fi
  160. info:
  161. install-info:
  162. dvi:
  163. pdf:
  164. install-pdf:
  165. html:
  166. install-html:
  167. ###
  168. ###
  169. .NOEXPORT:
  170. MAKEOVERRIDES=
  171. .PHONY: check installcheck
  172. check:
  173. installcheck:
  174. TAGS:
  175. force:
  176. Makefile: Makefile.in config.status
  177. $(SHELL) ./config.status
  178. config.status: configure
  179. $(SHELL) ./config.status --recheck
  180. # Utility to run autoconf in each directory that uses the common framework.
  181. # This is intended to be invoked in $srcdir as
  182. # "make -f Makefile.in autoconf-common SHELL=/bin/sh".
  183. .PHONY: autoconf-common autoheader-common
  184. autoconf-common autoheader-common:
  185. for d in * ; \
  186. do \
  187. if [ -d $$d -a -f $$d/configure.ac ] ; \
  188. then \
  189. echo "Running autoconf in $$d ..." ; \
  190. (cd $$d && autoconf --force) ; \
  191. if [ $@ = autoheader-common ] && [ -f $$d/config.in ] ; \
  192. then \
  193. echo "Running autoheader in $$d ..." ; \
  194. (cd $$d && autoheader --force) ; \
  195. fi ; \
  196. fi ; \
  197. done
  198. autoconf-changelog autoheader-changelog:
  199. id=$(ID) ; \
  200. test x$$id = x && id="`id | sed -e 's/^[^(]*(\([^)]*\).*$$/\1/'`" ; \
  201. name=$(NAME) ; \
  202. test x$$name = x && name=`grep "^$$id:" /etc/passwd | cut -f 5 -d ':'` ; \
  203. host=$(HOST) ; \
  204. test x$$host = x && host="`hostname`" ; \
  205. date=$(DATE) ; \
  206. test x$$date = x && date="`date +%Y-%m-%d`" ; \
  207. echo "$$date $$name $$id@$$host" ; \
  208. for d in * ; \
  209. do \
  210. if [ -d $$d -a -f $$d/configure.ac ] ; \
  211. then \
  212. echo "Creating new-$(ChangeLog) in $$d ..." ; \
  213. ( echo "$$date $$name <$$id@$$host>" ; \
  214. echo "" ; \
  215. echo " * configure: Regenerated to track ../common/aclocal.m4 changes." ; \
  216. if [ $@ = autoheader-changelog ] ; \
  217. then \
  218. echo " * config.in: Ditto." ; \
  219. fi ; \
  220. echo "" ; \
  221. cat $$d/$(ChangeLog) \
  222. ) > $$d/new-$(ChangeLog) ; \
  223. fi ; \
  224. done
  225. autoconf-install autoheader-install:
  226. for d in * ; \
  227. do \
  228. if [ -d $$d -a -f $$d/configure.ac ] ; \
  229. then \
  230. echo "Moving $$d/new-$(ChangeLog) to $$d/$(ChangeLog) ..." ; \
  231. mv $$d/new-$(ChangeLog) $$d/$(ChangeLog) ; \
  232. fi ; \
  233. done