Makefile.in 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827
  1. # Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
  2. #
  3. # Makefile for directory with subdirs to build.
  4. # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  5. # 1999, 2000, 2001, 2002 Free Software Foundation
  6. #
  7. # This file 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 2 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, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20. #
  21. # Tell GNU make 3.79 not to run the top level in parallel. This
  22. # prevents contention for $builddir/$target/config.cache, as well
  23. # as minimizing scatter in file system caches.
  24. NOTPARALLEL = .NOTPARALLEL
  25. $(NOTPARALLEL):
  26. srcdir = @srcdir@
  27. prefix = @prefix@
  28. exec_prefix = @exec_prefix@
  29. bindir = @bindir@
  30. sbindir = @sbindir@
  31. libexecdir = @libexecdir@
  32. datadir = @datadir@
  33. sysconfdir = @sysconfdir@
  34. sharedstatedir = @sharedstatedir@
  35. localstatedir = @localstatedir@
  36. libdir = @libdir@
  37. includedir = @includedir@
  38. oldincludedir = @oldincludedir@
  39. infodir = @infodir@
  40. mandir = @mandir@
  41. gxx_include_dir=@gxx_include_dir@
  42. tooldir = @tooldir@
  43. build_tooldir = @build_tooldir@
  44. program_transform_name = @program_transform_name@
  45. man1dir = $(mandir)/man1
  46. man2dir = $(mandir)/man2
  47. man3dir = $(mandir)/man3
  48. man4dir = $(mandir)/man4
  49. man5dir = $(mandir)/man5
  50. man6dir = $(mandir)/man6
  51. man7dir = $(mandir)/man7
  52. man8dir = $(mandir)/man8
  53. man9dir = $(mandir)/man9
  54. # Directory in which the compiler finds executables, libraries, etc.
  55. libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
  56. GDB_NLM_DEPS =
  57. SHELL = @config_shell@
  58. # pwd command to use. Allow user to override default by setting PWDCMD in
  59. # the environment to account for automounters. The make variable must not
  60. # be called PWDCMD, otherwise the value set here is passed to make
  61. # subprocesses and overrides the setting from the user's environment.
  62. # Don't use PWD since it is a common shell environment variable and we
  63. # don't want to corrupt it.
  64. PWD_COMMAND = $${PWDCMD-pwd}
  65. # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
  66. # cygwin host.
  67. INSTALL_PROGRAM_ARGS =
  68. INSTALL = $(SHELL) $$s/install-sh -c
  69. INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
  70. INSTALL_SCRIPT = $(INSTALL)
  71. INSTALL_DATA = $(INSTALL) -m 644
  72. INSTALL_DOSREL = install-dosrel-fake
  73. AS = as
  74. AR = ar
  75. AR_FLAGS = rc
  76. CC = cc
  77. # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
  78. # here so that they can be overridden by Makefile fragments.
  79. HOST_CC = $(CC_FOR_BUILD)
  80. BUILD_PREFIX =
  81. BUILD_PREFIX_1 = loser-
  82. # These flag values are normally overridden by the configure script.
  83. CFLAGS = -g
  84. CXXFLAGS = -g -O2
  85. LDFLAGS =
  86. LIBCFLAGS = $(CFLAGS)
  87. CFLAGS_FOR_BUILD = $(CFLAGS)
  88. # During gcc bootstrap, if we use some random cc for stage1 then
  89. # CFLAGS will be just -g. We want to ensure that TARGET libraries
  90. # (which we know are built with gcc) are built with optimizations so
  91. # prepend -O2 when setting CFLAGS_FOR_TARGET.
  92. CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
  93. LDFLAGS_FOR_TARGET =
  94. LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
  95. PICFLAG =
  96. PICFLAG_FOR_TARGET =
  97. CXX = c++
  98. # Use -O2 to stress test the compiler.
  99. LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
  100. CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
  101. LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
  102. DLLTOOL = dlltool
  103. WINDRES = windres
  104. NM = nm
  105. LD = ld
  106. # These values are substituted by configure.
  107. DEFAULT_YACC = @DEFAULT_YACC@
  108. DEFAULT_LEX = @DEFAULT_LEX@
  109. DEFAULT_M4 = @DEFAULT_M4@
  110. BISON = `if [ -f $$r/bison/bison ] ; then \
  111. echo $$r/bison/bison -L $$s/bison/ ; \
  112. else \
  113. echo bison ; \
  114. fi`
  115. YACC = `if [ -f $$r/bison/bison ] ; then \
  116. echo $$r/bison/bison -y -L $$s/bison/ ; \
  117. elif [ -f $$r/byacc/byacc ] ; then \
  118. echo $$r/byacc/byacc ; \
  119. else \
  120. echo ${DEFAULT_YACC} ; \
  121. fi`
  122. LEX = `if [ -f $$r/flex/flex ] ; \
  123. then echo $$r/flex/flex ; \
  124. else echo ${DEFAULT_LEX} ; fi`
  125. M4 = `if [ -f $$r/m4/m4 ] ; \
  126. then echo $$r/m4/m4 ; \
  127. else echo ${DEFAULT_M4} ; fi`
  128. # For an installed makeinfo, we require it to be from texinfo 4.2 or
  129. # higher, else we use the "missing" dummy.
  130. MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
  131. then echo $$r/texinfo/makeinfo/makeinfo ; \
  132. else if (makeinfo --version \
  133. | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
  134. then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
  135. # This just becomes part of the MAKEINFO definition passed down to
  136. # sub-makes. It lets flags be given on the command line while still
  137. # using the makeinfo from the object tree.
  138. # (Default to avoid splitting info files.)
  139. MAKEINFOFLAGS = --no-split
  140. EXPECT = `if [ -f $$r/expect/expect ] ; \
  141. then echo $$r/expect/expect ; \
  142. else echo expect ; fi`
  143. RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
  144. then echo $$s/dejagnu/runtest ; \
  145. else echo runtest ; fi`
  146. # compilers to use to create programs which must be run in the build
  147. # environment.
  148. CC_FOR_BUILD = $(CC)
  149. CXX_FOR_BUILD = $(CXX)
  150. SUBDIRS = @configdirs@
  151. # This is set by the configure script to the list of directories which
  152. # should be built using the target tools.
  153. TARGET_CONFIGDIRS = @target_configdirs@
  154. # Target libraries are put under this directory:
  155. # Changed by configure to $(target_alias) if cross.
  156. TARGET_SUBDIR = @target_subdir@
  157. BUILD_CONFIGDIRS = libiberty
  158. BUILD_SUBDIR = @build_subdir@
  159. # This is set by the configure script to the arguments to use when configuring
  160. # directories built for the target.
  161. TARGET_CONFIGARGS = @target_configargs@
  162. # This is set by the configure script to the arguments to use when configuring
  163. # directories built for the build system.
  164. BUILD_CONFIGARGS = @build_configargs@
  165. # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
  166. # was used.
  167. SET_LIB_PATH = @SET_LIB_PATH@
  168. # This is the name of the environment variable used for the path to
  169. # the libraries. This may be changed by configure.in.
  170. RPATH_ENVVAR = @RPATH_ENVVAR@
  171. # This is the list of directories that may be needed in RPATH_ENVVAR
  172. # so that programs built for the host machine work.
  173. HOST_LIB_PATH = $$r/bfd:$$r/opcodes
  174. # This is the list of directories that may be needed in RPATH_ENVVAR
  175. # so that prorgams built for the target machine work.
  176. TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
  177. # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
  178. # Some platforms don't like blank entries, so we remove duplicate,
  179. # leading and trailing colons.
  180. REALLY_SET_LIB_PATH = \
  181. $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
  182. ALL = all.normal
  183. INSTALL_TARGET = installdirs \
  184. install-gcc \
  185. $(INSTALL_MODULES) \
  186. $(INSTALL_TARGET_MODULES) \
  187. $(INSTALL_X11_MODULES) \
  188. $(INSTALL_DOSREL)
  189. INSTALL_TARGET_CROSS = installdirs \
  190. install-gcc-cross \
  191. $(INSTALL_MODULES) \
  192. $(INSTALL_TARGET_MODULES) \
  193. $(INSTALL_X11_MODULES) \
  194. $(INSTALL_DOSREL)
  195. # Should be substed by configure.in
  196. FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
  197. CC_FOR_TARGET = @CC_FOR_TARGET@
  198. CXX_FOR_TARGET = @CXX_FOR_TARGET@
  199. CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
  200. GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
  201. # If GCC_FOR_TARGET is not overriden on the command line, then this
  202. # variable is passed down to the gcc Makefile, where it is used to
  203. # build libgcc2.a. We define it here so that it can itself be
  204. # overridden on the command line.
  205. GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
  206. AS_FOR_TARGET = ` \
  207. if [ -f $$r/gas/as-new ] ; then \
  208. echo $$r/gas/as-new ; \
  209. elif [ -f $$r/gcc/xgcc ]; then \
  210. $(CC_FOR_TARGET) -print-prog-name=as ; \
  211. else \
  212. if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
  213. echo $(AS); \
  214. else \
  215. t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
  216. fi; \
  217. fi`
  218. LD_FOR_TARGET = ` \
  219. if [ -f $$r/ld/ld-new ] ; then \
  220. echo $$r/ld/ld-new ; \
  221. elif [ -f $$r/gcc/xgcc ]; then \
  222. $(CC_FOR_TARGET) -print-prog-name=ld ; \
  223. else \
  224. if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
  225. echo $(LD); \
  226. else \
  227. t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
  228. fi; \
  229. fi`
  230. DLLTOOL_FOR_TARGET = ` \
  231. if [ -f $$r/binutils/dlltool ] ; then \
  232. echo $$r/binutils/dlltool ; \
  233. else \
  234. if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
  235. echo $(DLLTOOL); \
  236. else \
  237. t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
  238. fi; \
  239. fi`
  240. WINDRES_FOR_TARGET = ` \
  241. if [ -f $$r/binutils/windres ] ; then \
  242. echo $$r/binutils/windres ; \
  243. else \
  244. if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
  245. echo $(WINDRES); \
  246. else \
  247. t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
  248. fi; \
  249. fi`
  250. AR_FOR_TARGET = ` \
  251. if [ -f $$r/binutils/ar ] ; then \
  252. echo $$r/binutils/ar ; \
  253. else \
  254. if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
  255. echo $(AR); \
  256. else \
  257. t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
  258. fi; \
  259. fi`
  260. RANLIB_FOR_TARGET = ` \
  261. if [ -f $$r/binutils/ranlib ] ; then \
  262. echo $$r/binutils/ranlib ; \
  263. else \
  264. if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
  265. if [ x'$(RANLIB)' != x ]; then \
  266. echo $(RANLIB); \
  267. else \
  268. echo ranlib; \
  269. fi; \
  270. else \
  271. t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
  272. fi; \
  273. fi`
  274. NM_FOR_TARGET = ` \
  275. if [ -f $$r/binutils/nm-new ] ; then \
  276. echo $$r/binutils/nm-new ; \
  277. elif [ -f $$r/gcc/xgcc ]; then \
  278. $(CC_FOR_TARGET) -print-prog-name=nm ; \
  279. else \
  280. if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
  281. echo $(NM); \
  282. else \
  283. t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
  284. fi; \
  285. fi`
  286. # The first rule in the file had better be this one. Don't put any above it.
  287. # This lives here to allow makefile fragments to contain dependencies.
  288. all: all.normal
  289. .PHONY: all
  290. # These can be overridden by config/mt-*.
  291. # The _TARGET_ is because they're specified in mt-foo.
  292. # The _HOST_ is because they're programs that run on the host.
  293. EXTRA_TARGET_HOST_ALL_MODULES =
  294. EXTRA_TARGET_HOST_INSTALL_MODULES =
  295. EXTRA_TARGET_HOST_CHECK_MODULES =
  296. #### host and target specific makefile fragments come in here.
  297. ###
  298. # Flags to pass down to all sub-makes.
  299. # Please keep these in alphabetical order.
  300. BASE_FLAGS_TO_PASS = \
  301. "AR_FLAGS=$(AR_FLAGS)" \
  302. "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
  303. "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
  304. "BISON=$(BISON)" \
  305. "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
  306. "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  307. "CFLAGS=$(CFLAGS)" \
  308. "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
  309. "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
  310. "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
  311. "CXXFLAGS=$(CXXFLAGS)" \
  312. "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
  313. "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
  314. "DESTDIR=$(DESTDIR)" \
  315. "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
  316. "INSTALL=$(INSTALL)" \
  317. "INSTALL_DATA=$(INSTALL_DATA)" \
  318. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  319. "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
  320. "LDFLAGS=$(LDFLAGS)" \
  321. "LEX=$(LEX)" \
  322. "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
  323. "LIBCFLAGS=$(LIBCFLAGS)" \
  324. "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
  325. "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
  326. "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
  327. "M4=$(M4)" \
  328. "MAKE=$(MAKE)" \
  329. "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
  330. "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
  331. "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
  332. "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
  333. "SHELL=$(SHELL)" \
  334. "EXPECT=$(EXPECT)" \
  335. "RUNTEST=$(RUNTEST)" \
  336. "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  337. "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
  338. "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
  339. "YACC=$(YACC)" \
  340. "bindir=$(bindir)" \
  341. "datadir=$(datadir)" \
  342. "exec_prefix=$(exec_prefix)" \
  343. "includedir=$(includedir)" \
  344. "infodir=$(infodir)" \
  345. "libdir=$(libdir)" \
  346. "libexecdir=$(libexecdir)" \
  347. "lispdir=$(lispdir)" \
  348. "libstdcxx_incdir=$(libstdcxx_incdir)" \
  349. "libsubdir=$(libsubdir)" \
  350. "localstatedir=$(localstatedir)" \
  351. "mandir=$(mandir)" \
  352. "oldincludedir=$(oldincludedir)" \
  353. "prefix=$(prefix)" \
  354. "sbindir=$(sbindir)" \
  355. "sharedstatedir=$(sharedstatedir)" \
  356. "sysconfdir=$(sysconfdir)" \
  357. "tooldir=$(tooldir)" \
  358. "build_tooldir=$(build_tooldir)" \
  359. "gxx_include_dir=$(gxx_include_dir)" \
  360. "gcc_version=$(gcc_version)" \
  361. "gcc_version_trigger=$(gcc_version_trigger)" \
  362. "target_alias=$(target_alias)"
  363. # For any flags above that may contain shell code that varies from one
  364. # target library to another. When doing recursive invocations of the
  365. # top-level Makefile, we don't want the outer make to evaluate them,
  366. # so we pass these variables down unchanged. They must not contain
  367. # single nor double quotes.
  368. RECURSE_FLAGS = \
  369. CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
  370. # Flags to pass down to most sub-makes, in which we're building with
  371. # the host environment.
  372. # If any variables are added here, they must be added to do-*, below.
  373. EXTRA_HOST_FLAGS = \
  374. 'AR=$(AR)' \
  375. 'AS=$(AS)' \
  376. 'CC=$(CC)' \
  377. 'CXX=$(CXX)' \
  378. 'DLLTOOL=$(DLLTOOL)' \
  379. 'LD=$(LD)' \
  380. 'NM=$(NM)' \
  381. "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
  382. 'WINDRES=$(WINDRES)'
  383. FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
  384. # Flags that are concerned with the location of the X11 include files
  385. # and library files
  386. #
  387. # NOTE: until the top-level is getting the values via autoconf, it only
  388. # causes problems to have this top-level Makefile overriding the autoconf-set
  389. # values in child directories. Only variables that don't conflict with
  390. # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
  391. #
  392. X11_FLAGS_TO_PASS = \
  393. 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
  394. 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
  395. # Flags to pass down to makes which are built with the target environment.
  396. # The double $ decreases the length of the command line; the variables
  397. # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
  398. # If any variables are added here, they must be added to do-*, below.
  399. EXTRA_TARGET_FLAGS = \
  400. 'AR=$$(AR_FOR_TARGET)' \
  401. 'AS=$$(AS_FOR_TARGET)' \
  402. 'CC=$$(CC_FOR_TARGET)' \
  403. 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
  404. 'CXX=$$(CXX_FOR_TARGET)' \
  405. 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
  406. 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
  407. 'LD=$$(LD_FOR_TARGET)' \
  408. 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
  409. 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
  410. 'NM=$$(NM_FOR_TARGET)' \
  411. 'RANLIB=$$(RANLIB_FOR_TARGET)' \
  412. 'WINDRES=$$(WINDRES_FOR_TARGET)'
  413. TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
  414. # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
  415. # unfortunately needs the native compiler and the target ar and
  416. # ranlib.
  417. # If any variables are added here, they must be added to do-*, below.
  418. # The HOST_* variables are a special case, which are used for the gcc
  419. # cross-building scheme.
  420. EXTRA_GCC_FLAGS = \
  421. 'AR=$(AR)' \
  422. 'AS=$(AS)' \
  423. 'CC=$(CC)' \
  424. 'CXX=$(CXX)' \
  425. 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
  426. 'HOST_CC=$(CC_FOR_BUILD)' \
  427. 'BUILD_PREFIX=$(BUILD_PREFIX)' \
  428. 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
  429. 'NM=$(NM)' \
  430. "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
  431. 'WINDRES=$$(WINDRES_FOR_TARGET)' \
  432. "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
  433. "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
  434. "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
  435. "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
  436. "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
  437. "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
  438. "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
  439. "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
  440. "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
  441. "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
  442. "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
  443. GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
  444. # This is a list of the targets for all of the modules which are compiled
  445. # using the build machine's native compiler. Configure edits the second
  446. # macro for build!=host builds.
  447. ALL_BUILD_MODULES_LIST = \
  448. all-build-libiberty
  449. ALL_BUILD_MODULES = @all_build_modules@
  450. # This is a list of the configure targets for all of the modules which
  451. # are compiled using the native tools.
  452. CONFIGURE_BUILD_MODULES = \
  453. configure-build-libiberty
  454. # This is a list of the targets for all of the modules which are compiled
  455. # using $(FLAGS_TO_PASS).
  456. ALL_MODULES = \
  457. all-ash \
  458. all-autoconf \
  459. all-automake \
  460. all-bash \
  461. all-bfd \
  462. all-opcodes \
  463. all-binutils \
  464. all-bison \
  465. all-byacc \
  466. all-bzip2 \
  467. all-db \
  468. all-dejagnu \
  469. all-diff \
  470. all-dosutils \
  471. all-etc \
  472. all-fastjar \
  473. all-fileutils \
  474. all-findutils \
  475. all-find \
  476. all-flex \
  477. all-gas \
  478. all-gawk \
  479. all-gettext \
  480. all-gnuserv \
  481. all-gprof \
  482. all-grep \
  483. all-gzip \
  484. all-hello \
  485. all-indent \
  486. all-intl \
  487. all-tcl \
  488. all-itcl \
  489. all-ld \
  490. all-libgui \
  491. all-libiberty \
  492. all-libtool \
  493. all-m4 \
  494. all-make \
  495. all-mmalloc \
  496. all-patch \
  497. all-perl \
  498. all-prms \
  499. all-rcs \
  500. all-readline \
  501. all-release \
  502. all-recode \
  503. all-sed \
  504. all-send-pr \
  505. all-shellutils \
  506. all-sid \
  507. all-sim \
  508. all-snavigator \
  509. all-tar \
  510. all-texinfo \
  511. all-textutils \
  512. all-time \
  513. all-uudecode \
  514. all-wdiff \
  515. all-zip \
  516. all-zlib \
  517. $(EXTRA_TARGET_HOST_ALL_MODULES)
  518. # This is a list of the check targets for all of the modules which are
  519. # compiled using $(FLAGS_TO_PASS).
  520. #
  521. # The list is in two parts. The first lists those tools which
  522. # are tested as part of the host's native tool-chain, and not
  523. # tested in a cross configuration.
  524. NATIVE_CHECK_MODULES = \
  525. check-bison \
  526. check-byacc \
  527. check-fastjar \
  528. check-flex \
  529. check-zip
  530. CROSS_CHECK_MODULES = \
  531. check-ash \
  532. check-autoconf \
  533. check-automake \
  534. check-bash \
  535. check-bfd \
  536. check-opcodes \
  537. check-binutils \
  538. check-bzip2 \
  539. check-db \
  540. check-dejagnu \
  541. check-diff \
  542. check-etc \
  543. check-fileutils \
  544. check-findutils \
  545. check-find \
  546. check-gas \
  547. check-gawk \
  548. check-gettext \
  549. check-gnuserv \
  550. check-gprof \
  551. check-grep \
  552. check-gzip \
  553. check-hello \
  554. check-indent \
  555. check-intl \
  556. check-tcl \
  557. check-itcl \
  558. check-ld \
  559. check-libgui \
  560. check-libiberty \
  561. check-libtool \
  562. check-m4 \
  563. check-make \
  564. check-patch \
  565. check-perl \
  566. check-prms \
  567. check-rcs \
  568. check-readline \
  569. check-recode \
  570. check-sed \
  571. check-send-pr \
  572. check-shellutils \
  573. check-sid \
  574. check-sim \
  575. check-snavigator \
  576. check-tar \
  577. check-texinfo \
  578. check-textutils \
  579. check-time \
  580. check-uudecode \
  581. check-wdiff \
  582. $(EXTRA_TARGET_HOST_CHECK_MODULES)
  583. CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
  584. # This is a list of the install targets for all of the modules which are
  585. # compiled using $(FLAGS_TO_PASS).
  586. INSTALL_MODULES = \
  587. install-ash \
  588. install-autoconf \
  589. install-automake \
  590. install-bash \
  591. install-bfd \
  592. install-opcodes \
  593. install-binutils \
  594. install-bison \
  595. install-byacc \
  596. install-bzip2 \
  597. install-db \
  598. install-dejagnu \
  599. install-diff \
  600. install-dosutils \
  601. install-etc \
  602. install-fastjar \
  603. install-fileutils \
  604. install-findutils \
  605. install-find \
  606. install-flex \
  607. install-gas \
  608. install-gawk \
  609. install-gettext \
  610. install-gnuserv \
  611. install-gprof \
  612. install-grep \
  613. install-gzip \
  614. install-hello \
  615. install-indent \
  616. install-intl \
  617. install-tcl \
  618. install-itcl \
  619. install-ld \
  620. install-libgui \
  621. install-libiberty \
  622. install-libtool \
  623. install-m4 \
  624. install-make \
  625. install-mmalloc \
  626. install-patch \
  627. install-perl \
  628. install-prms \
  629. install-rcs \
  630. install-readline \
  631. install-recode \
  632. install-sed \
  633. install-send-pr \
  634. install-shellutils \
  635. install-sid \
  636. install-sim \
  637. install-snavigator \
  638. install-tar \
  639. install-textutils \
  640. install-time \
  641. install-uudecode \
  642. install-wdiff \
  643. install-zip \
  644. $(EXTRA_TARGET_HOST_INSTALL_MODULES)
  645. # This is a list of the targets for all of the modules which are compiled
  646. # using $(X11_FLAGS_TO_PASS).
  647. ALL_X11_MODULES = \
  648. all-gdb \
  649. all-expect \
  650. all-guile \
  651. all-tclX \
  652. all-tk \
  653. all-tix
  654. # This is a list of the check targets for all of the modules which are
  655. # compiled using $(X11_FLAGS_TO_PASS).
  656. CHECK_X11_MODULES = \
  657. check-gdb \
  658. check-guile \
  659. check-expect \
  660. check-tclX \
  661. check-tk \
  662. check-tix
  663. # This is a list of the install targets for all the modules which are
  664. # compiled using $(X11_FLAGS_TO_PASS).
  665. INSTALL_X11_MODULES = \
  666. install-gdb \
  667. install-guile \
  668. install-expect \
  669. install-tclX \
  670. install-tk \
  671. install-tix
  672. # This is a list of the targets for all of the modules which are compiled
  673. # using $(TARGET_FLAGS_TO_PASS).
  674. ALL_TARGET_MODULES = \
  675. all-target-libstdc++-v3 \
  676. all-target-newlib \
  677. all-target-libf2c \
  678. all-target-libobjc \
  679. all-target-libtermcap \
  680. all-target-winsup \
  681. all-target-libgloss \
  682. all-target-libiberty \
  683. all-target-gperf \
  684. all-target-examples \
  685. all-target-libffi \
  686. all-target-libjava \
  687. all-target-zlib \
  688. all-target-boehm-gc \
  689. all-target-qthreads \
  690. all-target-rda
  691. # This is a list of the configure targets for all of the modules which
  692. # are compiled using the target tools.
  693. CONFIGURE_TARGET_MODULES = \
  694. configure-target-libstdc++-v3 \
  695. configure-target-newlib \
  696. configure-target-libf2c \
  697. configure-target-libobjc \
  698. configure-target-libtermcap \
  699. configure-target-winsup \
  700. configure-target-libgloss \
  701. configure-target-libiberty \
  702. configure-target-gperf \
  703. configure-target-examples \
  704. configure-target-libffi \
  705. configure-target-libjava \
  706. configure-target-zlib \
  707. configure-target-boehm-gc \
  708. configure-target-qthreads \
  709. configure-target-rda
  710. # This is a list of the check targets for all of the modules which are
  711. # compiled using $(TARGET_FLAGS_TO_PASS).
  712. CHECK_TARGET_MODULES = \
  713. check-target-libstdc++-v3 \
  714. check-target-newlib \
  715. check-target-libf2c \
  716. check-target-libobjc \
  717. check-target-winsup \
  718. check-target-libiberty \
  719. check-target-gperf \
  720. check-target-libffi \
  721. check-target-libjava \
  722. check-target-zlib \
  723. check-target-boehm-gc \
  724. check-target-qthreads \
  725. check-target-rda
  726. # This is a list of the install targets for all of the modules which are
  727. # compiled using $(TARGET_FLAGS_TO_PASS).
  728. INSTALL_TARGET_MODULES = \
  729. install-target-libstdc++-v3 \
  730. install-target-newlib \
  731. install-target-libf2c \
  732. install-target-libobjc \
  733. install-target-libtermcap \
  734. install-target-winsup \
  735. install-target-libgloss \
  736. install-target-libiberty \
  737. install-target-gperf \
  738. install-target-libffi \
  739. install-target-libjava \
  740. install-target-zlib \
  741. install-target-boehm-gc \
  742. install-target-qthreads \
  743. install-target-rda
  744. # This is a list of the targets for which we can do a clean-{target}.
  745. CLEAN_MODULES = \
  746. clean-ash \
  747. clean-autoconf \
  748. clean-automake \
  749. clean-bash \
  750. clean-bfd \
  751. clean-opcodes \
  752. clean-binutils \
  753. clean-bison \
  754. clean-byacc \
  755. clean-bzip2 \
  756. clean-db \
  757. clean-dejagnu \
  758. clean-diff \
  759. clean-dosutils \
  760. clean-etc \
  761. clean-fastjar \
  762. clean-fileutils \
  763. clean-findutils \
  764. clean-find \
  765. clean-flex \
  766. clean-gas \
  767. clean-gawk \
  768. clean-gettext \
  769. clean-gnuserv \
  770. clean-gprof \
  771. clean-grep \
  772. clean-gzip \
  773. clean-hello \
  774. clean-indent \
  775. clean-intl \
  776. clean-tcl \
  777. clean-itcl \
  778. clean-ld \
  779. clean-libgui \
  780. clean-libiberty \
  781. clean-libtool \
  782. clean-m4 \
  783. clean-make \
  784. clean-mmalloc \
  785. clean-patch \
  786. clean-perl \
  787. clean-prms \
  788. clean-rcs \
  789. clean-readline \
  790. clean-release \
  791. clean-recode \
  792. clean-sed \
  793. clean-send-pr \
  794. clean-shellutils \
  795. clean-sid \
  796. clean-sim \
  797. clean-snavigator \
  798. clean-tar \
  799. clean-texinfo \
  800. clean-textutils \
  801. clean-time \
  802. clean-uudecode \
  803. clean-wdiff \
  804. clean-zip \
  805. clean-zlib
  806. # All of the target modules that can be cleaned
  807. CLEAN_TARGET_MODULES = \
  808. clean-target-libstdc++-v3 \
  809. clean-target-newlib \
  810. clean-target-libf2c \
  811. clean-target-libobjc \
  812. clean-target-winsup \
  813. clean-target-libgloss \
  814. clean-target-libiberty \
  815. clean-target-gperf \
  816. clean-target-examples \
  817. clean-target-libffi \
  818. clean-target-libjava \
  819. clean-target-zlib \
  820. clean-target-boehm-gc \
  821. clean-target-qthreads \
  822. clean-target-rda
  823. # All of the x11 modules that can be cleaned
  824. CLEAN_X11_MODULES = \
  825. clean-gdb \
  826. clean-expect \
  827. clean-guile \
  828. clean-tclX \
  829. clean-tk \
  830. clean-tix
  831. # The target built for a native build.
  832. .PHONY: all.normal
  833. all.normal: \
  834. $(ALL_BUILD_MODULES) \
  835. $(ALL_MODULES) \
  836. $(ALL_X11_MODULES) \
  837. $(ALL_TARGET_MODULES) \
  838. all-gcc
  839. # Do a target for all the subdirectories. A ``make do-X'' will do a
  840. # ``make X'' in all subdirectories (because, in general, there is a
  841. # dependency (below) of X upon do-X, a ``make X'' will also do this,
  842. # but it may do additional work as well).
  843. # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
  844. # because it is so large that it can easily overflow the command line
  845. # length limit on some systems.
  846. DO_X = \
  847. do-clean \
  848. do-distclean \
  849. do-dvi \
  850. do-info \
  851. do-install-info \
  852. do-installcheck \
  853. do-mostlyclean \
  854. do-maintainer-clean \
  855. do-TAGS
  856. .PHONY: $(DO_X)
  857. $(DO_X):
  858. @target=`echo $@ | sed -e 's/^do-//'`; \
  859. r=`${PWD_COMMAND}`; export r; \
  860. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  861. $(SET_LIB_PATH) \
  862. for i in $(SUBDIRS) -dummy-; do \
  863. if [ -f ./$$i/Makefile ]; then \
  864. case $$i in \
  865. gcc) \
  866. for flag in $(EXTRA_GCC_FLAGS); do \
  867. eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
  868. done; \
  869. ;; \
  870. *) \
  871. for flag in $(EXTRA_HOST_FLAGS); do \
  872. eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
  873. done; \
  874. ;; \
  875. esac ; \
  876. if (cd ./$$i; \
  877. $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
  878. "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
  879. "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
  880. "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
  881. $${target}); \
  882. then true; else exit 1; fi; \
  883. else true; fi; \
  884. done
  885. @target=`echo $@ | sed -e 's/^do-//'`; \
  886. r=`${PWD_COMMAND}`; export r; \
  887. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  888. $(SET_LIB_PATH) \
  889. for i in $(TARGET_CONFIGDIRS) -dummy-; do \
  890. if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
  891. for flag in $(EXTRA_TARGET_FLAGS); do \
  892. eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
  893. done; \
  894. if (cd $(TARGET_SUBDIR)/$$i; \
  895. $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
  896. "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
  897. "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
  898. "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
  899. $${target}); \
  900. then true; else exit 1; fi; \
  901. else true; fi; \
  902. done
  903. # Here are the targets which correspond to the do-X targets.
  904. .PHONY: info installcheck dvi install-info
  905. .PHONY: clean distclean mostlyclean maintainer-clean realclean
  906. .PHONY: local-clean local-distclean local-maintainer-clean
  907. info: do-info
  908. installcheck: do-installcheck
  909. dvi: do-dvi
  910. # Make sure makeinfo is built before we do a `make info'.
  911. do-info: all-texinfo
  912. install-info: do-install-info dir.info
  913. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  914. if [ -f dir.info ] ; then \
  915. $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
  916. else true ; fi
  917. local-clean:
  918. -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
  919. local-distclean:
  920. -rm -f Makefile config.status config.cache mh-frag mt-frag
  921. -if [ "$(TARGET_SUBDIR)" != "." ]; then \
  922. rm -rf $(TARGET_SUBDIR); \
  923. else true; fi
  924. -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
  925. -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
  926. -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
  927. -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
  928. -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
  929. local-maintainer-clean:
  930. @echo "This command is intended for maintainers to use;"
  931. @echo "it deletes files that may require special tools to rebuild."
  932. clean: do-clean local-clean
  933. mostlyclean: do-mostlyclean local-clean
  934. distclean: do-distclean local-clean local-distclean
  935. maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
  936. maintainer-clean: local-distclean
  937. realclean: maintainer-clean
  938. # This rule is used to clean specific modules.
  939. .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
  940. $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
  941. @dir=`echo $@ | sed -e 's/clean-//'`; \
  942. if [ -f ./$${dir}/Makefile ] ; then \
  943. r=`${PWD_COMMAND}`; export r; \
  944. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  945. $(SET_LIB_PATH) \
  946. (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
  947. else \
  948. true; \
  949. fi
  950. .PHONY: $(CLEAN_TARGET_MODULES)
  951. $(CLEAN_TARGET_MODULES):
  952. @dir=`echo $@ | sed -e 's/clean-target-//'`; \
  953. rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
  954. if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  955. r=`${PWD_COMMAND}`; export r; \
  956. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  957. $(SET_LIB_PATH) \
  958. (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
  959. else \
  960. true; \
  961. fi
  962. clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
  963. clean-target-libgcc:
  964. test ! -d gcc/libgcc || \
  965. (cd gcc/libgcc && find . -type d -print) | \
  966. while read d; do rm -f gcc/$$d/libgcc.a || : ; done
  967. -rm -rf gcc/libgcc
  968. # Check target.
  969. .PHONY: check do-check
  970. check:
  971. $(MAKE) do-check NOTPARALLEL=parallel-ok
  972. do-check: $(CHECK_MODULES) \
  973. $(CHECK_TARGET_MODULES) \
  974. $(CHECK_X11_MODULES) \
  975. check-gcc
  976. # Automated reporting of test results.
  977. warning.log: build.log
  978. $(srcdir)/contrib/warn_summary build.log > $@
  979. mail-report.log:
  980. if test x'$(BOOT_CFLAGS)' != x''; then \
  981. BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
  982. fi; \
  983. $(srcdir)/contrib/test_summary -t >$@
  984. chmod +x $@
  985. echo If you really want to send e-mail, run ./$@ now
  986. mail-report-with-warnings.log: warning.log
  987. if test x'$(BOOT_CFLAGS)' != x''; then \
  988. BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
  989. fi; \
  990. $(srcdir)/contrib/test_summary -t -i warning.log >$@
  991. chmod +x $@
  992. echo If you really want to send e-mail, run ./$@ now
  993. # Installation targets.
  994. .PHONY: install install-cross uninstall source-vault binary-vault vault-install
  995. install: $(INSTALL_TARGET)
  996. install-cross: $(INSTALL_TARGET_CROSS)
  997. uninstall:
  998. @echo "the uninstall target is not supported in this tree"
  999. source-vault:
  1000. $(MAKE) -f ./release/Build-A-Release \
  1001. host=$(host_alias) source-vault
  1002. binary-vault:
  1003. $(MAKE) -f ./release/Build-A-Release \
  1004. host=$(host_alias) target=$(target_alias)
  1005. vault-install:
  1006. @if [ -f ./release/vault-install ] ; then \
  1007. ./release/vault-install $(host_alias) $(target_alias) ; \
  1008. else \
  1009. true ; \
  1010. fi
  1011. .PHONY: install.all
  1012. install.all: install-no-fixedincludes
  1013. @if [ -f ./gcc/Makefile ] ; then \
  1014. r=`${PWD_COMMAND}` ; export r ; \
  1015. $(SET_LIB_PATH) \
  1016. (cd ./gcc; \
  1017. $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
  1018. else \
  1019. true ; \
  1020. fi
  1021. # install-no-fixedincludes is used because Cygnus can not distribute
  1022. # the fixed header files.
  1023. .PHONY: install-no-fixedincludes
  1024. install-no-fixedincludes: \
  1025. installdirs \
  1026. $(INSTALL_MODULES) \
  1027. $(INSTALL_TARGET_MODULES) \
  1028. $(INSTALL_X11_MODULES) \
  1029. gcc-no-fixedincludes
  1030. # Install the gcc headers files, but not the fixed include files,
  1031. # which Cygnus is not allowed to distribute. This rule is very
  1032. # dependent on the workings of the gcc Makefile.in.
  1033. .PHONY: gcc-no-fixedincludes
  1034. gcc-no-fixedincludes:
  1035. @if [ -f ./gcc/Makefile ]; then \
  1036. rm -rf gcc/tmp-include; \
  1037. mv gcc/include gcc/tmp-include 2>/dev/null; \
  1038. mkdir gcc/include; \
  1039. cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
  1040. touch gcc/stmp-fixinc gcc/include/fixed; \
  1041. rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
  1042. r=`${PWD_COMMAND}`; export r; \
  1043. s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
  1044. $(SET_LIB_PATH) \
  1045. (cd ./gcc; \
  1046. $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
  1047. rm -rf gcc/include; \
  1048. mv gcc/tmp-include gcc/include 2>/dev/null; \
  1049. else true; fi
  1050. # This rule is used to build the modules which are built with the
  1051. # build machine's native compiler.
  1052. .PHONY: $(ALL_BUILD_MODULES)
  1053. $(ALL_BUILD_MODULES):
  1054. dir=`echo $@ | sed -e 's/all-build-//'`; \
  1055. if [ -f ./$${dir}/Makefile ] ; then \
  1056. r=`${PWD_COMMAND}`; export r; \
  1057. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1058. (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \
  1059. else \
  1060. true; \
  1061. fi
  1062. # This rule is used to configure the modules which are built with the
  1063. # native tools.
  1064. .PHONY: $(CONFIGURE_BUILD_MODULES)
  1065. $(CONFIGURE_BUILD_MODULES):
  1066. @dir=`echo $@ | sed -e 's/configure-build-//'`; \
  1067. if [ ! -d $(BUILD_SUBDIR) ]; then \
  1068. true; \
  1069. elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \
  1070. true; \
  1071. elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
  1072. if [ -d $(srcdir)/$${dir} ]; then \
  1073. [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\
  1074. r=`${PWD_COMMAND}`; export r; \
  1075. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1076. AR="$(AR_FOR_BUILD)"; export AR; \
  1077. AS="$(AS_FOR_BUILD)"; export AS; \
  1078. CC="$(CC_FOR_BUILD)"; export CC; \
  1079. CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
  1080. CXX="$(CXX_FOR_BUILD)"; export CXX; \
  1081. CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
  1082. GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
  1083. DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
  1084. LD="$(LD_FOR_BUILD)"; export LD; \
  1085. LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
  1086. NM="$(NM_FOR_BUILD)"; export NM; \
  1087. RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
  1088. WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
  1089. echo Configuring in $(BUILD_SUBDIR)/$${dir}; \
  1090. cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \
  1091. case $(srcdir) in \
  1092. /* | [A-Za-z]:[\\/]*) \
  1093. topdir=$(srcdir) ;; \
  1094. *) \
  1095. case "$(BUILD_SUBDIR)" in \
  1096. .) topdir="../$(srcdir)" ;; \
  1097. *) topdir="../../$(srcdir)" ;; \
  1098. esac ;; \
  1099. esac; \
  1100. if [ "$(srcdir)" = "." ] ; then \
  1101. if [ "$(BUILD_SUBDIR)" != "." ] ; then \
  1102. if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
  1103. if [ -f Makefile ]; then \
  1104. if $(MAKE) distclean; then \
  1105. true; \
  1106. else \
  1107. exit 1; \
  1108. fi; \
  1109. else \
  1110. true; \
  1111. fi; \
  1112. else \
  1113. exit 1; \
  1114. fi; \
  1115. else \
  1116. true; \
  1117. fi; \
  1118. srcdiroption="--srcdir=."; \
  1119. libsrcdir="."; \
  1120. else \
  1121. srcdiroption="--srcdir=$${topdir}/$${dir}"; \
  1122. libsrcdir="$$s/$${dir}"; \
  1123. fi; \
  1124. if [ -f $${libsrcdir}/configure ] ; then \
  1125. rm -f no-such-file skip-this-dir; \
  1126. CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
  1127. $(BUILD_CONFIGARGS) $${srcdiroption} \
  1128. --with-build-subdir="$(BUILD_SUBDIR)"; \
  1129. else \
  1130. rm -f no-such-file skip-this-dir; \
  1131. CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
  1132. $(BUILD_CONFIGARGS) $${srcdiroption} \
  1133. --with-build-subdir="$(BUILD_SUBDIR)"; \
  1134. fi || exit 1; \
  1135. if [ -f skip-this-dir ] ; then \
  1136. sh skip-this-dir; \
  1137. rm -f skip-this-dir; \
  1138. cd ..; rmdir $${dir} || true; \
  1139. else \
  1140. true; \
  1141. fi; \
  1142. else \
  1143. true; \
  1144. fi; \
  1145. else \
  1146. true; \
  1147. fi
  1148. # This rule is used to build the modules which use FLAGS_TO_PASS. To
  1149. # build a target all-X means to cd to X and make all.
  1150. .PHONY: $(ALL_MODULES)
  1151. $(ALL_MODULES):
  1152. @dir=`echo $@ | sed -e 's/all-//'`; \
  1153. if [ -f ./$${dir}/Makefile ] ; then \
  1154. r=`${PWD_COMMAND}`; export r; \
  1155. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1156. $(SET_LIB_PATH) \
  1157. (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
  1158. else \
  1159. true; \
  1160. fi
  1161. # These rules are used to check the modules which use FLAGS_TO_PASS.
  1162. # To build a target check-X means to cd to X and make check. Some
  1163. # modules are only tested in a native toolchain.
  1164. .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
  1165. $(NATIVE_CHECK_MODULES):
  1166. @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
  1167. dir=`echo $@ | sed -e 's/check-//'`; \
  1168. if [ -f ./$${dir}/Makefile ] ; then \
  1169. r=`${PWD_COMMAND}`; export r; \
  1170. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1171. $(SET_LIB_PATH) \
  1172. (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
  1173. else \
  1174. true; \
  1175. fi; \
  1176. fi
  1177. $(CROSS_CHECK_MODULES):
  1178. @dir=`echo $@ | sed -e 's/check-//'`; \
  1179. if [ -f ./$${dir}/Makefile ] ; then \
  1180. r=`${PWD_COMMAND}`; export r; \
  1181. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1182. $(SET_LIB_PATH) \
  1183. (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
  1184. else \
  1185. true; \
  1186. fi
  1187. # This rule is used to install the modules which use FLAGS_TO_PASS.
  1188. # To build a target install-X means to cd to X and make install.
  1189. .PHONY: $(INSTALL_MODULES)
  1190. $(INSTALL_MODULES): installdirs
  1191. @dir=`echo $@ | sed -e 's/install-//'`; \
  1192. if [ -f ./$${dir}/Makefile ] ; then \
  1193. r=`${PWD_COMMAND}`; export r; \
  1194. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1195. $(SET_LIB_PATH) \
  1196. (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
  1197. else \
  1198. true; \
  1199. fi
  1200. # This rule is used to configure the modules which are built with the
  1201. # target tools.
  1202. .PHONY: $(CONFIGURE_TARGET_MODULES)
  1203. $(CONFIGURE_TARGET_MODULES):
  1204. @dir=`echo $@ | sed -e 's/configure-target-//'`; \
  1205. if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
  1206. r=`${PWD_COMMAND}`; export r; \
  1207. $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
  1208. if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
  1209. if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
  1210. if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
  1211. rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
  1212. else \
  1213. echo "Multilibs changed for $${dir}, reconfiguring"; \
  1214. rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
  1215. mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
  1216. fi; \
  1217. else \
  1218. mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
  1219. fi; \
  1220. fi; \
  1221. fi; exit 0 # break command into two pieces
  1222. @dir=`echo $@ | sed -e 's/configure-target-//'`; \
  1223. if [ ! -d $(TARGET_SUBDIR) ]; then \
  1224. true; \
  1225. elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  1226. true; \
  1227. elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
  1228. if [ -d $(srcdir)/$${dir} ]; then \
  1229. [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
  1230. r=`${PWD_COMMAND}`; export r; \
  1231. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1232. $(SET_LIB_PATH) \
  1233. AR="$(AR_FOR_TARGET)"; export AR; \
  1234. AS="$(AS_FOR_TARGET)"; export AS; \
  1235. CC="$(CC_FOR_TARGET)"; export CC; \
  1236. CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
  1237. CXX="$(CXX_FOR_TARGET)"; export CXX; \
  1238. CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
  1239. GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
  1240. DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
  1241. LD="$(LD_FOR_TARGET)"; export LD; \
  1242. LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
  1243. NM="$(NM_FOR_TARGET)"; export NM; \
  1244. RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
  1245. WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
  1246. echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
  1247. cd "$(TARGET_SUBDIR)/$${dir}" || exit 1; \
  1248. case $(srcdir) in \
  1249. /* | [A-Za-z]:[\\/]*) \
  1250. topdir=$(srcdir) ;; \
  1251. *) \
  1252. case "$(TARGET_SUBDIR)" in \
  1253. .) topdir="../$(srcdir)" ;; \
  1254. *) topdir="../../$(srcdir)" ;; \
  1255. esac ;; \
  1256. esac; \
  1257. if [ "$(srcdir)" = "." ] ; then \
  1258. if [ "$(TARGET_SUBDIR)" != "." ] ; then \
  1259. if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
  1260. if [ -f Makefile ]; then \
  1261. if $(MAKE) distclean; then \
  1262. true; \
  1263. else \
  1264. exit 1; \
  1265. fi; \
  1266. else \
  1267. true; \
  1268. fi; \
  1269. else \
  1270. exit 1; \
  1271. fi; \
  1272. else \
  1273. true; \
  1274. fi; \
  1275. srcdiroption="--srcdir=."; \
  1276. libsrcdir="."; \
  1277. else \
  1278. srcdiroption="--srcdir=$${topdir}/$${dir}"; \
  1279. libsrcdir="$$s/$${dir}"; \
  1280. fi; \
  1281. if [ -f $${libsrcdir}/configure ] ; then \
  1282. rm -f no-such-file skip-this-dir; \
  1283. CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
  1284. $(TARGET_CONFIGARGS) $${srcdiroption} \
  1285. --with-target-subdir="$(TARGET_SUBDIR)"; \
  1286. else \
  1287. rm -f no-such-file skip-this-dir; \
  1288. CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
  1289. $(TARGET_CONFIGARGS) $${srcdiroption} \
  1290. --with-target-subdir="$(TARGET_SUBDIR)"; \
  1291. fi || exit 1; \
  1292. if [ -f skip-this-dir ] ; then \
  1293. sh skip-this-dir; \
  1294. rm -f skip-this-dir; \
  1295. cd ..; rmdir $${dir} || true; \
  1296. else \
  1297. true; \
  1298. fi; \
  1299. else \
  1300. true; \
  1301. fi; \
  1302. else \
  1303. true; \
  1304. fi
  1305. # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
  1306. # To build a target all-X means to cd to X and make all.
  1307. .PHONY: $(ALL_TARGET_MODULES)
  1308. $(ALL_TARGET_MODULES):
  1309. @dir=`echo $@ | sed -e 's/all-target-//'`; \
  1310. if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  1311. r=`${PWD_COMMAND}`; export r; \
  1312. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1313. $(SET_LIB_PATH) \
  1314. (cd $(TARGET_SUBDIR)/$${dir}; \
  1315. $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
  1316. else \
  1317. true; \
  1318. fi
  1319. # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
  1320. # To build a target install-X means to cd to X and make install.
  1321. .PHONY: $(CHECK_TARGET_MODULES)
  1322. $(CHECK_TARGET_MODULES):
  1323. @dir=`echo $@ | sed -e 's/check-target-//'`; \
  1324. if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  1325. r=`${PWD_COMMAND}`; export r; \
  1326. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1327. $(SET_LIB_PATH) \
  1328. (cd $(TARGET_SUBDIR)/$${dir}; \
  1329. $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
  1330. else \
  1331. true; \
  1332. fi
  1333. # This rule is used to install the modules which use
  1334. # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
  1335. # and make install.
  1336. .PHONY: $(INSTALL_TARGET_MODULES)
  1337. $(INSTALL_TARGET_MODULES): installdirs
  1338. @dir=`echo $@ | sed -e 's/install-target-//'`; \
  1339. if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
  1340. r=`${PWD_COMMAND}`; export r; \
  1341. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1342. $(SET_LIB_PATH) \
  1343. (cd $(TARGET_SUBDIR)/$${dir}; \
  1344. $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
  1345. else \
  1346. true; \
  1347. fi
  1348. # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
  1349. # To build a target all-X means to cd to X and make all.
  1350. .PHONY: $(ALL_X11_MODULES)
  1351. $(ALL_X11_MODULES):
  1352. @dir=`echo $@ | sed -e 's/all-//'`; \
  1353. if [ -f ./$${dir}/Makefile ] ; then \
  1354. r=`${PWD_COMMAND}`; export r; \
  1355. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1356. $(SET_LIB_PATH) \
  1357. (cd $${dir}; \
  1358. $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
  1359. else \
  1360. true; \
  1361. fi
  1362. # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
  1363. # To build a target check-X means to cd to X and make all.
  1364. .PHONY: $(CHECK_X11_MODULES)
  1365. $(CHECK_X11_MODULES):
  1366. @dir=`echo $@ | sed -e 's/check-//'`; \
  1367. if [ -f ./$${dir}/Makefile ] ; then \
  1368. r=`${PWD_COMMAND}`; export r; \
  1369. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1370. $(SET_LIB_PATH) \
  1371. (cd $${dir}; \
  1372. $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
  1373. else \
  1374. true; \
  1375. fi
  1376. # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
  1377. # To build a target install-X means to cd to X and make install.
  1378. .PHONY: $(INSTALL_X11_MODULES)
  1379. $(INSTALL_X11_MODULES): installdirs
  1380. @dir=`echo $@ | sed -e 's/install-//'`; \
  1381. if [ -f ./$${dir}/Makefile ] ; then \
  1382. r=`${PWD_COMMAND}`; export r; \
  1383. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1384. $(SET_LIB_PATH) \
  1385. (cd $${dir}; \
  1386. $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
  1387. else \
  1388. true; \
  1389. fi
  1390. # gcc is the only module which uses GCC_FLAGS_TO_PASS.
  1391. .PHONY: all-gcc
  1392. all-gcc:
  1393. @if [ -f ./gcc/Makefile ] ; then \
  1394. r=`${PWD_COMMAND}`; export r; \
  1395. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1396. $(SET_LIB_PATH) \
  1397. (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
  1398. else \
  1399. true; \
  1400. fi
  1401. # Building GCC uses some tools for rebuilding "source" files
  1402. # like texinfo, bison/byacc, etc. So we must depend on those.
  1403. #
  1404. # While building GCC, it may be necessary to run various target
  1405. # programs like the assembler, linker, etc. So we depend on
  1406. # those too.
  1407. #
  1408. # In theory, on an SMP all those dependencies can be resolved
  1409. # in parallel.
  1410. #
  1411. .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
  1412. bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap
  1413. @r=`${PWD_COMMAND}`; export r; \
  1414. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1415. $(SET_LIB_PATH) \
  1416. echo "Bootstrapping the compiler"; \
  1417. cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
  1418. @r=`${PWD_COMMAND}`; export r; \
  1419. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1420. case "$@" in \
  1421. *bootstrap4-lean ) \
  1422. msg="Comparing stage3 and stage4 of the compiler"; \
  1423. compare=compare3-lean ;; \
  1424. *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
  1425. compare=compare3 ;; \
  1426. *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
  1427. compare=compare-lean ;; \
  1428. * ) msg="Comparing stage2 and stage3 of the compiler"; \
  1429. compare=compare ;; \
  1430. esac; \
  1431. $(SET_LIB_PATH) \
  1432. echo "$$msg"; \
  1433. cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
  1434. @r=`${PWD_COMMAND}`; export r; \
  1435. s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
  1436. $(SET_LIB_PATH) \
  1437. echo "Building runtime libraries"; \
  1438. $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
  1439. .PHONY: cross
  1440. cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
  1441. @r=`${PWD_COMMAND}`; export r; \
  1442. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1443. $(SET_LIB_PATH) \
  1444. echo "Building the C and C++ compiler"; \
  1445. cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
  1446. @r=`${PWD_COMMAND}`; export r; \
  1447. s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
  1448. $(SET_LIB_PATH) \
  1449. echo "Building runtime libraries"; \
  1450. $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
  1451. LANGUAGES="c c++" all
  1452. .PHONY: check-gcc
  1453. check-gcc:
  1454. @if [ -f ./gcc/Makefile ] ; then \
  1455. r=`${PWD_COMMAND}`; export r; \
  1456. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1457. $(SET_LIB_PATH) \
  1458. (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
  1459. else \
  1460. true; \
  1461. fi
  1462. .PHONY: check-gcc-c++
  1463. check-gcc-c++:
  1464. @if [ -f ./gcc/Makefile ] ; then \
  1465. r=`${PWD_COMMAND}`; export r; \
  1466. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1467. $(SET_LIB_PATH) \
  1468. (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
  1469. else \
  1470. true; \
  1471. fi
  1472. .PHONY: check-c++
  1473. check-c++:
  1474. $(MAKE) check-target-libstdc++-v3 check-gcc-c++ NOTPARALLEL=parallel-ok
  1475. .PHONY: install-gcc
  1476. install-gcc:
  1477. @if [ -f ./gcc/Makefile ] ; then \
  1478. r=`${PWD_COMMAND}`; export r; \
  1479. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1480. $(SET_LIB_PATH) \
  1481. (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
  1482. else \
  1483. true; \
  1484. fi
  1485. .PHONY: install-gcc-cross
  1486. install-gcc-cross:
  1487. @if [ -f ./gcc/Makefile ] ; then \
  1488. r=`${PWD_COMMAND}`; export r; \
  1489. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1490. $(SET_LIB_PATH) \
  1491. (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
  1492. else \
  1493. true; \
  1494. fi
  1495. # EXPERIMENTAL STUFF
  1496. # This rule is used to install the modules which use FLAGS_TO_PASS.
  1497. # To build a target install-X means to cd to X and make install.
  1498. .PHONY: install-dosrel
  1499. install-dosrel: installdirs info
  1500. @dir=`echo $@ | sed -e 's/install-//'`; \
  1501. if [ -f ./$${dir}/Makefile ] ; then \
  1502. r=`${PWD_COMMAND}`; export r; \
  1503. s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  1504. $(SET_LIB_PATH) \
  1505. (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
  1506. else \
  1507. true; \
  1508. fi
  1509. install-dosrel-fake:
  1510. ALL_GCC = all-gcc
  1511. ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
  1512. ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3
  1513. # This is a list of inter-dependencies among modules.
  1514. all-ash:
  1515. all-autoconf: all-m4 all-texinfo
  1516. all-automake: all-m4 all-texinfo
  1517. all-bash:
  1518. all-bfd: all-libiberty all-intl
  1519. all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
  1520. all-bison: all-texinfo
  1521. configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads
  1522. all-byacc:
  1523. all-bzip2:
  1524. all-db:
  1525. all-dejagnu: all-tcl all-expect all-tk
  1526. all-diff: all-libiberty
  1527. all-etc:
  1528. configure-target-examples: $(ALL_GCC_C)
  1529. all-expect: all-tcl all-tk
  1530. all-fileutils: all-libiberty
  1531. all-findutils:
  1532. all-find:
  1533. all-flex: all-libiberty all-bison all-byacc
  1534. all-gas: all-libiberty all-opcodes all-bfd all-intl
  1535. all-gawk:
  1536. all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
  1537. all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
  1538. GDB_TK = @GDB_TK@
  1539. all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
  1540. all-gettext:
  1541. all-gnuserv:
  1542. configure-target-gperf: $(ALL_GCC_CXX)
  1543. all-target-gperf: all-target-libiberty all-target-libstdc++-v3
  1544. all-gprof: all-libiberty all-bfd all-opcodes all-intl
  1545. all-grep: all-libiberty
  1546. all-guile:
  1547. all-gzip: all-libiberty
  1548. all-hello: all-libiberty
  1549. all-indent:
  1550. all-intl:
  1551. all-itcl: all-tcl all-tk
  1552. all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
  1553. configure-target-libgloss: $(ALL_GCC)
  1554. all-target-libgloss: configure-target-newlib
  1555. all-libgui: all-tcl all-tk all-itcl
  1556. all-libiberty:
  1557. all-build-libiberty: configure-build-libiberty
  1558. configure-target-libffi: $(ALL_GCC_C)
  1559. configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
  1560. all-target-libjava: all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
  1561. configure-target-libstdc++-v3: $(ALL_GCC_C)
  1562. all-target-libstdc++-v3: all-target-libiberty
  1563. all-libtool:
  1564. configure-target-libf2c: $(ALL_GCC_C)
  1565. all-target-libf2c: all-target-libiberty
  1566. configure-target-libobjc: $(ALL_GCC_C)
  1567. all-target-libobjc: all-target-libiberty
  1568. all-m4: all-libiberty all-texinfo
  1569. all-make: all-libiberty
  1570. all-mmalloc:
  1571. configure-target-newlib: $(ALL_GCC)
  1572. configure-target-libtermcap: $(ALL_GCC_C)
  1573. all-opcodes: all-bfd all-libiberty
  1574. all-patch: all-libiberty
  1575. all-perl:
  1576. all-prms: all-libiberty
  1577. configure-target-qthreads: $(ALL_GCC_C)
  1578. all-rcs:
  1579. all-readline:
  1580. all-recode: all-libiberty
  1581. all-sed: all-libiberty
  1582. all-send-pr: all-prms
  1583. all-shellutils:
  1584. all-sid: all-tcl all-tk
  1585. all-sim: all-libiberty all-bfd all-opcodes all-readline
  1586. all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
  1587. all-tar: all-libiberty
  1588. all-tcl:
  1589. all-tclX: all-tcl all-tk
  1590. all-tk: all-tcl
  1591. all-texinfo: all-libiberty
  1592. all-textutils:
  1593. all-time:
  1594. all-tix: all-tcl all-tk
  1595. all-wdiff:
  1596. configure-target-rda: $(ALL_GCC_C)
  1597. configure-target-winsup: $(ALL_GCC_C)
  1598. all-target-winsup: all-target-libiberty all-target-libtermcap
  1599. all-uudecode: all-libiberty
  1600. all-zip:
  1601. all-zlib:
  1602. configure-target-zlib: $(ALL_GCC_C)
  1603. all-fastjar: all-zlib all-libiberty
  1604. configure-target-fastjar: configure-target-zlib
  1605. all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty
  1606. configure-target-libiberty: $(ALL_GCC_C)
  1607. configure-target: $(CONFIGURE_TARGET_MODULES)
  1608. all-target: $(ALL_TARGET_MODULES)
  1609. install-target: $(INSTALL_TARGET_MODULES)
  1610. install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
  1611. install-sid: install-tcl install-tk
  1612. # We put install-opcodes before install-binutils because the installed
  1613. # binutils might be on PATH, and they might need the shared opcodes
  1614. # library.
  1615. install-binutils: install-opcodes
  1616. # We put install-tcl before install-itcl because itcl wants to run a
  1617. # program on installation which uses the Tcl libraries.
  1618. install-itcl: install-tcl
  1619. # Dependencies of all-target-foo on configure-target-foo.
  1620. all-target-libstdc++-v3: configure-target-libstdc++-v3
  1621. all-target-newlib: configure-target-newlib
  1622. all-target-libf2c: configure-target-libf2c
  1623. all-target-libobjc: configure-target-libobjc
  1624. all-target-libtermcap: configure-target-libtermcap
  1625. all-target-winsup: configure-target-winsup
  1626. all-target-libgloss: configure-target-libgloss
  1627. all-target-libiberty: configure-target-libiberty
  1628. all-target-gperf: configure-target-gperf
  1629. all-target-examples: configure-target-examples
  1630. all-target-libffi: configure-target-libffi
  1631. all-target-libjava: configure-target-libjava
  1632. all-target-zlib: configure-target-zlib
  1633. all-target-boehm-gc: configure-target-boehm-gc
  1634. all-target-qthreads: configure-target-qthreads
  1635. all-target-rda: configure-target-rda
  1636. ### other supporting targets
  1637. MAKEDIRS= \
  1638. $(DESTDIR)$(prefix) \
  1639. $(DESTDIR)$(exec_prefix)
  1640. .PHONY: installdirs
  1641. installdirs: mkinstalldirs
  1642. $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
  1643. dir.info: do-install-info
  1644. if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
  1645. $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
  1646. mv -f dir.info.new dir.info ; \
  1647. else true ; \
  1648. fi
  1649. dist:
  1650. @echo "Building a full distribution of this tree isn't done"
  1651. @echo "via 'make dist'. Check out the etc/ subdirectory"
  1652. etags tags: TAGS
  1653. # Right now this just builds TAGS in each subdirectory. emacs19 has the
  1654. # ability to use several tags files at once, so there is probably no need
  1655. # to combine them into one big TAGS file (like CVS 1.3 does). We could
  1656. # (if we felt like it) have this Makefile write a piece of elisp which
  1657. # the user could load to tell emacs19 where all the TAGS files we just
  1658. # built are.
  1659. TAGS: do-TAGS
  1660. # Rebuilding Makefile.in, using autogen.
  1661. $(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
  1662. cd $(srcdir) && autogen Makefile.def
  1663. # with the gnu make, this is done automatically.
  1664. Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
  1665. $(SHELL) ./config.status
  1666. #
  1667. .NOEXPORT:
  1668. MAKEOVERRIDES=
  1669. # end of Makefile.in