1992-07-10 23:24:19 +02:00
|
|
|
###
|
|
|
|
### Makefile used to three-stage build a tree of source code. Also used to
|
|
|
|
### compile other bundles, first with cc, then with gcc.
|
|
|
|
###
|
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
###
|
|
|
|
### USE OF THIS FILE REQUIRES GNU MAKE!!!
|
|
|
|
###
|
|
|
|
|
|
|
|
### The first versions of the file were written by Rich Pixley (rich@cygnus.com).
|
|
|
|
### Many subsequent additions (and current maintainance by) david d `zoo' zuhn,
|
|
|
|
### (zoo@cygnus.com).
|
1992-07-10 23:24:19 +02:00
|
|
|
|
|
|
|
### Every invocation of this Makefile needs to have a variable set (host),
|
|
|
|
### which is the named used for ./configure, and also the prefix for the
|
|
|
|
### various files and directories used in a three stage.
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
### The variable target may be set for the target of a cross-compilation.
|
|
|
|
|
|
|
|
### The variable build may be to build a tree on a machine other than the host.
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
ifndef host
|
1992-11-23 02:40:05 +01:00
|
|
|
error:
|
|
|
|
@echo You must set the variable \"host\" to use this Makefile ; exit 1
|
1992-07-10 23:24:19 +02:00
|
|
|
else
|
|
|
|
|
|
|
|
### from here to very near the end of the file is the real guts of this
|
|
|
|
### Makefile, and it is not seen if the variable 'host' is not set
|
|
|
|
|
|
|
|
### from which cvs tree are we working?
|
1992-07-10 23:29:16 +02:00
|
|
|
TREE := devo
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-05-21 00:20:07 +02:00
|
|
|
include $(TREE)/release-info
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
# Set TIME to time to get timings. Not done by default because time
|
|
|
|
# ignores the exit status.
|
|
|
|
TIME :=
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
CONFIG_SHELL :=
|
1995-05-18 11:27:23 +02:00
|
|
|
GCC := $(host)-gcc
|
|
|
|
GNUCFLAGS := -g -O2
|
|
|
|
GNUC := CC="$(GCC)" CFLAGS="$(GNUCFLAGS)"
|
1992-11-23 02:40:05 +01:00
|
|
|
CFLAGS := -g
|
1994-10-20 18:49:11 +01:00
|
|
|
CXXFLAGS := -g -O2
|
1992-11-23 02:40:05 +01:00
|
|
|
GNU_MAKE := /usr/latest/bin/make -w
|
1993-07-08 02:57:49 +02:00
|
|
|
MAKEINFOFLAGS :=
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
override MAKE := make -w
|
1992-11-23 02:40:05 +01:00
|
|
|
override MFLAGS :=
|
|
|
|
#override MAKEFLAGS :=
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
SHELL := /bin/sh
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
ifndef build
|
|
|
|
build := $(host)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef target
|
|
|
|
target := $(host)
|
|
|
|
endif
|
|
|
|
|
1994-05-18 02:03:28 +02:00
|
|
|
ifeq ($(patsubst %-lynx,lynx,$(host)),lynx)
|
|
|
|
SHELL := /bin/bash
|
|
|
|
GNU_MAKE := $(MAKE)
|
|
|
|
CONFIG_SHELL := /bin/bash
|
|
|
|
endif
|
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
ifeq ($(patsubst %-m68k-hp-hpux,m68k-hp-hpux,$(host)),m68k-hp-hpux)
|
|
|
|
SHELL := /usr/unsupported/bin/bash
|
|
|
|
GNU_MAKE := $(MAKE)
|
|
|
|
CONFIG_SHELL := /usr/unsupported/bin/bash
|
|
|
|
endif
|
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
ifneq ($(build),$(host))
|
1993-05-10 21:51:37 +02:00
|
|
|
|
|
|
|
# We are building on a machine other than the host. We rely upon
|
|
|
|
# previously built cross-compilers from the build machine to the host
|
|
|
|
# (used to build the executables) and from the build machine to the
|
|
|
|
# target (used to build the libraries).
|
|
|
|
|
|
|
|
AR := $(host)-ar
|
|
|
|
AR_FOR_TARGET := $(target)-ar
|
|
|
|
AS := $(host)-as
|
|
|
|
AS_FOR_TARGET := $(target)-as
|
1993-11-09 23:07:50 +01:00
|
|
|
BISON := byacc
|
1993-05-10 21:51:37 +02:00
|
|
|
CC := $(host)-gcc
|
|
|
|
CC_FOR_BUILD := gcc
|
|
|
|
CC_FOR_TARGET := $(target)-gcc
|
1995-05-18 11:27:23 +02:00
|
|
|
CFLAGS := $(GNUCFLAGS)
|
1994-10-20 18:49:11 +01:00
|
|
|
CXX := $(host)-gcc
|
|
|
|
CXX_FOR_TARGET := $(target)-gcc
|
1995-05-18 11:27:23 +02:00
|
|
|
GCC := $(host)-gcc
|
1993-05-10 21:51:37 +02:00
|
|
|
GXX := $(host)-g++
|
|
|
|
GXX_FOR_TARGET := $(target)-g++
|
|
|
|
HOST_PREFIX := $(build)-
|
|
|
|
HOST_PREFIX_1 := $(build)-
|
1993-11-09 23:07:50 +01:00
|
|
|
LEX := flex
|
1993-05-10 21:51:37 +02:00
|
|
|
MAKEINFO := makeinfo
|
1994-05-18 02:03:28 +02:00
|
|
|
MUNCH_NM := $(host)-nm
|
1993-05-10 21:51:37 +02:00
|
|
|
NM := $(host)-nm
|
|
|
|
NM_FOR_TARGET := $(target)-nm
|
|
|
|
RANLIB := $(host)-ranlib
|
|
|
|
RANLIB_FOR_TARGET := $(target)-ranlib
|
1993-11-09 23:07:50 +01:00
|
|
|
YACC := $(BISON)
|
|
|
|
|
1994-05-18 02:03:28 +02:00
|
|
|
ifeq ($(host),i386-go32)
|
|
|
|
MAKEINFOFLAGS = --no-split
|
1993-11-09 23:07:50 +01:00
|
|
|
endif
|
1993-05-10 21:51:37 +02:00
|
|
|
|
|
|
|
FLAGS_TO_PASS := \
|
|
|
|
"AR=$(AR)" \
|
|
|
|
"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
|
|
|
|
"AS=$(AS)" \
|
|
|
|
"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
|
1993-11-09 23:07:50 +01:00
|
|
|
"BISON=$(BISON)" \
|
1993-05-10 21:51:37 +02:00
|
|
|
"CC=$(CC)" \
|
|
|
|
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
|
|
|
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
|
|
|
|
"CXX=$(CXX)" \
|
|
|
|
"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
|
|
|
|
"CFLAGS=$(CFLAGS)" \
|
1993-07-08 02:57:49 +02:00
|
|
|
"CXXFLAGS=$(CXXFLAGS)" \
|
1993-05-10 21:51:37 +02:00
|
|
|
"GCC=$(GCC)" \
|
|
|
|
"HOST_PREFIX=$(HOST_PREFIX)" \
|
|
|
|
"HOST_PREFIX_1=$(HOST_PREFIX_1)" \
|
1993-11-09 23:07:50 +01:00
|
|
|
"LEX=$(LEX)" \
|
1993-05-10 21:51:37 +02:00
|
|
|
"MAKEINFO=$(MAKEINFO)" \
|
1993-07-08 02:57:49 +02:00
|
|
|
"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
|
1993-05-10 21:51:37 +02:00
|
|
|
"MF=$(MF)" \
|
1994-05-18 02:03:28 +02:00
|
|
|
"MUNCH_NM=$(MUNCH_NM)" \
|
1993-05-10 21:51:37 +02:00
|
|
|
"NM=$(NM)" \
|
|
|
|
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
|
|
|
|
"RANLIB=$(RANLIB)" \
|
|
|
|
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
|
|
|
|
"RELEASE_TAG=$(RELEASE_TAG)" \
|
1993-11-09 23:07:50 +01:00
|
|
|
"RUNTEST=$(relbindir)/runtest" \
|
1993-11-10 00:32:04 +01:00
|
|
|
"SHELL=$(SHELL)" \
|
1993-05-10 21:51:37 +02:00
|
|
|
"TIME=$(TIME)" \
|
1993-11-09 23:07:50 +01:00
|
|
|
"YACC=$(YACC)" \
|
1993-05-10 21:51:37 +02:00
|
|
|
"build=$(build)" \
|
|
|
|
"host=$(host)"
|
|
|
|
|
|
|
|
# We must pass the build cross host tools in the environment of
|
|
|
|
# configure, so that autoconf scripts will run the right programs.
|
|
|
|
configenv := AR="$(AR)" CC="$(CC)" RANLIB="$(RANLIB)"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
# This is a normal build on the host machine.
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
FLAGS_TO_PASS := \
|
|
|
|
"GCC=$(GCC)" \
|
1992-11-23 02:40:05 +01:00
|
|
|
"CFLAGS=$(CFLAGS)" \
|
1993-07-08 02:57:49 +02:00
|
|
|
"CXXFLAGS=$(CXXFLAGS)" \
|
1992-07-10 23:24:19 +02:00
|
|
|
"TIME=$(TIME)" \
|
1993-07-08 02:57:49 +02:00
|
|
|
"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
|
1992-11-23 02:40:05 +01:00
|
|
|
"MF=$(MF)" \
|
1993-04-01 21:56:32 +02:00
|
|
|
"host=$(host)" \
|
1994-05-18 02:03:28 +02:00
|
|
|
"RELEASE_TAG=$(RELEASE_TAG)" \
|
|
|
|
"SHELL=$(SHELL)"
|
1992-11-23 02:40:05 +01:00
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
configenv :=
|
|
|
|
|
1993-02-13 12:11:42 +01:00
|
|
|
endif
|
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
#### we need to change the default C compiler for some hosts
|
|
|
|
ifeq ($(host),sparc-sun-solaris2)
|
|
|
|
CC := cc -Xs
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(host),mips-sgi-irix4)
|
1994-04-11 20:00:46 +02:00
|
|
|
CC := cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
|
1993-11-09 23:07:50 +01:00
|
|
|
endif
|
1993-05-10 21:51:37 +02:00
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
ifeq ($(host),hppa1.1-hp-hpux)
|
|
|
|
CC := cc -Wp,-H256000
|
|
|
|
endif
|
|
|
|
|
1995-05-18 11:27:23 +02:00
|
|
|
ifeq ($(host),m68k-hp-hpux)
|
|
|
|
CC := cc -Wp,-P,-H256000
|
|
|
|
endif
|
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
ifeq ($(host),mips-mips-riscos5sysv)
|
1993-11-09 23:07:50 +01:00
|
|
|
CC := cc -non_shared -systype sysv
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(host),mips-dec-ultrix)
|
|
|
|
CC := cc -Wf,-XNg1000
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(host),m68k-sun-sunos4.1.1)
|
|
|
|
CC := cc -J
|
|
|
|
endif
|
|
|
|
|
1995-05-18 11:27:23 +02:00
|
|
|
# Support gdbtk everywhere
|
|
|
|
configargs = --enable-gdbtk
|
|
|
|
|
1994-04-11 20:00:46 +02:00
|
|
|
# We want to use stabs for MIPS targets.
|
|
|
|
ifeq ($(target),mips-idt-ecoff)
|
1995-05-18 11:27:23 +02:00
|
|
|
configargs := $(configargs) --with-stabs
|
1994-04-11 20:00:46 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(target),mips-dec-ultrix)
|
1995-05-18 11:27:23 +02:00
|
|
|
configargs := $(configargs) --with-stabs
|
1994-04-11 20:00:46 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(target),mips-sgi-irix4)
|
1995-05-18 11:27:23 +02:00
|
|
|
configargs := $(configargs) --with-stabs
|
1994-04-11 20:00:46 +02:00
|
|
|
endif
|
|
|
|
|
1995-05-18 11:27:23 +02:00
|
|
|
ifeq ($(target),mips-sgi-irix5)
|
|
|
|
configargs := $(configargs) --with-stabs
|
1994-10-20 18:49:11 +01:00
|
|
|
endif
|
|
|
|
|
1995-05-18 11:27:23 +02:00
|
|
|
ifeq ($(patsubst alpha-dec-osf%,alpha,$(target)),alpha)
|
|
|
|
configargs := $(configargs) --with-stabs
|
1994-10-20 18:49:11 +01:00
|
|
|
endif
|
|
|
|
|
1994-04-11 20:00:46 +02:00
|
|
|
# We must use stabs for SVR4 targets.
|
|
|
|
ifeq ($(target),i386-sysv4.2)
|
1995-05-18 11:27:23 +02:00
|
|
|
configargs := $(configargs) --with-stabs
|
1994-04-11 20:00:46 +02:00
|
|
|
endif
|
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
ifneq ($(CC), 'cc')
|
|
|
|
FLAGS_TO_PASS := "CC=$(CC)" $(FLAGS_TO_PASS)
|
1993-05-10 21:51:37 +02:00
|
|
|
endif
|
|
|
|
|
1994-04-11 20:00:46 +02:00
|
|
|
#### and on some, we need CONFIG_SHELL
|
|
|
|
ifeq ($(patsubst %-lynxos,lynxos,$(host)),lynxos)
|
|
|
|
FLAGS_TO_PASS := "CONFIG_SHELL=$(CONFIG_SHELL)" $(FLAGS_TO_PASS)
|
|
|
|
endif
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
# These are the prefixes used for Cygnus builds.
|
1993-04-01 20:50:31 +02:00
|
|
|
prefixes = --prefix=$(release_root) --exec-prefix=$(release_root)/H-$(host)
|
1992-11-23 02:40:05 +01:00
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
relbindir = $(release_root)/H-$(build)/bin
|
1992-07-10 23:24:19 +02:00
|
|
|
|
|
|
|
### general config stuff
|
1992-11-23 02:40:05 +01:00
|
|
|
WORKING_DIR := $(host)-objdir
|
|
|
|
STAGE1DIR := $(WORKING_DIR).1
|
|
|
|
STAGE2DIR := $(WORKING_DIR).2
|
|
|
|
STAGE3DIR := $(WORKING_DIR).3
|
1993-11-09 23:07:50 +01:00
|
|
|
STAGE4DIR := $(WORKING_DIR).4
|
1992-11-23 02:40:05 +01:00
|
|
|
INPLACEDIR := $(host)-in-place
|
1993-05-10 21:51:37 +02:00
|
|
|
|
|
|
|
# Arrange to find the needed programs. If we are building on a
|
|
|
|
# machine other than the host, we must find the cross-compilers.
|
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
ifneq ($(build),$(host))
|
1993-05-10 21:51:37 +02:00
|
|
|
|
|
|
|
holesys := $(build)
|
|
|
|
HOLESSTAMP := $(holesys)-stamp-holes $(build)-x-$(host)-stamp-holes $(build)-x-$(target)-stamp-holes
|
|
|
|
HOLESDIR := $(holesys)-holes
|
|
|
|
BUILD_HOST_HOLES_DIR := $(build)-x-$(host)-holes
|
|
|
|
BUILD_TARGET_HOLES_DIR := $(build)-x-$(target)-holes
|
|
|
|
|
1993-11-10 00:32:04 +01:00
|
|
|
SET_NATIVE_HOLES := SHELL=$(SHELL) ; PATH=`pwd`/$(HOLESDIR):`pwd`/$(BUILD_HOST_HOLES_DIR):`pwd`/$(BUILD_TARGET_HOLES_DIR) ; export PATH ; export SHELL ;
|
|
|
|
SET_CYGNUS_PATH := SHELL=$(SHELL) ; PATH=`pwd`/$(HOLESDIR):`pwd`/$(BUILD_HOST_HOLES_DIR):`pwd`/$(BUILD_TARGET_HOLES_DIR) ; export PATH ; export SHELL ;
|
|
|
|
SET_LATEST_PATH := SHELL=$(SHELL) ; PATH=/usr/latest/bin:`pwd`/$(HOLESDIR):`pwd`/$(BUILD_HOST_HOLES_DIR):`pwd`/$(BUILD_TARGET_HOLES_DIR) ; export PATH ; export SHELL ;
|
1993-05-10 21:51:37 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
holesys := $(host)
|
|
|
|
HOLESSTAMP := $(holesys)-stamp-holes
|
|
|
|
HOLESDIR := $(holesys)-holes
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-11-10 00:32:04 +01:00
|
|
|
SET_NATIVE_HOLES := SHELL=$(SHELL) ; PATH=`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
|
|
|
|
SET_CYGNUS_PATH := SHELL=$(SHELL) ; PATH=$(relbindir):`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
|
|
|
|
SET_LATEST_PATH := SHELL=$(SHELL) ; PATH=/usr/latest/bin:`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
|
1993-01-29 00:11:07 +01:00
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
endif
|
1993-01-29 00:11:07 +01:00
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
.PHONY: all
|
1993-07-08 02:57:49 +02:00
|
|
|
ifneq ($(target),$(host))
|
1992-11-23 02:40:05 +01:00
|
|
|
##
|
|
|
|
## This is a cross compilation
|
|
|
|
##
|
|
|
|
arch = $(host)-x-$(target)
|
1993-05-10 21:51:37 +02:00
|
|
|
config = -host=$(host) -target=$(target)
|
1992-11-23 02:40:05 +01:00
|
|
|
FLAGS_TO_PASS := $(FLAGS_TO_PASS) "target=$(target)"
|
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
ifeq ($(patsubst %-lynx,lynx,$(target)),lynx)
|
|
|
|
configargs := $(configargs) --with-headers=/s1/cygnus/dejagnu/$(target)/include \
|
|
|
|
--with-libs=/s1/cygnus/dejagnu/$(target)/lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(patsubst %-i386-sysv4.2,i386-sysv4.2,$(target)),i386-sysv4.2)
|
|
|
|
configargs := $(configargs) --with-headers=/s1/cygnus/dejagnu/$(target)/include \
|
|
|
|
--with-libs=/s1/cygnus/dejagnu/$(target)/lib
|
|
|
|
endif
|
|
|
|
|
1995-05-18 11:27:23 +02:00
|
|
|
ifeq ($(patsubst %-i386-netware,i386-netware,$(target)),i386-netware)
|
|
|
|
configargs := $(configargs) \
|
|
|
|
--with-headers=/s1/cygnus/dejagnu/$(target)/include \
|
|
|
|
--with-libs=/s1/cygnus/dejagnu/$(target)/lib
|
|
|
|
endif
|
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
ifeq ($(patsubst %-sparc-sun-sunos4.1.3,sparc-sun-sunos4.1.3,$(target)),sparc-sun-sunos4.1.3)
|
1995-05-18 11:27:23 +02:00
|
|
|
configargs := $(configargs) \
|
|
|
|
--with-headers=/s1/cygnus/dejagnu/$(target)/include \
|
|
|
|
--with-libs=/s1/cygnus/dejagnu/$(target)/lib
|
1994-10-20 18:49:11 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(patsubst %-sparc-sun-solaris2,sparc-sun-solaris2,$(target)),sparc-sun-solaris2)
|
1995-05-18 11:27:23 +02:00
|
|
|
configargs := $(configargs) \
|
|
|
|
--with-headers=/s1/cygnus/dejagnu/$(target)/include \
|
|
|
|
--with-libs=/s1/cygnus/dejagnu/$(target)/lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(patsubst %-i960-vxworks5.1,i960-vxworks5.1,$(target)),i960-vxworks5.1)
|
|
|
|
configargs := $(configargs) \
|
|
|
|
--with-headers=/s1/cygnus/dejagnu/$(target)/include
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(patsubst %-m68k-vxworks5.1,m68k-vxworks5.1,$(target)),m68k-vxworks5.1)
|
|
|
|
configargs := $(configargs) \
|
|
|
|
--with-headers=/s1/cygnus/dejagnu/$(target)/include
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(patsubst %-i386-unixware,i386-unixware,$(target)),i386-unixware)
|
|
|
|
configargs := $(configargs) \
|
|
|
|
--with-headers=/s1/cygnus/dejagnu/$(target)/include \
|
|
|
|
--with-libs=/s1/cygnus/dejagnu/$(target)/lib
|
1994-10-20 18:49:11 +01:00
|
|
|
endif
|
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
ifneq ($(build),$(host))
|
1993-05-10 21:51:37 +02:00
|
|
|
all: do-cygnus do-latest
|
|
|
|
build-all: build-cygnus build-latest
|
|
|
|
else
|
1992-11-23 02:40:05 +01:00
|
|
|
all: do-native do-latest
|
|
|
|
build-all: build-native build-latest
|
1993-05-10 21:51:37 +02:00
|
|
|
endif
|
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
|
|
|
|
else
|
|
|
|
##
|
|
|
|
## This is a native compilation
|
|
|
|
##
|
1993-03-20 05:51:42 +01:00
|
|
|
arch = $(host)
|
1993-05-10 21:51:37 +02:00
|
|
|
config = -host=$(host)
|
1993-07-08 02:57:49 +02:00
|
|
|
ifneq ($(build),$(host))
|
1993-05-10 21:51:37 +02:00
|
|
|
all: do-cygnus do-latest
|
|
|
|
else
|
1992-11-23 02:40:05 +01:00
|
|
|
all: $(host)-stamp-3stage-done
|
1993-05-10 21:51:37 +02:00
|
|
|
endif
|
1992-11-23 02:40:05 +01:00
|
|
|
#all: in-place do1 do2 do3 comparison
|
1993-05-10 21:51:37 +02:00
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
endif
|
|
|
|
|
1993-03-20 05:51:42 +01:00
|
|
|
NATIVEDIR := $(arch)-native-objdir
|
|
|
|
CYGNUSDIR := $(arch)-cygnus-objdir
|
|
|
|
LATESTDIR := $(arch)-latest-objdir
|
1993-11-09 23:07:50 +01:00
|
|
|
DOSDIR := dos-x-$(target)-objdir
|
1993-03-20 05:51:42 +01:00
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
everything: do-cross
|
|
|
|
#everything: in-place do1 do2 do3 comparison do-cygnus
|
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
.PHONY: dos
|
|
|
|
dos:
|
|
|
|
$(MAKE) -f test-build.mk CFLAGS= build=$(host) host=i386-go32 target=$(target) do-dos
|
|
|
|
dos-path:
|
|
|
|
$(MAKE) -f test-build.mk CFLAGS= build=$(host) host=i386-go32 target=$(target) path-dos
|
|
|
|
|
|
|
|
.PHONY: do-dos
|
|
|
|
do-dos: $(HOLESSTAMP) dos-x-$(target)-stamp-done
|
|
|
|
build-dos: $(HOLESSTAMP) dos-x-$(target)-stamp-dos-checked
|
|
|
|
config-dos: $(HOLESSTAMP) dos-x-$(target)-stamp-dos-configured
|
|
|
|
path-dos:
|
|
|
|
@echo "$(SET_CYGNUS_PATH)"
|
|
|
|
|
|
|
|
dos-x-$(target)-stamp-done:
|
|
|
|
[ -f $(relbindir)/$(host)-gcc ] || (echo "must have gcc available"; exit 1)
|
|
|
|
$(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) -f test-build.mk dos-x-$(target)-stamp-installed $(FLAGS_TO_PASS)
|
|
|
|
if [ -f CLEAN_ALL -o -f CLEAN_CROSSES ] ; then rm -rf $(DOSDIR) ; else true ; fi
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
dos-x-$(target)-stamp-installed: $(HOLESSTAMP) dos-x-$(target)-stamp-intermediate
|
|
|
|
[ -d dos-x-$(target)-installed ] || mkdir dos-x-$(target)-installed
|
|
|
|
$(SET_CYGNUS_PATH) $(TREE)/release/mkdosrel dos-x-$(target)-intermediate \
|
|
|
|
dos-x-$(target)-installed $(target)
|
|
|
|
# (cd dos-x-$(target)-installed; find . -print | $(TREE)/release/make8.3)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
dos-x-$(target)-stamp-intermediate: $(HOLESSTAMP) dos-x-$(target)-stamp-dos-checked
|
|
|
|
[ -d dos-x-$(target)-intermediate ] || mkdir dos-x-$(target)-intermediate
|
|
|
|
dir=`pwd` ; export dir ; \
|
|
|
|
$(SET_CYGNUS_PATH) cd $(DOSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) \
|
|
|
|
prefix=$$dir/dos-x-$(target)-intermediate install install-info
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
dos-x-$(target)-stamp-dos-checked: $(HOLESSTAMP) dos-x-$(target)-stamp-dos-built
|
|
|
|
# cd $(DOSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
dos-x-$(target)-stamp-dos-built: $(HOLESSTAMP) dos-x-$(target)-stamp-dos-configured
|
|
|
|
$(SET_CYGNUS_PATH) cd $(DOSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all info
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
dos-x-$(target)-stamp-dos-configured: $(HOLESSTAMP)
|
|
|
|
[ -d $(DOSDIR) ] || mkdir $(DOSDIR)
|
|
|
|
$(SET_CYGNUS_PATH) cd $(DOSDIR) ; $(GNUC) $(configenv) $(TIME) $(CONFIG_SHELL) \
|
|
|
|
../$(TREE)/configure $(config) -v --srcdir=../$(TREE) --prefix=/cygnus \
|
|
|
|
--program-transform-name='' $(configargs)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
.PHONY: do-native
|
1993-05-10 21:51:37 +02:00
|
|
|
do-native: $(HOLESSTAMP) $(arch)-stamp-native
|
1992-11-23 02:40:05 +01:00
|
|
|
do-native-config: $(arch)-stamp-native-configured
|
1993-05-10 21:51:37 +02:00
|
|
|
build-native: $(HOLESSTAMP) $(arch)-stamp-native-checked
|
|
|
|
config-native: $(HOLESSTAMP) $(arch)-stamp-native-configured
|
1992-11-23 02:40:05 +01:00
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-native: $(HOLESSTAMP)
|
1993-02-13 12:11:42 +01:00
|
|
|
$(SET_NATIVE_HOLES) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-native-installed $(FLAGS_TO_PASS)
|
1993-11-09 23:07:50 +01:00
|
|
|
if [ -f CLEAN_ALL -o -f CLEAN_CROSSES ] ; then rm -rf $(NATIVEDIR) ; else true ; fi
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $(arch)-stamp-native
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-native-installed: $(HOLESSTAMP) $(arch)-stamp-native-checked
|
1993-02-13 12:11:42 +01:00
|
|
|
$(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) install
|
|
|
|
$(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) install-info
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(arch)-stamp-native-checked: $(arch)-stamp-native-built
|
|
|
|
# cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) check
|
|
|
|
touch $@
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-native-built: $(HOLESSTAMP) $(arch)-stamp-native-configured
|
1993-02-13 12:11:42 +01:00
|
|
|
$(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) all
|
|
|
|
$(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) info
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-native-configured: $(HOLESSTAMP)
|
1992-11-23 02:40:05 +01:00
|
|
|
[ -d $(NATIVEDIR) ] || mkdir $(NATIVEDIR)
|
1993-11-09 23:07:50 +01:00
|
|
|
$(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(configenv) CC="$(CC)" $(TIME) $(CONFIG_SHELL) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: do-cygnus
|
1993-05-10 21:51:37 +02:00
|
|
|
do-cygnus: $(HOLESSTAMP) $(arch)-stamp-cygnus
|
|
|
|
build-cygnus: $(HOLESSTAMP) $(arch)-stamp-cygnus-checked
|
|
|
|
config-cygnus: $(HOLESSTAMP) $(arch)-stamp-cygnus-configured
|
1993-11-09 23:07:50 +01:00
|
|
|
path-cygnus:
|
|
|
|
$(SET_CYGNUS_PATH) echo $$PATH
|
1992-11-23 02:40:05 +01:00
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
vault-cygnus: $(HOLESSTAMP) $(arch)-stamp-cygnus-built
|
|
|
|
$(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) vault-install
|
|
|
|
|
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
$(arch)-stamp-cygnus:
|
1993-07-08 02:57:49 +02:00
|
|
|
[ -f $(relbindir)/$(host)-gcc ] || (echo "must have gcc available"; exit 1)
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-cygnus-installed $(FLAGS_TO_PASS)
|
1993-11-09 23:07:50 +01:00
|
|
|
if [ -f CLEAN_ALL -o -f CLEAN_CROSSES ] ; then rm -rf $(CYGNUSDIR) ; else true ; fi
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $(arch)-stamp-cygnus
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-cygnus-installed: $(HOLESSTAMP) $(arch)-stamp-cygnus-checked
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install
|
|
|
|
$(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install-info
|
1993-11-09 23:07:50 +01:00
|
|
|
if [ -f VAULT-INSTALL ] ; then \
|
|
|
|
$(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(MAKE) $(FLAGS_TO_PASS) $(GNUC) vault-install ; \
|
1994-04-11 20:00:46 +02:00
|
|
|
else true ; fi
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-cygnus-checked: $(HOLESSTAMP) $(arch)-stamp-cygnus-built
|
1992-11-23 02:40:05 +01:00
|
|
|
# cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
|
|
|
|
touch $@
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-cygnus-built: $(HOLESSTAMP) $(arch)-stamp-cygnus-configured
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all
|
|
|
|
$(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) info
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-cygnus-configured: $(HOLESSTAMP)
|
1992-11-23 02:40:05 +01:00
|
|
|
[ -d $(CYGNUSDIR) ] || mkdir $(CYGNUSDIR)
|
1993-11-09 23:07:50 +01:00
|
|
|
$(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(configenv) $(GNUC) $(TIME) $(CONFIG_SHELL) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
.PHONY: do-latest
|
1993-05-10 21:51:37 +02:00
|
|
|
do-latest: $(HOLESSTAMP) $(arch)-stamp-latest
|
|
|
|
build-latest: $(HOLESSTAMP) $(arch)-stamp-latest-checked
|
1992-11-23 02:40:05 +01:00
|
|
|
|
|
|
|
$(arch)-stamp-latest:
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_LATEST_PATH) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-latest-installed $(FLAGS_TO_PASS)
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $(arch)-stamp-latest
|
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(arch)-stamp-latest-installed: $(HOLESSTAMP) $(arch)-stamp-latest-checked
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install
|
|
|
|
$(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install-info
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(arch)-stamp-latest-checked: $(arch)-stamp-latest-built
|
1993-01-29 00:11:07 +01:00
|
|
|
# $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(arch)-stamp-latest-built: $(arch)-stamp-latest-configured
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all
|
|
|
|
$(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) info
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(arch)-stamp-latest-configured:
|
|
|
|
[ -d $(LATESTDIR) ] || mkdir $(LATESTDIR)
|
1993-11-09 23:07:50 +01:00
|
|
|
$(SET_LATEST_PATH) cd $(LATESTDIR) ; $(configenv) $(GNUC) $(TIME) $(CONFIG_SHELL) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
|
|
|
|
1992-07-11 00:56:50 +02:00
|
|
|
|
|
|
|
.PHONY: in-place
|
|
|
|
in-place: $(host)-stamp-in-place
|
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
$(host)-stamp-in-place:
|
1992-07-11 00:56:50 +02:00
|
|
|
PATH=/bin:/usr/bin:/usr/ucb ; \
|
1992-11-23 02:40:05 +01:00
|
|
|
export PATH ; \
|
|
|
|
SHELL=/bin/sh ; export SHELL ; \
|
|
|
|
$(TIME) $(GNU_MAKE) -f test-build.mk $(host)-stamp-in-place-installed host=$(host) $(FLAGS_TO_PASS)
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
1992-11-23 02:40:05 +01:00
|
|
|
if [ -f CLEAN_ALL ] ; then \
|
|
|
|
rm -rf $(INPLACEDIR) ; \
|
|
|
|
else \
|
|
|
|
mv $(INPLACEDIR) $(STAGE1DIR) ; \
|
|
|
|
fi
|
1992-07-11 00:56:50 +02:00
|
|
|
|
|
|
|
$(host)-stamp-in-place-installed: $(host)-stamp-in-place-checked
|
1993-01-29 00:11:07 +01:00
|
|
|
cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install host=$(host)
|
|
|
|
cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install-info host=$(host)
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-in-place-checked: $(host)-stamp-in-place-built
|
1993-01-29 00:11:07 +01:00
|
|
|
# cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" check host=$(host)
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-in-place-built: $(host)-stamp-in-place-configured
|
1993-01-29 00:11:07 +01:00
|
|
|
cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" all host=$(host)
|
|
|
|
cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" info host=$(host)
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-in-place-configured: $(host)-stamp-in-place-cp
|
1993-11-09 23:07:50 +01:00
|
|
|
cd $(INPLACEDIR) ; $(configenv) CC="$(CC)" $(TIME) $(CONFIG_SHELL) ./configure $(config) -v $(prefixes) $(configargs)
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-in-place-cp:
|
|
|
|
rm -rf $(INPLACEDIR)
|
|
|
|
mkdir $(INPLACEDIR)
|
|
|
|
(cd $(TREE) ; tar cf - .) | (cd $(INPLACEDIR) ; tar xf -)
|
|
|
|
touch $@
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
$(host)-stamp-3stage-done: do1 do2 do3 comparison
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
.PHONY: do1
|
1993-05-10 21:51:37 +02:00
|
|
|
do1: $(HOLESSTAMP) $(host)-stamp-stage1
|
|
|
|
do1-config: $(HOLESSTAMP) $(host)-stamp-stage1-configured
|
|
|
|
do1-build: $(HOLESSTAMP) $(host)-stamp-stage1-checked
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
do1-vault: $(HOLESSTAMP) $(host)-stamp-stage1-built
|
|
|
|
if [ -d $(WORKING_DIR).1 ] ; then \
|
|
|
|
$(SET_NATIVE_HOLES) cd $(WORKING_DIR).1 ; $(MAKE) $(FLAGS_TO_PASS) host=$(host) "CFLAGS=$(CFLAGS)" vault-install ; \
|
|
|
|
else \
|
|
|
|
$(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(MAKE) $(FLAGS_TO_PASS) host=$(host) "CFLAGS=$(CFLAGS)" vault-install ; \
|
|
|
|
fi
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
$(host)-stamp-stage1:
|
|
|
|
if [ -d $(STAGE1DIR) ] ; then \
|
|
|
|
mv $(STAGE1DIR) $(WORKING_DIR) ; \
|
|
|
|
else \
|
|
|
|
true ; \
|
|
|
|
fi
|
1993-02-13 12:11:42 +01:00
|
|
|
$(SET_NATIVE_HOLES) $(TIME) $(GNU_MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) $(host)-stamp-stage1-installed
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
1992-11-23 02:40:05 +01:00
|
|
|
if [ -f CLEAN_ALL ] ; then \
|
|
|
|
rm -rf $(WORKING_DIR) ; \
|
|
|
|
else \
|
|
|
|
mv $(WORKING_DIR) $(STAGE1DIR) ; \
|
|
|
|
fi
|
1992-07-10 23:24:19 +02:00
|
|
|
|
|
|
|
$(host)-stamp-stage1-installed: $(host)-stamp-stage1-checked
|
1993-02-13 12:11:42 +01:00
|
|
|
$(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install host=$(host)
|
|
|
|
$(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install-info host=$(host)
|
1992-12-23 00:08:06 +01:00
|
|
|
ifeq ($(host),rs6000-ibm-aix)
|
1993-05-10 21:51:37 +02:00
|
|
|
-rm $(relbindir)/make
|
1995-05-18 11:27:23 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(host),rs6000-ibm-aix3.2.5)
|
|
|
|
-rm $(relbindir)/make
|
1992-12-23 00:08:06 +01:00
|
|
|
endif
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage1-checked: $(host)-stamp-stage1-built
|
1993-02-13 12:11:42 +01:00
|
|
|
# $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" check host=$(host)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage1-built: $(host)-stamp-stage1-configured
|
1993-02-13 12:11:42 +01:00
|
|
|
$(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" all host=$(host)
|
|
|
|
$(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" info host=$(host)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage1-configured:
|
|
|
|
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
1993-02-13 12:11:42 +01:00
|
|
|
$(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; \
|
1993-11-09 23:07:50 +01:00
|
|
|
$(configenv) CC="$(CC)" $(TIME) $(CONFIG_SHELL) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
.PHONY: do2
|
|
|
|
do2: $(HOLESDIR) $(host)-stamp-stage2
|
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
do2-vault: $(HOLESSTAMP) $(host)-stamp-stage2-built
|
|
|
|
if [ -d $(WORKING_DIR).2 ] ; then \
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR).2 ; $(MAKE) $(FLAGS_TO_PASS) host=$(host) "CFLAGS=$(GNUCFLAGS)" vault-install ; \
|
1993-07-08 02:57:49 +02:00
|
|
|
else \
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(MAKE) $(FLAGS_TO_PASS) host=$(host) "CFLAGS=$(GNUCFLAGS)" vault-install ; \
|
1993-07-08 02:57:49 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
$(host)-stamp-stage2:
|
|
|
|
if [ -d $(STAGE2DIR) ] ; then \
|
|
|
|
mv $(STAGE2DIR) $(WORKING_DIR) ; \
|
|
|
|
else \
|
|
|
|
true ; \
|
|
|
|
fi
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage2-installed
|
1992-11-23 02:40:05 +01:00
|
|
|
mv $(WORKING_DIR) $(STAGE2DIR)
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
1992-07-10 23:24:19 +02:00
|
|
|
|
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
# The SunOS make program gets confused when it is deleted while running.
|
|
|
|
# The signal handlers return to the wrong place, or something, and the
|
|
|
|
# program dumps core. To avoid trouble with installing make over itself,
|
|
|
|
# we delete the installed make program.
|
1992-07-10 23:24:19 +02:00
|
|
|
$(host)-stamp-stage2-installed: $(host)-stamp-stage2-checked
|
1994-10-20 18:49:11 +01:00
|
|
|
-rm -f $(relbindir)/make
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(GNU_MAKE) -w $(FLAGS_TO_PASS) $(GNUC) install host=$(host)
|
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) install-info host=$(host)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage2-checked: $(host)-stamp-stage2-built
|
1995-05-18 11:27:23 +02:00
|
|
|
# $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) check host=$(host)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage2-built: $(host)-stamp-stage2-configured
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) all host=$(host)
|
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) info host=$(host)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage2-configured:
|
|
|
|
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; \
|
1993-11-09 23:07:50 +01:00
|
|
|
$(configenv) $(GNUC) $(TIME) $(CONFIG_SHELL) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
.PHONY: do3
|
|
|
|
do3: $(HOLESDIR) $(host)-stamp-stage3
|
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
do3-vault: $(HOLESSTAMP) $(host)-stamp-stage3-built
|
|
|
|
if [ -d $(WORKING_DIR).3 ] ; then \
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR).3 ; $(MAKE) $(FLAGS_TO_PASS) host=$(host) "CFLAGS=$(GNUCFLAGS)" vault-install ; \
|
1993-07-08 02:57:49 +02:00
|
|
|
else \
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(MAKE) $(FLAGS_TO_PASS) host=$(host) "CFLAGS=$(GNUCFLAGS)" vault-install ; \
|
1993-07-08 02:57:49 +02:00
|
|
|
fi
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
$(host)-stamp-stage3:
|
1992-11-23 02:40:05 +01:00
|
|
|
if [ -d $(STAGE3DIR) ] ; then \
|
|
|
|
mv $(STAGE3DIR) $(WORKING_DIR) ; \
|
1992-07-10 23:24:19 +02:00
|
|
|
else \
|
|
|
|
true ; \
|
|
|
|
fi
|
1993-11-09 23:07:50 +01:00
|
|
|
$(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage3-installed
|
1992-11-23 02:40:05 +01:00
|
|
|
mv $(WORKING_DIR) $(STAGE3DIR)
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
1992-07-10 23:24:19 +02:00
|
|
|
|
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
# The SunOS make program gets confused when it is deleted while running.
|
|
|
|
# The signal handlers return to the wrong place, or something, and the
|
|
|
|
# program dumps core. To avoid trouble with installing make over itself,
|
|
|
|
# we delete the installed make program.
|
1992-07-10 23:24:19 +02:00
|
|
|
$(host)-stamp-stage3-installed: $(host)-stamp-stage3-checked
|
1994-10-20 18:49:11 +01:00
|
|
|
-rm -f $(relbindir)/make
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(GNU_MAKE) -w $(FLAGS_TO_PASS) $(GNUC) install host=$(host)
|
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) install-info host=$(host)
|
1993-11-09 23:07:50 +01:00
|
|
|
if [ -f VAULT-INSTALL ] ; then \
|
|
|
|
$(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(MAKE) $(FLAGS_TO_PASS) $(GNUC) vault-install ; \
|
1994-04-11 20:00:46 +02:00
|
|
|
else true ; fi
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage3-checked: $(host)-stamp-stage3-built
|
1995-05-18 11:27:23 +02:00
|
|
|
# $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) check host=$(host)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
1994-04-11 20:00:46 +02:00
|
|
|
$(host)-check-3stage: $(host)-stamp-stage3
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(STAGE3DIR) ; $(TIME) $(MAKE) -k -w $(FLAGS_TO_PASS) $(GNUC) check host=$(host)
|
1994-04-11 20:00:46 +02:00
|
|
|
touch $@
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
$(host)-stamp-stage3-built: $(host)-stamp-stage3-configured
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) all host=$(host)
|
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) info host=$(host)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage3-configured:
|
|
|
|
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
1993-01-29 00:11:07 +01:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; \
|
1993-11-09 23:07:50 +01:00
|
|
|
$(configenv) $(GNUC) $(TIME) $(CONFIG_SHELL) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
.PHONY: do4
|
|
|
|
do4: $(HOLESDIR) $(host)-stamp-stage4
|
|
|
|
|
|
|
|
$(host)-stamp-stage4:
|
|
|
|
if [ -d $(STAGE4DIR) ] ; then \
|
|
|
|
mv $(STAGE4DIR) $(WORKING_DIR) ; \
|
|
|
|
else \
|
|
|
|
true ; \
|
|
|
|
fi
|
|
|
|
$(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage4-checked
|
|
|
|
mv $(WORKING_DIR) $(STAGE4DIR)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
|
|
|
|
$(host)-stamp-stage4-installed: $(host)-stamp-stage4-checked
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) install host=$(host)
|
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) install-info host=$(host)
|
1993-11-09 23:07:50 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage4-checked: $(host)-stamp-stage4-built
|
1995-05-18 11:27:23 +02:00
|
|
|
# $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) check host=$(host)
|
1993-11-09 23:07:50 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage4-built: $(host)-stamp-stage4-configured
|
1995-05-18 11:27:23 +02:00
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) all host=$(host)
|
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) info host=$(host)
|
1993-11-09 23:07:50 +01:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(host)-stamp-stage4-configured:
|
|
|
|
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
|
|
|
$(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; \
|
|
|
|
$(configenv) $(GNUC) $(TIME) $(CONFIG_SHELL) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
|
1992-07-10 23:24:19 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
# These things are needed by a three-stage, but are not included locally.
|
|
|
|
|
|
|
|
HOLES := \
|
|
|
|
[ \
|
|
|
|
ar \
|
|
|
|
as \
|
|
|
|
awk \
|
|
|
|
basename \
|
|
|
|
cat \
|
|
|
|
cc \
|
|
|
|
chmod \
|
1993-07-08 02:57:49 +02:00
|
|
|
chgrp \
|
|
|
|
chown \
|
1992-07-10 23:24:19 +02:00
|
|
|
cmp \
|
|
|
|
cp \
|
1993-01-29 00:11:07 +01:00
|
|
|
cpio \
|
1992-07-10 23:24:19 +02:00
|
|
|
date \
|
|
|
|
diff \
|
1993-07-08 02:57:49 +02:00
|
|
|
dirname \
|
1992-07-10 23:24:19 +02:00
|
|
|
echo \
|
|
|
|
egrep \
|
|
|
|
ex \
|
|
|
|
expr \
|
1993-02-13 12:11:42 +01:00
|
|
|
false \
|
1992-07-10 23:24:19 +02:00
|
|
|
find \
|
|
|
|
grep \
|
1992-11-23 02:40:05 +01:00
|
|
|
head \
|
1992-07-10 23:24:19 +02:00
|
|
|
hostname \
|
|
|
|
install \
|
|
|
|
ld \
|
|
|
|
lex \
|
|
|
|
ln \
|
|
|
|
ls \
|
|
|
|
make \
|
|
|
|
mkdir \
|
|
|
|
mv \
|
|
|
|
nm \
|
|
|
|
pwd \
|
|
|
|
ranlib \
|
|
|
|
rm \
|
|
|
|
rmdir \
|
|
|
|
sed \
|
|
|
|
sh \
|
1994-05-18 02:03:28 +02:00
|
|
|
sleep \
|
1992-07-10 23:24:19 +02:00
|
|
|
sort \
|
1995-05-18 11:27:23 +02:00
|
|
|
tail \
|
1993-01-29 00:11:07 +01:00
|
|
|
tar \
|
1992-07-10 23:24:19 +02:00
|
|
|
test \
|
|
|
|
time \
|
|
|
|
touch \
|
|
|
|
tr \
|
|
|
|
true \
|
1993-05-10 21:51:37 +02:00
|
|
|
uname \
|
1993-07-08 02:57:49 +02:00
|
|
|
uniq \
|
1995-05-18 11:27:23 +02:00
|
|
|
uptime \
|
1993-01-29 00:11:07 +01:00
|
|
|
uudecode \
|
1992-07-18 01:26:35 +02:00
|
|
|
wc \
|
1992-07-10 23:24:19 +02:00
|
|
|
whoami
|
|
|
|
|
|
|
|
### so far only sun make supports VPATH
|
1993-05-10 21:51:37 +02:00
|
|
|
ifeq ($(subst sun3,sun4,$(holesys)),sun4)
|
1992-07-10 23:24:19 +02:00
|
|
|
MAKE_HOLE :=
|
|
|
|
else
|
|
|
|
MAKE_HOLE := make
|
|
|
|
endif
|
|
|
|
|
1992-11-23 02:40:05 +01:00
|
|
|
### solaris 2 -- don't use /usr/ucb/cc
|
1993-05-10 21:51:37 +02:00
|
|
|
ifeq (sparc-sun-solaris2,$(holesys))
|
1993-11-10 00:32:04 +01:00
|
|
|
SET_NATIVE_HOLES := SHELL=$(SHELL) ; PATH=/opt/SUNWspro/bin:`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
|
1993-02-03 04:01:41 +01:00
|
|
|
HOLE_DIRS := /usr/ccs/bin
|
1993-03-20 05:51:42 +01:00
|
|
|
CC_HOLE :=
|
|
|
|
NUKEM := cc
|
1992-11-23 02:40:05 +01:00
|
|
|
endif
|
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
ifeq ($(host),i386-go32)
|
|
|
|
DOS_HOLES := aout2exe doschk file
|
|
|
|
endif
|
|
|
|
|
1994-05-18 02:03:28 +02:00
|
|
|
ifeq ($(host),i386-lynx)
|
|
|
|
MAKE_HOLE := make
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(host),m68k-lynx)
|
|
|
|
MAKE_HOLE := make
|
|
|
|
endif
|
|
|
|
|
1994-10-20 18:49:11 +01:00
|
|
|
ifeq ($(host),sparc-lynx)
|
|
|
|
MAKE_HOLE := make
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(host),rs6000-lynx)
|
|
|
|
MAKE_HOLE := make
|
|
|
|
endif
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
### These things are also needed by a three-stage, but in this case, the GNU version of the tool is required.
|
|
|
|
PARTIAL_HOLES := \
|
|
|
|
$(MAKE_HOLE) \
|
1992-11-23 02:40:05 +01:00
|
|
|
$(CC_HOLE) \
|
1993-11-09 23:07:50 +01:00
|
|
|
$(DOS_HOLES) \
|
1992-07-10 23:24:19 +02:00
|
|
|
flex \
|
|
|
|
m4
|
|
|
|
|
|
|
|
### look in these directories for things missing from a three-stage
|
|
|
|
HOLE_DIRS := \
|
1992-12-23 00:08:06 +01:00
|
|
|
$(HOLE_DIRS) \
|
1992-07-10 23:24:19 +02:00
|
|
|
/bin \
|
|
|
|
/usr/bin \
|
|
|
|
/usr/ucb \
|
1995-05-18 11:27:23 +02:00
|
|
|
/etc /usr/etc \
|
1992-07-10 23:24:19 +02:00
|
|
|
/usr/unsupported/bin
|
|
|
|
|
|
|
|
### look in these directories for alternate versions of some tools.
|
|
|
|
PARTIAL_HOLE_DIRS := \
|
|
|
|
/usr/latest/bin \
|
|
|
|
/usr/progressive/bin \
|
1992-12-23 00:08:06 +01:00
|
|
|
$(PARTIAL_HOLE_DIRS) \
|
1992-07-10 23:24:19 +02:00
|
|
|
/usr/vintage/bin \
|
1994-05-18 02:03:28 +02:00
|
|
|
/usr/unsupported/bin \
|
|
|
|
$(HOLE_DIRS)
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(HOLESDIR): $(holesys)-stamp-holes
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
$(holesys)-stamp-holes:
|
1992-07-10 23:24:19 +02:00
|
|
|
-rm -rf $(HOLESDIR)
|
|
|
|
-mkdir $(HOLESDIR)
|
1992-11-23 02:40:05 +01:00
|
|
|
@for i in $(HOLES) ; do \
|
1992-07-10 23:24:19 +02:00
|
|
|
found= ; \
|
|
|
|
for j in $(HOLE_DIRS) ; do \
|
|
|
|
if [ -x $$j/$$i ] ; then \
|
1992-12-30 00:10:26 +01:00
|
|
|
ln -s $$j/$$i $(HOLESDIR) || cp $$j/$$i $(HOLESDIR) ; \
|
1992-07-10 23:24:19 +02:00
|
|
|
echo $$i from $$j ; \
|
|
|
|
found=t ; \
|
|
|
|
break ; \
|
|
|
|
fi ; \
|
|
|
|
done ; \
|
|
|
|
case "$$found" in \
|
|
|
|
t) ;; \
|
|
|
|
*) echo $$i is NOT found ;; \
|
|
|
|
esac ; \
|
|
|
|
done
|
1992-11-23 02:40:05 +01:00
|
|
|
@for i in $(PARTIAL_HOLES) ; do \
|
1992-07-10 23:24:19 +02:00
|
|
|
found= ; \
|
|
|
|
for j in $(PARTIAL_HOLE_DIRS) ; do \
|
|
|
|
if [ -x $$j/$$i ] ; then \
|
|
|
|
rm -f $(HOLESDIR)/$$i ; \
|
|
|
|
cp $$j/$$i $(HOLESDIR)/$$i || exit 1; \
|
|
|
|
echo $$i from $$j ; \
|
|
|
|
found=t ; \
|
|
|
|
break ; \
|
|
|
|
fi ; \
|
|
|
|
done ; \
|
|
|
|
case "$$found" in \
|
|
|
|
t) ;; \
|
|
|
|
*) echo $$i is NOT found ;; \
|
|
|
|
esac ; \
|
|
|
|
done
|
1993-03-20 05:51:42 +01:00
|
|
|
ifdef NUKEM
|
|
|
|
cd $(HOLESDIR); rm -f $(NUKEM)
|
|
|
|
endif
|
1992-07-11 00:56:50 +02:00
|
|
|
touch $@
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-05-10 21:51:37 +02:00
|
|
|
# Get the cross-tools for build cross host when not building on the host.
|
|
|
|
|
|
|
|
BUILD_HOST_HOLES := \
|
|
|
|
byacc \
|
|
|
|
gcc \
|
|
|
|
makeinfo \
|
|
|
|
$(AR) \
|
|
|
|
$(AS) \
|
|
|
|
$(CC) \
|
|
|
|
$(CXX) \
|
|
|
|
$(GXX) \
|
|
|
|
$(NM) \
|
|
|
|
$(RANLIB)
|
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
BUILD_HOLES_DIRS := $(release_root)/H-$(build)/bin $(PARTIAL_HOLE_DIRS)
|
1993-05-10 21:51:37 +02:00
|
|
|
|
1993-05-21 00:20:07 +02:00
|
|
|
ifdef BUILD_HOST_HOLES_DIR
|
1993-05-10 21:51:37 +02:00
|
|
|
$(BUILD_HOST_HOLES_DIR): $(build)-x-$(host)-stamp-holes
|
1993-05-21 00:20:07 +02:00
|
|
|
endif
|
1993-05-10 21:51:37 +02:00
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
ifneq ($(build),$(host))
|
1993-05-10 21:51:37 +02:00
|
|
|
$(build)-x-$(host)-stamp-holes:
|
|
|
|
-rm -rf $(BUILD_HOST_HOLES_DIR)
|
|
|
|
-mkdir $(BUILD_HOST_HOLES_DIR)
|
|
|
|
@for i in $(BUILD_HOST_HOLES) ; do \
|
|
|
|
found= ; \
|
|
|
|
for j in $(BUILD_HOLES_DIRS) ; do \
|
|
|
|
if [ -x $$j/$$i ] ; then \
|
|
|
|
ln -s $$j/$$i $(BUILD_HOST_HOLES_DIR) || cp $$j/$$i $(BUILD_HOST_HOLES_DIR) ; \
|
|
|
|
echo $$i from $$j ; \
|
|
|
|
found=t ; \
|
|
|
|
break ; \
|
|
|
|
fi ; \
|
|
|
|
done ; \
|
|
|
|
case "$$found" in \
|
|
|
|
t) ;; \
|
|
|
|
*) echo $$i is NOT found ;; \
|
|
|
|
esac ; \
|
|
|
|
done
|
|
|
|
touch $@
|
1993-07-08 02:57:49 +02:00
|
|
|
endif
|
1993-05-10 21:51:37 +02:00
|
|
|
|
|
|
|
# Get the cross tools for build cross target when not building on the host.
|
|
|
|
|
|
|
|
BUILD_TARGET_HOLES := \
|
|
|
|
byacc \
|
|
|
|
gcc \
|
|
|
|
makeinfo \
|
|
|
|
$(AR_FOR_TARGET) \
|
|
|
|
$(AS_FOR_TARGET) \
|
|
|
|
$(CC_FOR_TARGET) \
|
|
|
|
$(CXX_FOR_TARGET) \
|
|
|
|
$(GXX_FOR_TARGET) \
|
|
|
|
$(NM_FOR_TARGET) \
|
|
|
|
$(RANLIB_FOR_TARGET)
|
|
|
|
|
1993-05-21 00:20:07 +02:00
|
|
|
ifdef BUILD_TARGET_HOLES_DIR
|
1993-05-10 21:51:37 +02:00
|
|
|
$(BUILD_TARGET_HOLES_DIR): $(build)-x-$(target)-stamp-holes
|
1993-05-21 00:20:07 +02:00
|
|
|
endif
|
1993-05-10 21:51:37 +02:00
|
|
|
|
1993-07-08 02:57:49 +02:00
|
|
|
ifneq ($(build),$(target))
|
1993-05-10 21:51:37 +02:00
|
|
|
$(build)-x-$(target)-stamp-holes:
|
|
|
|
-rm -rf $(BUILD_TARGET_HOLES_DIR)
|
|
|
|
-mkdir $(BUILD_TARGET_HOLES_DIR)
|
|
|
|
@for i in $(BUILD_TARGET_HOLES) ; do \
|
|
|
|
found= ; \
|
|
|
|
for j in $(BUILD_HOLES_DIRS) ; do \
|
|
|
|
if [ -x $$j/$$i ] ; then \
|
|
|
|
ln -s $$j/$$i $(BUILD_TARGET_HOLES_DIR) || cp $$j/$$i $(BUILD_TARGET_HOLES_DIR) ; \
|
|
|
|
echo $$i from $$j ; \
|
|
|
|
found=t ; \
|
|
|
|
break ; \
|
|
|
|
fi ; \
|
|
|
|
done ; \
|
|
|
|
case "$$found" in \
|
|
|
|
t) ;; \
|
|
|
|
*) echo $$i is NOT found ;; \
|
|
|
|
esac ; \
|
|
|
|
done
|
|
|
|
touch $@
|
1993-07-08 02:57:49 +02:00
|
|
|
endif
|
1993-05-10 21:51:37 +02:00
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
.PHONY: comparison
|
1992-11-23 02:40:05 +01:00
|
|
|
comparison: $(host)-stamp-3stage-compared
|
1993-11-09 23:07:50 +01:00
|
|
|
comparison-stage3to4: $(host)-stamp-4stage-compared
|
1992-11-23 02:40:05 +01:00
|
|
|
|
|
|
|
$(host)-stamp-3stage-compared:
|
|
|
|
rm -f .bad-compare
|
1994-05-18 02:03:28 +02:00
|
|
|
ifeq ($(patsubst %-lynx,mips-sgi-irix4,$(subst i386-sco3.2v4,mips-sgi-irix4,$(subst rs6000-ibm-aix,mips-sgi-irix4,$(subst mips-dec-ultrix,mips-sgi-irix4,$(host))))),mips-sgi-irix4)
|
1992-11-23 02:40:05 +01:00
|
|
|
for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
|
|
|
|
tail +10c $(STAGE2DIR)/$$i > foo1 ; \
|
|
|
|
tail +10c $(STAGE3DIR)/$$i > foo2 ; \
|
|
|
|
if cmp foo1 foo2 ; then \
|
|
|
|
true ; \
|
|
|
|
else \
|
|
|
|
echo $$i ; \
|
|
|
|
touch .bad-compare ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
|
|
|
rm -f foo1 foo2
|
1992-07-10 23:24:19 +02:00
|
|
|
else
|
1992-11-23 02:40:05 +01:00
|
|
|
for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
|
|
|
|
cmp $(STAGE2DIR)/$$i $(STAGE3DIR)/$$i || touch .bad-compare ; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
if [ -f CLEAN_ALL ] ; then \
|
|
|
|
rm -rf $(STAGE2DIR) $(STAGE3DIR) ; \
|
1992-07-18 07:56:28 +02:00
|
|
|
else \
|
1992-11-23 02:40:05 +01:00
|
|
|
if [ -f CLEAN_STAGES ] ; then \
|
|
|
|
if [ -f .bad-compare ] ; then \
|
|
|
|
true ; \
|
|
|
|
else \
|
|
|
|
rm -rf $(STAGE1DIR) $(STAGE2DIR) ; \
|
|
|
|
fi ; \
|
1992-12-30 00:10:26 +01:00
|
|
|
else true ; \
|
1992-11-23 02:40:05 +01:00
|
|
|
fi ; \
|
1992-07-18 07:56:28 +02:00
|
|
|
fi
|
1992-11-23 02:40:05 +01:00
|
|
|
touch $@
|
1992-07-10 23:24:19 +02:00
|
|
|
|
1993-11-09 23:07:50 +01:00
|
|
|
$(host)-stamp-4stage-compared:
|
|
|
|
rm -f .bad-compare
|
1994-05-18 02:03:28 +02:00
|
|
|
ifeq ($(patsubst %-lynx,mips-sgi-irix4,$(subst i386-sco3.2v4,mips-sgi-irix4,$(subst rs6000-ibm-aix,mips-sgi-irix4,$(subst mips-dec-ultrix,mips-sgi-irix4,$(host))))),mips-sgi-irix4)
|
1993-11-09 23:07:50 +01:00
|
|
|
for i in `cd $(STAGE4DIR) ; find . -name \*.o -print` ; do \
|
|
|
|
tail +10c $(STAGE3DIR)/$$i > foo1 ; \
|
|
|
|
tail +10c $(STAGE4DIR)/$$i > foo2 ; \
|
|
|
|
if cmp foo1 foo2 ; then \
|
|
|
|
true ; \
|
|
|
|
else \
|
|
|
|
echo $$i ; \
|
|
|
|
touch .bad-compare ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
|
|
|
rm -f foo1 foo2
|
|
|
|
else
|
|
|
|
for i in `cd $(STAGE4DIR) ; find . -name \*.o -print` ; do \
|
|
|
|
cmp $(STAGE3DIR)/$$i $(STAGE4DIR)/$$i || touch .bad-compare ; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
if [ -f CLEAN_ALL ] ; then \
|
|
|
|
rm -rf $(STAGE2DIR) $(STAGE3DIR) $(STAGE4DIR) ; \
|
|
|
|
else \
|
|
|
|
if [ -f CLEAN_STAGES ] ; then \
|
|
|
|
if [ -f .bad-compare ] ; then \
|
|
|
|
true ; \
|
|
|
|
else \
|
|
|
|
rm -rf $(STAGE1DIR) $(STAGE2DIR) $(STAGE3DIR) ; \
|
|
|
|
fi ; \
|
|
|
|
else true ; \
|
|
|
|
fi ; \
|
|
|
|
fi
|
|
|
|
|
1992-07-10 23:24:19 +02:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
1992-07-11 00:56:50 +02:00
|
|
|
rm -rf $(HOLESDIR) $(INPLACEDIR) $(WORKING_DIR)* $(host)-stamp-* *~
|
1992-07-10 23:24:19 +02:00
|
|
|
|
|
|
|
.PHONY: very
|
|
|
|
very:
|
1992-07-11 00:56:50 +02:00
|
|
|
rm -rf $(TREE)
|
1992-07-10 23:24:19 +02:00
|
|
|
|
|
|
|
force:
|
|
|
|
|
|
|
|
endif # host
|
|
|
|
|
|
|
|
### Local Variables:
|
|
|
|
### fill-column: 131
|
|
|
|
### End:
|