source: trunk/Makefile@ 433

Last change on this file since 433 was 431, checked in by bird, 22 years ago

#564: try not to run out of file handles in MAKE while building emx...

  • Property cvs2svn:cvs-rev set to 1.38
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 35.8 KB
RevLine 
[25]1# $Id: Makefile 431 2003-07-23 01:27:08Z bird $
2#
3# Top level makefile.
4#
5# InnoTek Systemberatung GmbHconfidential
6#
7# Copyright (c) 2003 InnoTek Systemberatung GmbH
8# Author: knut st. osmundsen <bird@anduin.net>
9#
10# All Rights Reserved
11#
12
[34]13
14###############################################################################
15## Global Variables
[73]16## (D = no drive)
[34]17###############################################################################
[69]18PWD := $(shell pwd)
19PWDD := $(shell pwd|sed 's/^[a-zA-Z]://')
20MAKEFILE = $(PWD)/Makefile
[34]21
[111]22ifndef BUILD_MODE
[34]23export BUILD_MODE=DEBUG
[25]24endif
[34]25
[69]26ifndef PATH_TOP
27export PATH_TOP := $(PWD)
[76]28endif
29ifndef PATH_TOPD
[69]30export PATH_TOPD := $(PWDD)
31endif
32
33
34export PATH_BIN = $(PATH_TOP)/bin/$(BUILD_PLATFORM)/$(BUILD_MODE)
35export PATH_BIND = $(PATH_TOPD)/bin/$(BUILD_PLATFORM)/$(BUILD_MODE)
36export PATH_OBJ = $(PATH_TOP)/obj/$(BUILD_PLATFORM)/$(BUILD_MODE)
37export PATH_OBJD = $(PATH_TOPD)/obj/$(BUILD_PLATFORM)/$(BUILD_MODE)
38export PATH_BUILTTOOLS = $(PATH_OBJ)/builttools
39export PATH_BUILTTOOLSD= $(PATH_OBJD)/builttools
[363]40PATH_BUILTTOOLS_TMP = $(PATH_OBJ)/builttools.tmp
41PATH_BUILTTOOLS_TMPD = $(PATH_OBJD)/builttools.tmp
[34]42
[69]43# Debug info or not (when ever we feel like passing down such options).
[122]44# Several ways to do this it seems.
[69]45ifeq "$(BUILD_MODE)" "RELEASE"
46BUILD_DEBUGINFO = -s
[122]47BUILD_ENABLE_SYMBOLS = --disable-symbols
[69]48else
49BUILD_DEBUGINFO = -g
[122]50BUILD_ENABLE_SYMBOLS = --enable-symbols
[69]51endif
52
[76]53
[109]54# Version and CVS defines
55export GCC_VERSION ?= 3.2.2
56export GCC_VERSION_SHORT ?= 3022
57export GCC_CVS_VENDOR ?= GNU
58export GCC_CVS_REL ?= GCC_3-2-2
59export BINUTILS_VERSION ?= 2.11.2
60export BINUTILS_VERSION_SHORT ?= 2112
61export BINUTILS_CVS_VENDOR ?= GNU
62export BINUTILS_CVS_REL ?= BINUTILS_2-11-2
63export EMX_VERSION ?= 0.9d-fix04
64export EMX_VERSION_SHORT ?= 9d04
65export EMX_CVS_VENDOR ?= EMX
66export EMX_CVS_REL ?= EMX_0-9D-FIX04
67
[111]68# innotek version and timestamp
69export INNOTEK_VERSION ?= (Innotek Build $(shell date '+%Y-%m-%d %H:%M'))
70
[109]71
[76]72#
[69]73# For builds on Linux Host builds we do the environment setup here.
74# This is essentially a mimicking of what we do on OS/2.
75#
76ifndef BUILD_PLATFORM
77ifeq "$(shell uname -s)" "Linux"
78export BUILD_PLATFORM ?= LINUX
79export BUILD_PROJECT ?= GCCOS2
80export SH ?= /bin/sh
81export ASH ?= /bin/ash
82export BASH ?= /bin/bash
83export AWK ?= /bin/gawk
84export GAWK ?= /bin/gawk
85export CONFIG_SHELL ?= $(SH)
86export MAKESHELL ?= $(SH)
87export PATH_EMX ?= /usr
88export PATH_EMXPGCC ?= /usr
89export TMP ?= /tmp
90export TMPDIR ?= /tmp
[25]91endif
[69]92endif
[25]93
94
[109]95
96# Misc Helpers
97ALL_PREFIX = $(PATH_BIND)/$(GCC_VERSION)/usr
98TOOL_CVS_DIFF_TREE = -cvs diff -R -N -w -u -r
99
100
101
102
103
[34]104###############################################################################
105###############################################################################
106###############################################################################
107###############################################################################
108#
109# M a i n R u l e z
110#
111###############################################################################
112###############################################################################
113###############################################################################
114###############################################################################
115all:
116 mkdir -p $(PATH_OBJ)
[69]117 $(MAKE) -C . all-logged 2>&1 | $(UNIXROOT)/usr/bin/tee $(PATH_OBJ)/build-`date +"%Y%m%d-%H%M%S"`.log
[34]118
119all-logged: \
[120]120 all-banner-start \
[25]121 all-env \
122 all-sanity \
[34]123 all-preload \
[120]124 all-versionstamps \
[89]125 all-symlinks \
[25]126 \
[120]127 all-stage1 \
128 all-stage2 \
[25]129 \
[76]130 all-install \
131 \
[120]132 all-symlinks-unlink
133 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
134 @echo "+ Make Ended Successfully: $(shell date)"
135 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[34]136
[120]137#
138# banners
139#
[34]140
[120]141all-banner-start:
[25]142 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
143 @echo "+ Make started: $(shell date)"
144 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[120]145
146all-banner-stage1:
147 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
148 @echo "+ Stage 1 - starting: $(shell date)"
149 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
150
151all-banner-stage2:
152 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
153 @echo "+ Stage 2 - starting: $(shell date)"
154 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[25]155
[120]156all-banner-builttools-initial:
[25]157 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[120]158 @echo "+ Initializing builttools tree"
[25]159 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[120]160
161all-banner-builttools-stage2:
162 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
163 @echo "+ Copying stage2 builttools"
164 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
165
166all-banner-install:
167 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
168 @echo "+ Install - starting: $(shell date)"
169 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[25]170
[120]171all-banner-install-done:
172 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
173 @echo "+ Install - done: $(shell date)"
174 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
175
176
177#
178# Sanity and environment dumps - to make it easier to figure out make bugs.
179#
180
[25]181all-env:
182 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
183 @echo "Variables:"
[34]184 @echo " PWD = $(PWD)"
[69]185 @echo " PWDD = $(PWDD)"
[34]186 @echo " PATH_TOP = $(PATH_TOP)"
[69]187 @echo " PATH_TOPD = $(PATH_TOPD)"
[34]188 @echo " PATH_OBJ = $(PATH_OBJ)"
[69]189 @echo " PATH_OBJD = $(PATH_OBJD)"
190 @echo " PATH_BIN = $(PATH_BIN)"
191 @echo " PATH_BIND = $(PATH_BIND)"
[111]192 @echo " ALL_PREFIX = $(ALL_PREFIX)"
[34]193 @echo " PATH_EMXPGCC = $(PATH_EMXPGCC)"
194 @echo " PATH_EMX = $(PATH_EMX)"
195 @echo " BUILD_MODE = $(BUILD_MODE)"
196 @echo " BUILD_PLATFORM = $(BUILD_PLATFORM)"
197 @echo " BUILD_PROJECT = $(BUILD_PROJECT)"
[111]198 @echo " GCC_VERSION = $(GCC_VERSION)"
199 @echo " GCC_VERSION_SHORT = $(GCC_VERSION_SHORT)"
200 @echo " GCC_CVS_VENDOR = $(GCC_CVS_VENDOR)"
201 @echo " GCC_CVS_REL = $(GCC_CVS_REL)"
202 @echo " BINUTILS_VERSION = $(BINUTILS_VERSION)"
203 @echo " BINUTILS_VERSION_SHORT = $(BINUTILS_VERSION_SHORT)"
204 @echo " BINUTILS_CVS_VENDOR = $(BINUTILS_CVS_VENDOR)"
205 @echo " BINUTILS_CVS_REL = $(BINUTILS_CVS_REL)"
206 @echo " EMX_VERSION = $(EMX_VERSION)"
207 @echo " EMX_VERSION_SHORT = $(EMX_VERSION_SHORT)"
208 @echo " EMX_CVS_VENDOR = $(EMX_CVS_VENDOR)"
209 @echo " EMX_CVS_REL = $(EMX_CVS_REL)"
[34]210 @echo " MAKEFILE = $(MAKEFILE)"
211 @echo " UNIXROOT = $(UNIXROOT)"
212 @echo " AC_PREFIX = $(AC_PREFIX)"
213 @echo " AC_MACRODIR = $(AC_MACRODIR)"
214 @echo " HOSTNAME = $(HOSTNAME)"
215 @echo " USER = $(USER)"
216 @echo " LOGNAME = $(LOGNAME)"
217 @echo " TMP = $(TMP)"
218 @echo " TMPDIR = $(TMPDIR)"
219 @echo " USER = $(USER)"
220 @echo " AWK = $(AWK)"
221 @echo " GAWK = $(GAWK)"
222 @echo " SH = $(SH)"
223 @echo " ASH = $(ASH)"
224 @echo " BASH = $(BASH)"
225 @echo " CONFIG_SHELL = $(CONFIG_SHELL)"
226 @echo " MAKESHELL = $(MAKESHELL)"
227 @echo " EMXSHELL = $(EMXSHELL)"
228 @echo " SHELL = $(SHELL)"
229 @echo " MAKE = $(MAKE)"
230 @echo " PATH = $(PATH)"
[25]231 @echo " C_INCLUDE_PATH = $(C_INCLUDE_PATH)"
232 @echo " CPLUS_INCLUDE_PATH = $(CPLUS_INCLUDE_PATH)"
233 @echo " OBJC_INCLUDE_PATH = $(OBJC_INCLUDE_PATH)"
234 @echo " LIBRARY_PATH = $(LIBRARY_PATH)"
235 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[120]236 @echo "Content of PATH_OBJ:"
237 -ls -la $(PATH_OBJ)/
238 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
239 @echo "Content of PATH_BIN:"
240 -ls -la $(PATH_BIN)/
241 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[25]242
[120]243
[25]244all-sanity:
[68]245 @echo -n "Checking build environment sanity... "
246 @if [ "x$(BUILD_PROJECT)" != "xGCCOS2" ]; then \
247 echo ""; echo "Error: BUILD_PROJECT is wrong or isn't defined!"; \
248 exit 8; \
249 fi
[69]250 @if [ "x$(BUILD_PLATFORM)" != "xOS2" -a "x$(BUILD_PLATFORM)" != "xLINUX" ]; then \
[68]251 echo ""; echo "Error: BUILD_PLATFORM is wrong or isn't defined!"; \
252 exit 8; \
253 fi
[69]254 @if [ "x$(BUILD_PLATFORM)" = "xOS2" -a "x$(UNIXROOT)" = "x" ]; then \
255 echo ""; echo "Error: UNIXROOT isn't defined!"; \
256 exit 8; \
257 fi
258 @if [ "x$(BUILD_PLATFORM)" != "xOS2" -a "x$(UNIXROOT)" != "x" ]; then \
259 echo ""; echo "Error: UNIXROOT is defined!"; \
260 exit 8; \
261 fi
262ifeq "$(BUILD_PLATFORM)" "OS2"
263 @if gcc --version | grep -qe ".*[3]\.[2-9]\.[0-9]"; then \
264 true; \
265 else \
266 echo ""; echo "Warning: GCC v3.2.x or higher is recommended!"; \
267 fi
268 @if ar --version | grep -qe ".*2\.11\.[2-9]" -e ".*[2]\.1[2-9]\.[0-9]*"; then \
269 true; \
270 else \
271 echo ""; echo "Warning: AR v2.11.2 or higher is recommended!"; \
272 fi
273endif
[68]274 @echo "ok"
275
[120]276
277#
278# Preload tools we commonly use this speeds up stuff.
279#
[34]280PRELOADED_TOOLS = bin/sh.exe bin/echo.exe bin/true.exe usr/bin/test.exe usr/bin/expr.exe \
281 usr/bin/gawk.exe usr/bin/sed.exe bin/rm.exe bin/cat.exe bin/cp.exe
[76]282
[34]283all-preload:
284 @echo "Preloading tools:"
[69]285ifeq "$(BUILD_PLATFORM)" "OS2"
[34]286 @for tool in $(PRELOADED_TOOLS); do \
287 echo -n " $$tool"; \
288 emxload -e $(UNIXROOT)/$$tool; \
289 done
[396]290 emxload -e gcc.exe g++.exe ld.exe as.exe ar.exe ld.exe
[69]291endif
[34]292 @echo ""
[121]293
294all-preload-unload-obj:
295ifeq "$(BUILD_PLATFORM)" "OS2"
[363]296 -for prog in `emxload -l | sed -e 's|\\\|\/|g' -e 's@.*³[[:blank:]]*@@' | grep -i '$(PATH_OBJD)'`; \
[121]297 do \
[363]298 echo $$prog; \
[121]299 emxload -u $$prog; \
300 done
[395]301 -for prog in `emxload -l | sed -e 's|\\\|\/|g' -e 's@.*³[[:blank:]]*@@' | grep -i '$(PATH_TOPD)/src'`; \
302 do \
303 echo $$prog; \
304 emxload -u $$prog; \
305 done
[121]306endif
[34]307
[363]308
[111]309#
[120]310# Version stamping/branding.
311# Update various version strings which are printed from the tools to tell
312# the build date and that's our built. This helps us tell releases apart.
313#
[111]314# IMPORTANT! Take care not to commit the changed files
315# (TODO! Try make these changes to non-cvs backed files. (long-term-goal))
316.PHONY: all-versionstamps
317all-versionstamps: $(PATH_OBJ)/.ts.versionstamped
318$(PATH_OBJ)/.ts.versionstamped:
[226]319 echo '#define INNOTEK_VERSION "$(INNOTEK_VERSION)"' > include/innotekversion.h
[111]320 $(MAKE) -f $(MAKEFILE) "INNOTEK_VERSION=$(INNOTEK_VERSION)" gcc-versionstamps binutils-versionstamps emx-versionstamps
321 mkdir -p $(@D)
322 touch $@
323
324
[120]325#
326# Stages
327# A rebuild with the new toolsuite is usually required when there is ABI
328# changes and other vital changes done to the tools.
329#
330
331all-stage1: $(PATH_OBJ)/.all-stage1
332$(PATH_OBJ)/.all-stage1:
333 $(MAKE) -f $(MAKEFILE) all-stage1-it
334 echo "$(@F)" > $(PATH_OBJ)/.last-stage
335 touch $@
336 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
337 @echo "+ Stage 1 - done: $(shell date)"
338 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[111]339
[121]340all-stage1-it: \
[120]341 all-banner-stage1 \
342 all-builttools-initial \
343 all-emx \
344 all-binutils \
345 all-gcc
346
[76]347
[120]348all-stage2: $(PATH_OBJ)/.all-stage2
349$(PATH_OBJ)/.all-stage2: \
350 $(PATH_OBJ)/.all-stage2.save-stage1
351 $(MAKE) -f $(MAKEFILE) all-stage2-it
352 echo "$(@F)" > $(PATH_OBJ)/.last-stage
353 touch $@
354 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
355 @echo "+ Stage 2 - done: $(shell date)"
356 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
357
358$(PATH_OBJ)/.all-stage2.save-stage1:
359 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
360 @echo "+ Saving Stage 1 - Starting: $(shell date)"
361 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[121]362 $(MAKE) -f $(MAKEFILE) all-preload-unload-obj
[120]363 $(MAKE) -f $(MAKEFILE) all-builttools-stage2
364 rm -Rf $(PATH_OBJ)/stage1
365 mkdir -p $(PATH_OBJ)/stage1
366 if [ -d $(PATH_OBJ)/gcc ] ; then mv $(PATH_OBJ)/gcc $(PATH_OBJ)/stage1/gcc; fi
367 if [ -d $(PATH_OBJ)/emx ] ; then mv $(PATH_OBJ)/emx $(PATH_OBJ)/stage1/emx; fi
[363]368 if [ -d $(PATH_TOP)/src/emx/out ] ; then mv $(PATH_TOP)/src/emx/out $(PATH_OBJ)/stage1/emx_out; fi
[120]369 $(MAKE) -f $(MAKEFILE) all-preload
370 touch $@
371 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
372 @echo "+ Saving Stage 1 - done: $(shell date)"
373 @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
[25]374
[120]375all-stage2-it: \
376 all-banner-stage2 \
377 all-emx \
378 all-binutils \
379 all-gcc
380
381
382#
383# Install to bin tree makeing it ready for packing.
384#
385all-install: \
386 all-banner-install \
387 gcc-install \
388 emx-install \
389 all-banner-install-done \
390
391
392#
393# Generate all the diffs we have to supply.
394#
[109]395all-diff: \
396 gcc-diff \
397 binutils-diff \
398 emx-diff \
[34]399
[109]400
[120]401
402
403
404
[25]405###############################################################################
406###############################################################################
407###############################################################################
[34]408#
409# B u i l t T o o l s
410#
[25]411###############################################################################
412###############################################################################
413###############################################################################
[120]414.PHONY: all-builttools-initial all-builttools-dirs all-builttools-clean all-builttools-stage2
415
[34]416all-builttools-initial: \
[120]417 all-banner-builttools-initial \
418 all-builttools-clean \
[34]419 all-builttools-dirs \
[111]420 $(PATH_BUILTTOOLS)/bin/dllar.cmd \
[34]421
[121]422all-builttools-clean: \
423 all-preload-unload-obj
[120]424 rm -Rf $(PATH_BUILTTOOLS)
425
[34]426all-builttools-dirs:
[111]427 mkdir -p $(PATH_BUILTTOOLS)/bin $(PATH_BUILTTOOLS)/lib $(PATH_BUILTTOOLS)/include
[34]428
[363]429$(PATH_BUILTTOOLS)/bin/dllar.cmd $(PATH_BUILTTOOLS_TMP)/bin/dllar.cmd: $(PATH_TOP)/src/misc/dllar.cmd
[34]430 cp $< $@
431
[120]432all-builttools-stage2: \
433 all-banner-builttools-stage2 \
434 gcc-builttools-stage2 \
435 emx-builttools-stage2 \
[363]436 all-builttools-stage2-libs \
437 $(PATH_BUILTTOOLS_TMP)/bin/dllar.cmd \
438 all-builttools-clean
439 mv -f $(PATH_BUILTTOOLS_TMP) $(PATH_BUILTTOOLS)
440
[120]441all-builttools-stage2-libs:
[363]442 -for aoutlib in `find $(PATH_BUILTTOOLS_TMP) -name "*.a" | sed -e 's/\.a$$//' `; \
[120]443 do \
444 if [ ! -f $(aoutlib).lib ]; then \
445 echo " $${aoutlib}"; \
[396]446 $(PATH_BUILTTOOLS_TMP)/bin/emxomf.exe -p256 $${aoutlib}.a; \
[120]447 fi;\
448 done
[34]449
450
[89]451###############################################################################
452###############################################################################
453###############################################################################
454#
455# S y m l i n k s
456#
457#
458# We use symlinking of binutils stuff into the gcc tree so we can
459# build everything in one go and take advantage of the gcc
460# makesystem which will use the binutils we built when doing the
461# gcc libraries and such.
462#
463# On OS/2 symlinks doesn't exist so, we'll copy the source trees.
464# Copy because this will for directories work ok with cvs, moving
465# directories would cause 'cvs update -d' to refetch stuff.
466#
[109]467# IMPORTANT! Take care, the 'symlined' stuff will be removed at the
468# end of the build. Remeber to do all-symlinks-unlink before a fresh
469# build is started as the duplicated binutils things doesn't get
470# updated by cvs.
[89]471#
[109]472#
[89]473#w##############################################################################
474###############################################################################
475###############################################################################
[102]476all-symlinks: \
477 all-symlinks-binutils
[34]478
[109]479all-symlinks-unlink: \
480 all-symlinks-unlink-binutils
481
482
[89]483ifeq "$(BUILD_PLATFORM)" "OS2"
[265]484TOOL_SYMLINK_FILE = cp -p
485TOOL_SYMLINK_DIR = cp -pRf
[89]486TOOL_SYMLINK_MKDIR = mkdir
487TOOL_UNSYMLINK_DIR = rm -Rf
488else
489TOOL_SYMLINK_FILE = ln -s
490TOOL_SYMLINK_DIR = ln -s
491TOOL_SYMLINK_MKDIR = true
492TOOL_UNSYMLINK_DIR = rm
493endif
[102]494
495# ld is broken, so don't use it!
496# ld \
497
[89]498SYMLINKS_BINUTILS_TO_GCC_DIRS = \
499bfd \
500binutils \
501etc \
502gas \
503gprof \
504intl \
505opcodes \
506texinfo \
507include/aout \
508include/coff \
509include/elf \
510include/nlm \
511include/opcode \
512include/regs \
[34]513
[89]514SYMLINKS_BINUTILS_TO_GCC_FILES = \
515include/alloca-conf.h \
516include/ansidecl.h \
517include/bfdlink.h \
518include/bin-bugs.h \
519include/bout.h \
520include/callback.h \
521include/ChangeLog \
522include/COPYING \
523include/demangle.h \
524include/dis-asm.h \
525include/dyn-string.h \
526include/filenames.h \
527include/floatformat.h \
528include/fnmatch.h \
529include/fopen-bin.h \
530include/fopen-same.h \
531include/fopen-vms.h \
532include/gdbm.h \
533include/getopt.h \
534include/hashtab.h \
535include/hp-symtab.h \
536include/ieee.h \
537include/libiberty.h \
538include/MAINTAINERS \
539include/md5.h \
540include/oasys.h \
541include/objalloc.h \
542include/obstack.h \
543include/os9k.h \
544include/partition.h \
545include/progress.h \
546include/remote-sim.h \
547include/safe-ctype.h \
548include/sim-d10v.h \
549include/sort.h \
550include/splay-tree.h \
551include/symcat.h \
552
553# Symlink binutils stuff to gcc.
554# Note the test should've been "! -e", but that doesn' work in ash... :/
555all-symlinks-binutils:
556 for file in $(SYMLINKS_BINUTILS_TO_GCC_FILES); do \
557 if [ ! -f "$(PATH_TOP)/src/gcc/$$file" ]; then \
558 $(TOOL_SYMLINK_FILE) $(PATH_TOP)/src/binutils/$$file $(PATH_TOP)/src/gcc/$$file && \
[102]559 touch $(PATH_TOP)/src/gcc/.symlinked.`echo $${file} | sed -e 's@/@_@g'`; \
[89]560 fi ; \
561 done
562 for dir in $(SYMLINKS_BINUTILS_TO_GCC_DIRS) ; do \
563 if [ ! -d "$(PATH_TOP)/src/gcc/$$dir" ] ; then \
564 $(TOOL_SYMLINK_MKDIR) $(PATH_TOP)/src/gcc/$$dir && \
[102]565 touch $(PATH_TOP)/src/gcc/.symlinked.`echo $${dir} | sed -e 's@/@_@g'` && \
566 $(TOOL_SYMLINK_DIR) $(PATH_TOP)/src/binutils/$$dir $(PATH_TOP)/src/gcc/`echo $${dir}| sed -e '/\//!d' -e 's@\([a-zA-z0-9]*\)/.*@\1/@'` ; \
[89]567 fi ; \
568 done
[109]569 -ls -a1 src/gcc/.sym*
[89]570
571all-symlinks-unlink-binutils:
572 for file in $(SYMLINKS_BINUTILS_TO_GCC_FILES); do \
[102]573 if [ -f "$(PATH_TOP)/src/gcc/.symlinked.`echo $${file} | sed -e 's@/@_@g'`" ]; then \
[89]574 rm $(PATH_TOP)/src/gcc/$${file} && \
[102]575 rm $(PATH_TOP)/src/gcc/.symlinked.`echo $${file} | sed -e 's@/@_@g'` ; \
[89]576 fi ; \
577 done
578 for dir in $(SYMLINKS_BINUTILS_TO_GCC_DIRS) ; do \
[102]579 if [ -f "$(PATH_TOP)/src/gcc/.symlinked.`echo $${dir} | sed -e 's@/@_@g'`" ] ; then \
[89]580 $(TOOL_UNSYMLINK_DIR) $(PATH_TOP)/src/gcc/$${dir} && \
[102]581 rm $(PATH_TOP)/src/gcc/.symlinked.`echo $${dir} | sed -e 's@/@_@g'`; \
[89]582 fi ; \
583 done
[109]584 -ls -a1 src/gcc/.sym*
[89]585
586
[34]587###############################################################################
588###############################################################################
589###############################################################################
590#
591# G C C
592#
593###############################################################################
594###############################################################################
595###############################################################################
[25]596all-gcc gcc: \
597 gcc-autoconf-refresh \
598 gcc-build
[34]599 echo "Successfully build GCC."
[25]600
601
602
603GCC_DIRS = \
[34]604gcc/libiberty \
[41]605gcc/zlib \
[25]606gcc/gcc \
[41]607gcc/libstdc++-v3 \
608gcc/boehm-gc \
609gcc/fastjar \
610gcc/libf2c \
611gcc/libf2c/libF77 \
612gcc/libf2c/libI77 \
613gcc/libf2c/libU77 \
614gcc/libffi \
615gcc/libjava \
616gcc/libjava/libltdl \
617gcc/libobjc \
[90]618
[120]619# Here is a problem, we can't regenerate binutils makefiles when symlinked into
620# gcc. At least not yet. The result is messed up severely.
[90]621not_yet =\
[89]622gcc/bfd \
623gcc/binutils \
624gcc/gas \
625gcc/gprof \
626gcc/intl \
627gcc/ld \
628gcc/libiberty \
629gcc/opcodes \
[25]630
631GCC_CONFIGURE_DIRS = $(GCC_DIRS)
632
633
634# configure.in/configure
635.PHONY: gcc-autoconf-refresh gcc-autoconf-rerun gcc-autoconf-clean gcc-autoconf-remove
[34]636gcc-autoconf-refresh gcc-autoconf-rerun gcc-autoconf-clean gcc-autoconf-remove:
[84]637ifeq "$(BUILD_PLATFORM)" "LINUX"
638 -$(SH) $(PATH_TOP)/xfix.sh
639endif
[25]640 for dir in $(GCC_CONFIGURE_DIRS); do \
[96]641 if $(MAKE) $(@:gcc-autoconf-%=%) -f $(PWD)/config.gmk -C src/$$dir ; then \
642 true; \
643 else \
644 exit 8; \
645 fi \
[25]646 done
647
648
649# build the components.
[76]650.PHONY: gcc-build gcc-install gcc-configure
651gcc-build gcc-install gcc-configure:
[41]652 mkdir -p $(PATH_OBJ)/gcc
653 $(MAKE) -C $(PATH_OBJ)/gcc -f $(MAKEFILE) $@-it
654
[69]655
656# When changed directory
[76]657# We pass down BOOT_ flags for stage2+.
658# Because strip is broken on OS/2 we pass -s for release build and -g for
659# non release builds - This overrides some stuff in src/gcc/gcc/config/i386/t-emx!
[255]660# For the 2nd stage we need a hack for using the right specs when linking...
[282]661#SPEC_HACK = $(if $(wildchar $(PATH_OBJ)/.all-stage1),\
662# -specs $(PATH_TOP)/src/emx/src/lib/libc.specs, \
663# -specs $(PATH_TOP)/tools/x86.os2/gcc/staged/lib/gcc-lib/i386-pc-os2-emx/$(GCC_VERSION)/specs)
664SPECS_HACK =
[41]665gcc-build-it: \
666 $(PATH_OBJ)/gcc/.ts.configured
[69]667ifeq "$(BUILD_PLATFORM)" "OS2"
[96]668 unset GCCLOAD ; $(MAKE) -C $(PATH_OBJ)/gcc \
[266]669 LIBGCC2_DEBUG_CFLAGS="$(BUILD_DEBUGINFO)" \
670 CFLAGS="$(SPEC_HACK) $(BUILD_DEBUGINFO) -O2" \
671 CXXFLAGS="$(SPEC_HACK) $(BUILD_DEBUGINFO) -O2" \
672 BOOT_CFLAGS="$(SPEC_HACK) $(BUILD_DEBUGINFO) -O2 -mcpu=pentium -mpreferred-stack-boundary=2 -malign-strings=0 -falign-loops=2 -falign-jumps=2 -falign-functions=2" \
673 LDFLAGS="$(SPEC_HACK) $(BUILD_DEBUGINFO) -Zexe -Zcrtdll" \
674 BOOT_LDFLAGS="$(SPEC_HACK) $(BUILD_DEBUGINFO) -Zexe -Zcrtdll" \
[69]675 bootstrap
676else
677 $(MAKE) -C $(PATH_OBJ)/gcc bootstrap
678endif
679
680# configure it (invoked after directory change).
681# We set CC to help configure finding it.
[76]682gcc-configure-it $(PATH_OBJ)/gcc/.ts.configured: $(PATH_TOP)/src/gcc/configure
[69]683ifeq "$(BUILD_PLATFORM)" "OS2"
684 $(ASH) -c " \
685 export CC=\"gcc.exe\" ; \
[41]686 $< \
[68]687 --enable-clh \
[41]688 --enable-threads=os2 \
[203]689 --enable-shared=libgcc,bfd,opcodes \
[41]690 --enable-nls \
691 --without-included-gettext \
692 --with-local-prefix=$(subst \,/,$(PATH_EMXPGCC)) \
[109]693 --prefix=$(ALL_PREFIX) \
[41]694 --with-gnu-ld \
695 --with-gnu-as \
696 --disable-libgcj \
697 --enable-languages=c,c++ "
[69]698else
699 $(ASH) -c "$< \
[103]700 --disable-clh \
[203]701 --enable-shared=libgcc,bfd,opcodes \
[69]702 --enable-nls \
703 --without-included-gettext \
704 --with-local-prefix=$(subst \,/,$(PATH_EMXPGCC)) \
[109]705 --prefix=$(ALL_PREFIX) \
[69]706 --with-gnu-ld \
707 --with-gnu-as \
708 --disable-libgcj \
709 --enable-languages=c,c++ "
710endif
[41]711 touch $(PATH_OBJ)/gcc/.ts.configured
[103]712# TODO: Andy, on Linux --enable-clh result in linking errors.
713
[76]714# Install the GCC build
715# Repeating the prefix doesn't hurt anybody.
716gcc-install-it:
[265]717 $(MAKE) prefix=$(ALL_PREFIX) install
[25]718
[120]719
720
[111]721# easy, update src/gcc/gcc/version.c
722gcc-versionstamps:
723 @echo "Version stamping gcc..."
724 mv -f $(PATH_TOP)/src/gcc/gcc/version.c $(PATH_TOP)/src/gcc/gcc/version.tmp.c
725 sed -e '/version_string/s/\([0-9]\.[0-9]*\.[0-9]*\).*/\1 $(INNOTEK_VERSION)";/' \
726 $(PATH_TOP)/src/gcc/gcc/version.tmp.c > $(PATH_TOP)/src/gcc/gcc/version.c
727 rm -f $(PATH_TOP)/src/gcc/gcc/version.tmp.c
728
729
[120]730# Install to builttools directory.
[282]731## WARNING! Another spec HACK!
[120]732gcc-builttools-stage2:
[363]733 $(MAKE) -C $(PATH_OBJ)/gcc prefix=$(PATH_BUILTTOOLS_TMPD) install
[282]734## cp $(PATH_TOP)/src/emx/src/lib/libc.specs $(PATH_OBJ)/gcc/gcc/specs
[120]735
[111]736
[55]737# Generate diffs for GCC (v3.2.2) - part of packing a release.
[109]738.PHONY: gcc-diff $(ALL_PREFIX)/src/diffs/gcc-$(GCC_VERSION).diff
739gcc-diff: $(ALL_PREFIX)/src/diffs/gcc-$(GCC_VERSION).diff
740$(ALL_PREFIX)/src/diffs/gcc-$(GCC_VERSION).diff:
[55]741 mkdir -p $(@D)
[109]742 $(TOOL_CVS_DIFF_TREE) $(GCC_CVS_REL) src/gcc > $@
[25]743
[102]744
745
746
747
748
749
[55]750
[25]751###############################################################################
752###############################################################################
753###############################################################################
[34]754#
[25]755# B i n U t i l s
[34]756#
[25]757###############################################################################
758###############################################################################
759###############################################################################
[96]760
761BINUTILS_DIRS = \
762binutils/bfd \
763binutils/opcodes \
764binutils/gas \
765binutils/gprof \
766binutils/binutils \
767binutils/ld \
768
769BINUTILS_NOT_DIRS =\
770binutils/etc \
771binutils/libiberty \
772binutils/intl \
773
774
775BINUTILS_CONFIGURE_DIRS = $(BINUTILS_DIRS) $(BINUTILS_NOT_DIRS)
776
[25]777all-binutils binutils:
[89]778 echo "Binutils are build together with the other GNU Tools in GCC."
779 echo "Separate building of binutils is not configured."
[25]780
781
782
[96]783# configure.in/configure
784.PHONY: binutils-autoconf-refresh binutils-autoconf-rerun binutils-autoconf-clean binutils-autoconf-remove
785binutils-autoconf-refresh binutils-autoconf-rerun binutils-autoconf-clean binutils-autoconf-remove:
786ifeq "$(BUILD_PLATFORM)" "LINUX"
787 -$(SH) $(PATH_TOP)/xfix.sh
788endif
789 for dir in $(BINUTILS_CONFIGURE_DIRS); do \
790 if $(MAKE) $(@:binutils-autoconf-%=%) -f $(PWD)/config.gmk -C src/$$dir ; then \
791 true; \
792 else \
793 exit 8; \
794 fi \
795 done
796
797
798# build the components.
799.PHONY: binutils-build binutils-install binutils-configure
800binutils-build binutils-install binutils-configure:
801 mkdir -p $(PATH_OBJ)/binutils
802 $(MAKE) -C $(PATH_OBJ)/binutils -f $(MAKEFILE) $@-it
803
804
805# When changed directory
806binutils-build-it: \
807 $(PATH_OBJ)/binutils/.ts.configured
808 $(ASH) -c " unset GCCLOAD ; $(MAKE) -C $(PATH_OBJ)/binutils "
809
810# configure it (invoked after directory change).
811# We set CC to help configure finding it.
[98]812# And we reconfigure libiberty to the gcc one.
[96]813binutils-configure-it $(PATH_OBJ)/binutils/.ts.configured: $(PATH_TOP)/src/binutils/configure
814 $(ASH) -c " \
815 export CC=\"gcc.exe\" ; \
816 $< \
817 --enable-shared \
[109]818 --prefix=$(ALL_PREFIX) "
[98]819 $(ASH) -c "cd libiberty && \
820 $(PATH_TOP)/src/gcc/libiberty/configure \
[109]821 --prefix=$(ALL_PREFIX) "
[96]822 touch $(PATH_OBJ)/binutils/.ts.configured
823
824
825# Install the Binutils build
826# Repeating the prefix doesn't hurt anybody.
827binutils-install-it:
[111]828 $(MAKE) prefix=$(ALL_PREFIX) install
[96]829
830
[111]831# Not so easy, need to patch a few files.
832binutils-versionstamps:
833 @echo "Version stamping binutils..."
834 cp -f $(PATH_TOP)/src/binutils/binutils/version.c $(PATH_TOP)/src/binutils/binutils/version.tmp.c
835 sed -e '/printf.*program_version/s/%s %s.*\\n/%s %s $(INNOTEK_VERSION)\\n/' \
836 $(PATH_TOP)/src/binutils/binutils/version.tmp.c > $(PATH_TOP)/src/binutils/binutils/version.c
837 rm -f $(PATH_TOP)/src/binutils/binutils/version.tmp.c
838 if [ -f $(PATH_TOP)/src/gcc/binutils/version.c ]; then \
839 cp -f $(PATH_TOP)/src/gcc/binutils/version.c $(PATH_TOP)/src/gcc/binutils/version.tmp.c && \
840 sed -e '/printf.*program_version/s/%s %s.*\\n/%s %s $(INNOTEK_VERSION)\\n/' \
841 $(PATH_TOP)/src/gcc/binutils/version.tmp.c > $(PATH_TOP)/src/gcc/binutils/version.c && \
842 rm -f $(PATH_TOP)/src/gcc/binutils/version.tmp.c ; \
843 fi
844 @echo "Version stamping gas..."
845 cp -f $(PATH_TOP)/src/binutils/gas/as.c $(PATH_TOP)/src/binutils/gas/as.tmp.c
846 sed -e '/printf.*GNU.*assembler/s/%s.*\\n/%s $(INNOTEK_VERSION)\\n/' \
847 -e '/fprintf.*GNU.*assembler.*version.*BFD.*/s/using BFD version %s.*/using BFD version %s $(INNOTEK_VERSION)"),/ ' \
848 $(PATH_TOP)/src/binutils/gas/as.tmp.c > $(PATH_TOP)/src/binutils/gas/as.c
849 rm -f $(PATH_TOP)/src/binutils/gas/as.tmp.c
850 if [ -f $(PATH_TOP)/src/gcc/gas/as.c ]; then \
851 cp -f $(PATH_TOP)/src/gcc/gas/as.c $(PATH_TOP)/src/gcc/gas/as.tmp.c && \
852 sed -e '/printf.*GNU.*assembler/s/%s.*\\n/%s $(INNOTEK_VERSION)\\n/' \
853 -e '/fprintf.*GNU.*assembler.*version.*BFD.*/s/using BFD version %s.*/using BFD version %s $(INNOTEK_VERSION)"),/ ' \
854 $(PATH_TOP)/src/gcc/gas/as.tmp.c > $(PATH_TOP)/src/gcc/gas/as.c && \
855 rm -f $(PATH_TOP)/src/gcc/gas/as.tmp.c ; \
856 fi
857 @echo "Version stamping ld..."
858 cp -f $(PATH_TOP)/src/binutils/ld/ldver.c $(PATH_TOP)/src/binutils/ld/ldver.tmp.c
859 sed -e '/fprintf.*GNU.*ld.*version/s/(with BFD %s).*/(with BFD %s) $(INNOTEK_VERSION)\\n"),/' \
860 $(PATH_TOP)/src/binutils/ld/ldver.tmp.c > $(PATH_TOP)/src/binutils/ld/ldver.c
861 rm -f $(PATH_TOP)/src/binutils/ld/ldver.tmp.c
862 if [ -f $(PATH_TOP)/src/gcc/ld/ldver.c ]; then \
863 cp -f $(PATH_TOP)/src/gcc/ld/ldver.c $(PATH_TOP)/src/gcc/ld/ldver.tmp.c && \
864 sed -e '/fprintf.*GNU.*ld.*version/s/(with BFD %s).*/(with BFD %s) $(INNOTEK_VERSION)\\n"),/' \
865 $(PATH_TOP)/src/gcc/ld/ldver.tmp.c > $(PATH_TOP)/src/gcc/ld/ldver.c && \
866 rm -f $(PATH_TOP)/src/gcc/ld/ldver.tmp.c ; \
867 fi
868
[96]869
[111]870
[109]871# Generate diffs for Binutils (part of packing).
872.PHONY: binutils-diff $(ALL_PREFIX)/src/diffs/binutils-$(BINUTILS_VERSION).diff
873binutils-diff: $(ALL_PREFIX)/src/diffs/binutils-$(BINUTILS_VERSION).diff
874$(ALL_PREFIX)/src/diffs/binutils-$(BINUTILS_VERSION).diff:
[89]875 mkdir -p $(@D)
[109]876 $(TOOL_CVS_DIFF_TREE) $(BINUTILS_CVS_REL) src/binutils > $@
[98]877
878
879
[109]880
[98]881
[89]882
[25]883
[96]884
[25]885###############################################################################
886###############################################################################
887###############################################################################
[34]888#
[25]889# E M X
[34]890#
[25]891###############################################################################
892###############################################################################
893###############################################################################
[120]894all-emx emx: \
895 emx-build
896 @echo "Successfully build EMX."
[25]897
[120]898# Some helpers.
899# TODO: Change OUT and INS to the right ones. Currently not possible as
900# doing such breaks the rules generating.
901EMX_MODE = dbg
902ifeq "$(BUILD_MODE)" "RELEASE"
903EMX_MODE = opt
904endif
[265]905EMX_OUT = out/
[120]906EMX_INS = out/install/
[265]907EMX_RULES= $(PATH_TOP)/src/emx/$(EMX_OUT)$(EMX_MODE)/genrules.smak
908#EMX_OUT = $(PATH_OBJ)/emx/
909#EMX_INS = $(ALL_PREFIX)/
910#EMX_RULES= $(EMX_OUT)$(EMX_MODE)/genrules.smak
[120]911EMX_MASM = $(PATH_TOP)/tools/x86.os2/masm/v6.0/binp/ml.exe
912EMX_DEFINES = OUT=$(EMX_OUT) INS=$(EMX_INS) MODE=$(EMX_MODE) "ASM=$(EMX_MASM) -c"
[109]913
[120]914# build the components. (directory changer rules)
915.PHONY: emx-build emx-install emx-configure
916emx-build emx-install emx-configure:
917 mkdir -p $(PATH_OBJ)/emx
918 $(MAKE) -C $(PATH_TOP)/src/emx -f $(MAKEFILE) $@-it
919
920# This is the configure equivalent.
[265]921emx-configure-it: $(EMX_RULES)
922$(EMX_RULES):
923 rm -f $(EMX_RULES)
924 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) $(EMX_RULES)
[120]925
[265]926# make handle issue here. Make portions at the time.
927emx-build-it: $(EMX_RULES)
928 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) tools
[431]929 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) os2
930 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libc
931 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) app
932 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) alias
933 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) regexp
934 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libc-dll
935 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libsocket libdl
[265]936 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) libs
937 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) all
[120]938
[265]939emx-install-it: $(EMX_RULES)
940 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) INS=$(ALL_PREFIX)/ install
[120]941
942
943# easy, update same stuff in a bunch of files.
[223]944# actually, nothing any long as the global innotekversion.h takes care of it
945# together with proper dependencies.
[120]946EMX_FILE_VER = \
947emxbind/emxbind.h emxcat/emxcat.c emxdoc/emxdoc.c emxexp/emxexp.c emximp/emximp.c \
948emxload/emxload.c emxomf/emxaout.c emxomf/emxomf.c emxomf/emxomfar.c emxomf/emxomfld.c \
949emxomf/listomf.c emxstack/emxstack.c emxtsf/emxtsf.c os2/version.h
[111]950emx-versionstamps:
[120]951 @echo "Version stamping EMX..."
[109]952
[120]953# Install the compiled emx stuff to builttools.
[282]954##emx-builttools-stage2: emx-builttools-stage2-specs
955emx-builttools-stage2:
[363]956 $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) INS=$(PATH_BUILTTOOLS_TMP)/ install
[120]957
[282]958## bird: for now we will just replace the specs with the constantly updated libc specs.
[255]959emx-builttools-stage2-specs:
[363]960## -mv -f $(PATH_BUILTTOOLS_TMP)/lib/gcc-lib/i386-pc-os2-emx/$(GCC_VERSION)/specs \
961## $(PATH_BUILTTOOLS_TMP)/lib/gcc-lib/i386-pc-os2-emx/$(GCC_VERSION)/emxspecs
[282]962## cp $(PATH_TOP)/src/emx/src/lib/libc.specs \
[363]963## $(PATH_BUILTTOOLS_TMP)/lib/gcc-lib/i386-pc-os2-emx/$(GCC_VERSION)/specs
[120]964
[255]965
[109]966# Generate diffs for Binutils (part of packing).
967.PHONY: binutils-diff $(ALL_PREFIX)/src/diffs/emx-$(EMX_VERSION).diff
968emx-diff: $(ALL_PREFIX)/src/diffs/emx-$(EMX_VERSION).diff
969$(ALL_PREFIX)/src/diffs/emx-$(EMX_VERSION).diff:
970 mkdir -p $(@D)
971 $(TOOL_CVS_DIFF_TREE) $(EMX_CVS_REL) src/emx > $@
[111]972
[122]973
[402]974
975
976
977###############################################################################
978###############################################################################
979###############################################################################
980#
981# P A C K I N G
982#
983###############################################################################
984###############################################################################
985###############################################################################
986packing: packing-movetoinstall
987 rm -f $(PATH_BIN)/GCC-$(GCC_VERSION).zip
988 cd $(ALL_PREFIX)/.. ; zip -rX9 $(PATH_BIN)/GCC-$(GCC_VERSION).zip *
989
[122]990
[402]991# this stuff should be in the install rules.
992packing-movetoinstall:
993 mkdir -p $(ALL_PREFIX)/doc/GCC-$(GCC_VERSION)
994 mkdir -p $(ALL_PREFIX)/lib
995 cp $(PATH_TOP)/doc/ReleaseNotes.os2 $(ALL_PREFIX)/doc/GCC-$(GCC_VERSION)
996 cp $(PATH_TOP)/doc/Install.os2 $(ALL_PREFIX)/doc/GCC-$(GCC_VERSION)
997 cp $(PATH_TOP)/ChangeLog $(ALL_PREFIX)/doc/GCC-$(GCC_VERSION)/ChangeLog.os2
998 cp $(PATH_TOP)/src/install/MakeOmfLibs.cmd $(ALL_PREFIX)/lib
999 ar cr $(ALL_PREFIX)/lib/m.a
1000
1001
[122]1002###############################################################################
1003###############################################################################
1004###############################################################################
1005#
1006# M I S C
1007#
1008###############################################################################
1009###############################################################################
1010###############################################################################
1011
1012
1013dejagnu:
1014# nothing to make at the moment, it's just a all install stuff it seems.
1015
1016requires_autoconf_2_52_DEJAGNU_CONFIGURE_DIRS = \
1017src/misc/dejagnu \
1018src/misc/dejagnu/contrib/bluegnu2.0.3 \
1019src/misc/dejagnu/contrib/bluegnu2.0.3/doc \
1020src/misc/dejagnu/contrib/bluegnu2.0.3/example \
1021src/misc/dejagnu/contrib/bluegnu2.0.3/example/calc \
1022src/misc/dejagnu/contrib/bluegnu2.0.3/testsuite \
1023src/misc/dejagnu/example/calc \
1024src/misc/dejagnu/example/hello
1025
1026.PHONY: dejagnu-autoconf-refresh dejagnu-autoconf-rerun dejagnu-autoconf-clean dejagnu-autoconf-remove
1027dejagnu-autoconf-refresh dejagnu-autoconf-rerun dejagnu-autoconf-clean dejagnu-autoconf-remove:
1028ifeq "$(BUILD_PLATFORM)" "LINUX"
1029 -$(SH) $(PATH_TOP)/xfix.sh
1030endif
1031 for dir in $(DEJAGNU_CONFIGURE_DIRS); do \
1032 if $(MAKE) $(@:dejagnu-autoconf-%=%) -f $(PWD)/config.gmk -C $$dir ; then \
1033 true; \
1034 else \
1035 exit 8; \
1036 fi \
1037 done
1038
1039
1040
1041#
1042# Expect
1043#
1044
1045expect:
1046
1047
1048# build the components.
1049.PHONY: expect-build expect-install expect-configure
1050expect-build expect-install expect-configure:
1051 mkdir -p $(PATH_OBJ)/misc/expect
1052 $(MAKE) -C $(PATH_OBJ)/misc/expect -f $(MAKEFILE) $@-it
1053
1054
1055# When changed directory
1056expect-build-it: \
1057 $(PATH_OBJ)/misc/expect/.ts.configured
1058 $(MAKE) -C $(PATH_OBJ)/misc/expect
1059
1060# configure it (invoked after directory change).
1061# We set CC to help configure finding it.
1062# And we reconfigure libiberty to the gcc one.
1063expect-configure-it $(PATH_OBJ)/misc/expect/.ts.configured: $(PATH_TOP)/src/misc/expect/configure
1064ifeq "$(BUILD_PLATFORM)" "OS2"
1065 $(ASH) -c " \
1066 export CC=\"gcc.exe\" ; \
1067 $< \
1068 --disable-shared \
1069 --host=i386-pc-os2-emx \
1070 --with-tclconfig=$(UNIXROOT)/usr/lib \
1071 --with-tclinclude=$(UNIXROOT)/usr/lib/tcl8.0/include \
1072 --enable-gcc \
1073 $(BUILD_ENABLE_SYMBOLS) \
1074 --prefix=$(PATH_BUILTTOOLSD) "
1075else
1076 $(ASH) -c " \
1077 $< \
1078 --enable-gcc \
1079 $(BUILD_ENABLE_SYMBOLS) \
1080 --prefix=$(PATH_BUILTTOOLSD) "
1081endif
1082 touch $(PATH_OBJ)/misc/expect/.ts.configured
1083
1084
1085# install to builttools (if anywhere!)
1086expect-install-it:
1087 $(MAKE) prefix=$(PATH_BUILTTOOLSD) install
1088
1089
1090
1091EXPECT_CONFIGURE_DIRS = \
1092src/misc/expect
1093# skipping testsuite for now as it requires some .m4 files we don't have.
1094#src/misc/expect/testsuite
1095
1096.PHONY: expect-autoconf-refresh expect-autoconf-rerun expect-autoconf-clean expect-autoconf-remove
1097expect-autoconf-refresh expect-autoconf-rerun expect-autoconf-clean expect-autoconf-remove:
1098ifeq "$(BUILD_PLATFORM)" "LINUX"
1099 -$(SH) $(PATH_TOP)/xfix.sh
1100endif
1101 for dir in $(EXPECT_CONFIGURE_DIRS); do \
1102 if $(MAKE) $(@:expect-autoconf-%=%) -f $(PWD)/config.gmk -C $$dir ; then \
1103 true; \
1104 else \
1105 exit 8; \
1106 fi \
1107 done
1108
[402]1109
[122]1110
1111
[132]1112# DO NOT DELETE
Note: See TracBrowser for help on using the repository browser.