updates dates, added build-cygnus target
This commit is contained in:
parent
36e0df2384
commit
5ba0048726
2 changed files with 287 additions and 115 deletions
19
build-all.mk
19
build-all.mk
|
@ -15,7 +15,7 @@ TREE = devo
|
||||||
|
|
||||||
NATIVE = native
|
NATIVE = native
|
||||||
|
|
||||||
DATE = 921117
|
DATE = 921118
|
||||||
|
|
||||||
TAG = latest-$(DATE)
|
TAG = latest-$(DATE)
|
||||||
|
|
||||||
|
@ -104,6 +104,23 @@ all-cygnus:
|
||||||
done
|
done
|
||||||
@echo done at `date`
|
@echo done at `date`
|
||||||
|
|
||||||
|
build-cygnus:
|
||||||
|
@echo build started at `date`
|
||||||
|
@for i in $(TARGETS) ; do \
|
||||||
|
if [ "$$i" = "native" ] ; then \
|
||||||
|
if [ ! -f $(canonhost)-3stage-done ] ; then \
|
||||||
|
echo "3staging $(canonhost) native" ; \
|
||||||
|
$(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(host)-stamp-3stage-done $(log) && \
|
||||||
|
echo " completed successfully" ; \
|
||||||
|
fi \
|
||||||
|
else \
|
||||||
|
echo "building $(canonhost) cross to $$i" ; \
|
||||||
|
$(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
|
||||||
|
echo " completed successfully" ; \
|
||||||
|
fi ; \
|
||||||
|
done
|
||||||
|
@echo done at `date`
|
||||||
|
|
||||||
all-native:
|
all-native:
|
||||||
[ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
|
[ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
|
||||||
rm -f /usr/cygnus/$(TAG)
|
rm -f /usr/cygnus/$(TAG)
|
||||||
|
|
383
test-build.mk
383
test-build.mk
|
@ -3,15 +3,21 @@
|
||||||
### compile other bundles, first with cc, then with gcc.
|
### compile other bundles, first with cc, then with gcc.
|
||||||
###
|
###
|
||||||
|
|
||||||
### This file was written and is maintained by K. Richard Pixley,
|
###
|
||||||
### <rich@cygnus.com>.
|
### 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).
|
||||||
|
|
||||||
### Every invocation of this Makefile needs to have a variable set (host),
|
### 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
|
### which is the named used for ./configure, and also the prefix for the
|
||||||
### various files and directories used in a three stage.
|
### various files and directories used in a three stage.
|
||||||
|
|
||||||
ifndef host
|
ifndef host
|
||||||
error:; @echo You must set the variable \"host\" to use this Makefile ; exit 1
|
error:
|
||||||
|
@echo You must set the variable \"host\" to use this Makefile ; exit 1
|
||||||
else
|
else
|
||||||
|
|
||||||
### from here to very near the end of the file is the real guts of this
|
### from here to very near the end of the file is the real guts of this
|
||||||
|
@ -30,15 +36,14 @@ ROOTING := /usr/cygnus
|
||||||
|
|
||||||
### When working from a tagged set of source, this should be the tag. If not,
|
### When working from a tagged set of source, this should be the tag. If not,
|
||||||
### then set the macro to be empty.
|
### then set the macro to be empty.
|
||||||
#CVS_TAG := -r emacs-920529
|
CVS_TAG :=
|
||||||
CVS_TAG :=
|
|
||||||
|
|
||||||
### The name of the cvs module for this release. The intersection of
|
### The name of the cvs module for this release. The intersection of
|
||||||
### CVS_MODULE and CVS_TAG defines the source files in this release.
|
### CVS_MODULE and CVS_TAG defines the source files in this release.
|
||||||
CVS_MODULE := devo
|
CVS_MODULE := latest
|
||||||
|
|
||||||
### Historically, this was identical to CVS_TAG. This is changing.
|
### Historically, this was identical to CVS_TAG. This is changing.
|
||||||
RELEASE_TAG := latest-921102
|
RELEASE_TAG := latest-921118
|
||||||
|
|
||||||
### Historically, binaries were installed here. This is changing.
|
### Historically, binaries were installed here. This is changing.
|
||||||
release_root := $(ROOTING)/$(RELEASE_TAG)
|
release_root := $(ROOTING)/$(RELEASE_TAG)
|
||||||
|
@ -46,62 +51,198 @@ release_root := $(ROOTING)/$(RELEASE_TAG)
|
||||||
### STOP EDITTING HERE!!!
|
### STOP EDITTING HERE!!!
|
||||||
### With luck, eventually, nothing else will need to be editted.
|
### With luck, eventually, nothing else will need to be editted.
|
||||||
|
|
||||||
TIME := time
|
TIME := time
|
||||||
GCC := gcc -O
|
GCC := gcc -O -g
|
||||||
GNU_MAKE := /usr/latest/bin/make
|
GNUC := "CC=$(GCC)"
|
||||||
override MAKE := make
|
CFLAGS := -g
|
||||||
override MAKEFLAGS :=
|
GNU_MAKE := /usr/latest/bin/make -w
|
||||||
override MFLAGS :=
|
|
||||||
|
override MAKE := make
|
||||||
|
override MFLAGS :=
|
||||||
|
#override MAKEFLAGS :=
|
||||||
|
|
||||||
SHELL := /bin/sh
|
SHELL := /bin/sh
|
||||||
|
|
||||||
.NOEXPORT:
|
|
||||||
|
|
||||||
FLAGS_TO_PASS := \
|
FLAGS_TO_PASS := \
|
||||||
"GCC=$(GCC)" \
|
"GCC=$(GCC)" \
|
||||||
|
"CFLAGS=$(CFLAGS)" \
|
||||||
"TIME=$(TIME)" \
|
"TIME=$(TIME)" \
|
||||||
"MF=$(MF)"
|
"MF=$(MF)" \
|
||||||
|
"host=$(host)"
|
||||||
|
|
||||||
|
|
||||||
|
prefixes = -prefix=$(release_root) -exec_prefix=$(release_root)/H-$(host)
|
||||||
|
relbindir = $(release_root)/H-$(host)/bin
|
||||||
|
|
||||||
|
|
||||||
### general config stuff
|
### general config stuff
|
||||||
WORKING_DIR := $(host)-objdir
|
WORKING_DIR := $(host)-objdir
|
||||||
STAGE1DIR := $(WORKING_DIR).1
|
STAGE1DIR := $(WORKING_DIR).1
|
||||||
STAGE2DIR := $(WORKING_DIR).2
|
STAGE2DIR := $(WORKING_DIR).2
|
||||||
STAGE3DIR := $(WORKING_DIR).3
|
STAGE3DIR := $(WORKING_DIR).3
|
||||||
INPLACEDIR := $(host)-in-place
|
INPLACEDIR := $(host)-in-place
|
||||||
HOLESDIR := $(host)-holes
|
HOLESDIR := $(host)-holes
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: in-place $(TREE)-stamp-co do1 do2 do3 comparison
|
ifdef target
|
||||||
|
##
|
||||||
|
## This is a cross compilation
|
||||||
|
##
|
||||||
|
arch = $(host)-x-$(target)
|
||||||
|
config = $(host) -target=$(target)
|
||||||
|
NATIVEDIR := $(arch)-native-objdir
|
||||||
|
CYGNUSDIR := $(arch)-cygnus-objdir
|
||||||
|
LATESTDIR := $(arch)-latest-objdir
|
||||||
|
FLAGS_TO_PASS := $(FLAGS_TO_PASS) "target=$(target)"
|
||||||
|
|
||||||
|
all: do-native do-latest
|
||||||
|
build-all: build-native build-latest
|
||||||
|
|
||||||
|
else
|
||||||
|
##
|
||||||
|
## This is a native compilation
|
||||||
|
##
|
||||||
|
all: $(host)-stamp-3stage-done
|
||||||
|
#all: in-place do1 do2 do3 comparison
|
||||||
|
endif
|
||||||
|
|
||||||
|
everything: do-cross
|
||||||
|
#everything: in-place do1 do2 do3 comparison do-cygnus
|
||||||
|
|
||||||
|
.PHONY: do-native
|
||||||
|
do-native: $(host)-stamp-holes $(arch)-stamp-native
|
||||||
|
do-native-config: $(arch)-stamp-native-configured
|
||||||
|
build-native: $(host)-stamp-holes $(arch)-stamp-native-checked
|
||||||
|
config-native: $(host)-stamp-holes $(arch)-stamp-native-configured
|
||||||
|
|
||||||
|
$(arch)-stamp-native:
|
||||||
|
PATH=`pwd`/$(HOLESDIR) ; \
|
||||||
|
export PATH ; \
|
||||||
|
SHELL=sh ; export SHELL ; \
|
||||||
|
$(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-native-installed $(FLAGS_TO_PASS)
|
||||||
|
if [ -f CLEAN_ALL ] ; then rm -rf $(NATIVEDIR) ; else true ; fi
|
||||||
|
touch $(arch)-stamp-native
|
||||||
|
|
||||||
|
$(arch)-stamp-native-installed: $(arch)-stamp-native-checked
|
||||||
|
cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) install
|
||||||
|
cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) install-info
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-native-checked: $(arch)-stamp-native-built
|
||||||
|
# cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) check
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-native-built: $(arch)-stamp-native-configured
|
||||||
|
cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) all
|
||||||
|
cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) info
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-native-configured:
|
||||||
|
[ -d $(NATIVEDIR) ] || mkdir $(NATIVEDIR)
|
||||||
|
(cd $(NATIVEDIR) ; \
|
||||||
|
$(TIME) ../$(TREE)/configure $(config) -v -srcdir=../$(TREE) \
|
||||||
|
$(prefixes))
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: do-cygnus
|
||||||
|
do-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus
|
||||||
|
build-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus-checked
|
||||||
|
config-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus-configured
|
||||||
|
|
||||||
|
$(arch)-stamp-cygnus:
|
||||||
|
[ -f $(relbindir)/gcc ] || (echo "must have gcc available"; exit 1)
|
||||||
|
PATH=$(relbindir):`pwd`/$(HOLESDIR) ; \
|
||||||
|
export PATH ; \
|
||||||
|
SHELL=sh ; export SHELL ; \
|
||||||
|
echo ; gcc -v ; echo ; \
|
||||||
|
$(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-cygnus-installed $(FLAGS_TO_PASS)
|
||||||
|
if [ -f CLEAN_ALL ] ; then rm -rf $(CYGNUSDIR) ; else true ; fi
|
||||||
|
touch $(arch)-stamp-cygnus
|
||||||
|
|
||||||
|
$(arch)-stamp-cygnus-installed: $(arch)-stamp-cygnus-checked
|
||||||
|
cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install
|
||||||
|
cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install-info
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-cygnus-checked: $(arch)-stamp-cygnus-built
|
||||||
|
# cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-cygnus-built: $(arch)-stamp-cygnus-configured
|
||||||
|
cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all
|
||||||
|
cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) info
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-cygnus-configured:
|
||||||
|
[ -d $(CYGNUSDIR) ] || mkdir $(CYGNUSDIR)
|
||||||
|
cd $(CYGNUSDIR) ; \
|
||||||
|
$(TIME) ../$(TREE)/configure $(config) -v -srcdir=../$(TREE) $(prefixes)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
.PHONY: do-latest
|
||||||
|
do-latest: $(host)-stamp-holes $(arch)-stamp-latest
|
||||||
|
build-latest: $(host)-stamp-holes $(arch)-stamp-latest-checked
|
||||||
|
|
||||||
|
$(arch)-stamp-latest:
|
||||||
|
PATH=/usr/latest/bin:`pwd`/$(HOLESDIR) ; \
|
||||||
|
export PATH ; \
|
||||||
|
SHELL=sh ; export SHELL ; \
|
||||||
|
$(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-latest-installed $(FLAGS_TO_PASS)
|
||||||
|
touch $(arch)-stamp-latest
|
||||||
|
|
||||||
|
$(arch)-stamp-latest-installed: $(arch)-stamp-latest-checked
|
||||||
|
cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install
|
||||||
|
cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install-info
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-latest-checked: $(arch)-stamp-latest-built
|
||||||
|
# cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-latest-built: $(arch)-stamp-latest-configured
|
||||||
|
cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all
|
||||||
|
cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) info
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(arch)-stamp-latest-configured:
|
||||||
|
[ -d $(LATESTDIR) ] || mkdir $(LATESTDIR)
|
||||||
|
cd $(LATESTDIR) ; \
|
||||||
|
$(TIME) ../$(TREE)/configure $(config) -v -srcdir=../$(TREE) $(prefixes)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
.PHONY: in-place
|
.PHONY: in-place
|
||||||
in-place: $(host)-stamp-in-place
|
in-place: $(host)-stamp-in-place
|
||||||
|
|
||||||
$(host)-stamp-in-place: $(TREE)-stamp-co
|
$(host)-stamp-in-place:
|
||||||
PATH=/bin:/usr/bin:/usr/ucb ; \
|
PATH=/bin:/usr/bin:/usr/ucb ; \
|
||||||
export PATH ; \
|
export PATH ; \
|
||||||
SHELL=/bin/sh ; export SHELL ; \
|
SHELL=/bin/sh ; export SHELL ; \
|
||||||
$(TIME) $(GNU_MAKE) -f test-build.mk $(host)-stamp-in-place-installed host=$(host) $(FLAGS_TO_PASS)
|
$(TIME) $(GNU_MAKE) -f test-build.mk $(host)-stamp-in-place-installed host=$(host) $(FLAGS_TO_PASS)
|
||||||
touch $@
|
touch $@
|
||||||
|
if [ -f CLEAN_ALL ] ; then \
|
||||||
|
rm -rf $(INPLACEDIR) ; \
|
||||||
|
else \
|
||||||
|
mv $(INPLACEDIR) $(STAGE1DIR) ; \
|
||||||
|
fi
|
||||||
|
|
||||||
$(host)-stamp-in-place-installed: $(host)-stamp-in-place-checked
|
$(host)-stamp-in-place-installed: $(host)-stamp-in-place-checked
|
||||||
(cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) install host=$(host))
|
cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" install host=$(host)
|
||||||
(cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) install-info host=$(host))
|
cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" install-info host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-in-place-checked: $(host)-stamp-in-place-built
|
$(host)-stamp-in-place-checked: $(host)-stamp-in-place-built
|
||||||
# (cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) check host=$(host))
|
# cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" check host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-in-place-built: $(host)-stamp-in-place-configured
|
$(host)-stamp-in-place-built: $(host)-stamp-in-place-configured
|
||||||
(cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) all host=$(host))
|
cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" all host=$(host)
|
||||||
(cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) info host=$(host))
|
cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" info host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-in-place-configured: $(host)-stamp-in-place-cp
|
$(host)-stamp-in-place-configured: $(host)-stamp-in-place-cp
|
||||||
(cd $(INPLACEDIR) ; \
|
cd $(INPLACEDIR) ; $(TIME) ./configure $(host) -v $(prefixes)
|
||||||
$(TIME) ./configure $(host) -v \
|
|
||||||
-prefix=$(release_root) \
|
|
||||||
-exec_prefix=$(release_root)/H-$(host))
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-in-place-cp:
|
$(host)-stamp-in-place-cp:
|
||||||
|
@ -110,8 +251,14 @@ $(host)-stamp-in-place-cp:
|
||||||
(cd $(TREE) ; tar cf - .) | (cd $(INPLACEDIR) ; tar xf -)
|
(cd $(TREE) ; tar cf - .) | (cd $(INPLACEDIR) ; tar xf -)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
$(host)-stamp-3stage-done: do1 do2 do3 comparison
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
.PHONY: do1
|
.PHONY: do1
|
||||||
do1: $(host)-stamp-holes $(host)-stamp-stage1
|
do1: $(host)-stamp-holes $(host)-stamp-stage1
|
||||||
|
do1-config: $(host)-stamp-stage1-configured
|
||||||
|
do1-build: $(host)-stamp-stage1-checked
|
||||||
|
|
||||||
$(host)-stamp-stage1:
|
$(host)-stamp-stage1:
|
||||||
if [ -d $(STAGE1DIR) ] ; then \
|
if [ -d $(STAGE1DIR) ] ; then \
|
||||||
|
@ -120,32 +267,34 @@ $(host)-stamp-stage1:
|
||||||
true ; \
|
true ; \
|
||||||
fi
|
fi
|
||||||
PATH=`pwd`/$(HOLESDIR) ; \
|
PATH=`pwd`/$(HOLESDIR) ; \
|
||||||
export PATH ; \
|
export PATH ; \
|
||||||
SHELL=sh ; export SHELL ; \
|
SHELL=sh ; export SHELL ; \
|
||||||
$(TIME) $(GNU_MAKE) -f test-build.mk $(host)-stamp-stage1-installed host=$(host) $(FLAGS_TO_PASS)
|
$(TIME) $(GNU_MAKE) -f test-build.mk $(host)-stamp-stage1-installed host=$(host) $(FLAGS_TO_PASS) $(NATIVEC)
|
||||||
touch $@
|
touch $@
|
||||||
mv $(WORKING_DIR) $(STAGE1DIR)
|
if [ -f CLEAN_ALL ] ; then \
|
||||||
|
rm -rf $(WORKING_DIR) ; \
|
||||||
|
else \
|
||||||
|
mv $(WORKING_DIR) $(STAGE1DIR) ; \
|
||||||
|
fi
|
||||||
|
|
||||||
$(host)-stamp-stage1-installed: $(host)-stamp-stage1-checked
|
$(host)-stamp-stage1-installed: $(host)-stamp-stage1-checked
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) install host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" install host=$(host)
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) install-info host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" install-info host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage1-checked: $(host)-stamp-stage1-built
|
$(host)-stamp-stage1-checked: $(host)-stamp-stage1-built
|
||||||
# (cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) check host=$(host))
|
# cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" check host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage1-built: $(host)-stamp-stage1-configured
|
$(host)-stamp-stage1-built: $(host)-stamp-stage1-configured
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) all host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" all host=$(host)
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) info host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(MF) "CFLAGS=$(CFLAGS)" info host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage1-configured:
|
$(host)-stamp-stage1-configured:
|
||||||
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
||||||
(cd $(WORKING_DIR) ; \
|
cd $(WORKING_DIR) ; \
|
||||||
$(TIME) ../$(TREE)/configure $(host) -v -srcdir=../$(TREE) \
|
$(TIME) ../$(TREE)/configure $(host) -v -srcdir=../$(TREE) $(prefixes)
|
||||||
-prefix=$(release_root) \
|
|
||||||
-exec_prefix=$(release_root)/H-$(host))
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
.PHONY: do2
|
.PHONY: do2
|
||||||
|
@ -157,79 +306,69 @@ $(host)-stamp-stage2:
|
||||||
else \
|
else \
|
||||||
true ; \
|
true ; \
|
||||||
fi
|
fi
|
||||||
PATH=$(release_root)/H-$(host)/bin:`pwd`/$(HOLESDIR) ; \
|
PATH=$(relbindir):`pwd`/$(HOLESDIR) ; \
|
||||||
export PATH ; \
|
export PATH ; \
|
||||||
SHELL=sh ; export SHELL ; \
|
SHELL=sh ; export SHELL ; \
|
||||||
$(TIME) $(MAKE) -f test-build.mk -w $(STAGE2DIR) host=$(host) $(FLAGS_TO_PASS)
|
$(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage2-installed
|
||||||
|
mv $(WORKING_DIR) $(STAGE2DIR)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(STAGE2DIR): $(host)-stamp-stage2-installed
|
|
||||||
mv $(WORKING_DIR) $(STAGE2DIR)
|
|
||||||
|
|
||||||
$(host)-stamp-stage2-installed: $(host)-stamp-stage2-checked
|
$(host)-stamp-stage2-installed: $(host)-stamp-stage2-checked
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" install host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" install host=$(host)
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" install-info host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" install-info host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage2-checked: $(host)-stamp-stage2-built
|
$(host)-stamp-stage2-checked: $(host)-stamp-stage2-built
|
||||||
# (cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" check host=$(host))
|
# cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" check host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage2-built: $(host)-stamp-stage2-configured
|
$(host)-stamp-stage2-built: $(host)-stamp-stage2-configured
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" all host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" all host=$(host)
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" info host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" info host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage2-configured:
|
$(host)-stamp-stage2-configured:
|
||||||
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
||||||
(cd $(WORKING_DIR) ; \
|
cd $(WORKING_DIR) ; \
|
||||||
$(TIME) ../$(TREE)/configure $(host) -v -srcdir=../$(TREE) \
|
$(TIME) ../$(TREE)/configure $(host) -v -srcdir=../$(TREE) $(prefixes)
|
||||||
-prefix=$(release_root) \
|
|
||||||
-exec_prefix=$(release_root)/H-$(host))
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
.PHONY: do3
|
.PHONY: do3
|
||||||
do3: $(HOLESDIR) $(host)-stamp-stage3
|
do3: $(HOLESDIR) $(host)-stamp-stage3
|
||||||
|
|
||||||
$(host)-stamp-stage3:
|
$(host)-stamp-stage3:
|
||||||
if [ -d $(TREE)/gcc ] ; then \
|
if [ -d $(STAGE3DIR) ] ; then \
|
||||||
if [ -d $(STAGE3DIR) ] ; then \
|
mv $(STAGE3DIR) $(WORKING_DIR) ; \
|
||||||
mv $(STAGE3DIR) $(WORKING_DIR) ; \
|
|
||||||
else \
|
|
||||||
true ; \
|
|
||||||
fi ; \
|
|
||||||
PATH=$(release_root)/H-$(host)/bin:`pwd`/$(HOLESDIR) ; \
|
|
||||||
export PATH ; \
|
|
||||||
SHELL=sh ; export SHELL ; \
|
|
||||||
$(TIME) $(MAKE) -f test-build.mk -w $(STAGE3DIR) host=$(host) $(FLAGS_TO_PASS) ; \
|
|
||||||
else \
|
else \
|
||||||
true ; \
|
true ; \
|
||||||
fi
|
fi
|
||||||
|
PATH=$(relbindir):`pwd`/$(HOLESDIR) ; \
|
||||||
|
export PATH ; \
|
||||||
|
SHELL=sh ; export SHELL ; \
|
||||||
|
$(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage3-checked
|
||||||
|
mv $(WORKING_DIR) $(STAGE3DIR)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(STAGE3DIR): $(host)-stamp-stage3-checked
|
|
||||||
mv $(WORKING_DIR) $(STAGE3DIR)
|
|
||||||
|
|
||||||
$(host)-stamp-stage3-installed: $(host)-stamp-stage3-checked
|
$(host)-stamp-stage3-installed: $(host)-stamp-stage3-checked
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" install host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" install host=$(host)
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" install-info host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" install-info host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage3-checked: $(host)-stamp-stage3-built
|
$(host)-stamp-stage3-checked: $(host)-stamp-stage3-built
|
||||||
# (cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" check host=$(host))
|
# cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" check host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage3-built: $(host)-stamp-stage3-configured
|
$(host)-stamp-stage3-built: $(host)-stamp-stage3-configured
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" all host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" all host=$(host)
|
||||||
(cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) "CC=$(GCC)" info host=$(host))
|
cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(MF) $(GNUC) "CFLAGS=$(CFLAGS)" info host=$(host)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(host)-stamp-stage3-configured:
|
$(host)-stamp-stage3-configured:
|
||||||
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
[ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
|
||||||
(cd $(WORKING_DIR) ; \
|
cd $(WORKING_DIR) ; \
|
||||||
$(TIME) ../$(TREE)/configure $(host) -v -srcdir=../$(TREE) \
|
$(TIME) ../$(TREE)/configure $(host) -v -srcdir=../$(TREE) $(prefixes)
|
||||||
-prefix=$(release_root) \
|
|
||||||
-exec_prefix=$(release_root)/H-$(host))
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
# These things are needed by a three-stage, but are not included locally.
|
# These things are needed by a three-stage, but are not included locally.
|
||||||
|
@ -253,6 +392,7 @@ HOLES := \
|
||||||
expr \
|
expr \
|
||||||
find \
|
find \
|
||||||
grep \
|
grep \
|
||||||
|
head \
|
||||||
hostname \
|
hostname \
|
||||||
install \
|
install \
|
||||||
ld \
|
ld \
|
||||||
|
@ -285,8 +425,15 @@ else
|
||||||
MAKE_HOLE := make
|
MAKE_HOLE := make
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### solaris 2 -- don't use /usr/ucb/cc
|
||||||
|
ifeq (sparc-sun-solaris2,$(host))
|
||||||
|
CC_HOLE := cc
|
||||||
|
else
|
||||||
|
CC_HOLE :=
|
||||||
|
endif
|
||||||
|
|
||||||
### rs6000 as is busted. We cache a patched version in unsupported.
|
### rs6000 as is busted. We cache a patched version in unsupported.
|
||||||
ifeq ($(subst sun3,rs6000,$(host)),rs6000)
|
ifeq ($(host),rs6000-ibm-aix)
|
||||||
AS_HOLE := as
|
AS_HOLE := as
|
||||||
else
|
else
|
||||||
AS_HOLE :=
|
AS_HOLE :=
|
||||||
|
@ -296,6 +443,7 @@ endif
|
||||||
PARTIAL_HOLES := \
|
PARTIAL_HOLES := \
|
||||||
$(AS_HOLE) \
|
$(AS_HOLE) \
|
||||||
$(MAKE_HOLE) \
|
$(MAKE_HOLE) \
|
||||||
|
$(CC_HOLE) \
|
||||||
flex \
|
flex \
|
||||||
m4
|
m4
|
||||||
|
|
||||||
|
@ -304,12 +452,14 @@ HOLE_DIRS := \
|
||||||
/bin \
|
/bin \
|
||||||
/usr/bin \
|
/usr/bin \
|
||||||
/usr/ucb \
|
/usr/ucb \
|
||||||
|
/usr/ccs/bin \
|
||||||
/usr/unsupported/bin
|
/usr/unsupported/bin
|
||||||
|
|
||||||
### look in these directories for alternate versions of some tools.
|
### look in these directories for alternate versions of some tools.
|
||||||
PARTIAL_HOLE_DIRS := \
|
PARTIAL_HOLE_DIRS := \
|
||||||
/usr/latest/bin \
|
/usr/latest/bin \
|
||||||
/usr/progressive/bin \
|
/usr/progressive/bin \
|
||||||
|
/opt/cygnus/bin \
|
||||||
/usr/vintage/bin \
|
/usr/vintage/bin \
|
||||||
/usr/unsupported/bin
|
/usr/unsupported/bin
|
||||||
|
|
||||||
|
@ -318,7 +468,7 @@ $(HOLESDIR): $(host)-stamp-holes
|
||||||
$(host)-stamp-holes:
|
$(host)-stamp-holes:
|
||||||
-rm -rf $(HOLESDIR)
|
-rm -rf $(HOLESDIR)
|
||||||
-mkdir $(HOLESDIR)
|
-mkdir $(HOLESDIR)
|
||||||
for i in $(HOLES) ; do \
|
@for i in $(HOLES) ; do \
|
||||||
found= ; \
|
found= ; \
|
||||||
for j in $(HOLE_DIRS) ; do \
|
for j in $(HOLE_DIRS) ; do \
|
||||||
if [ -x $$j/$$i ] ; then \
|
if [ -x $$j/$$i ] ; then \
|
||||||
|
@ -333,7 +483,7 @@ $(host)-stamp-holes:
|
||||||
*) echo $$i is NOT found ;; \
|
*) echo $$i is NOT found ;; \
|
||||||
esac ; \
|
esac ; \
|
||||||
done
|
done
|
||||||
for i in $(PARTIAL_HOLES) ; do \
|
@for i in $(PARTIAL_HOLES) ; do \
|
||||||
found= ; \
|
found= ; \
|
||||||
for j in $(PARTIAL_HOLE_DIRS) ; do \
|
for j in $(PARTIAL_HOLE_DIRS) ; do \
|
||||||
if [ -x $$j/$$i ] ; then \
|
if [ -x $$j/$$i ] ; then \
|
||||||
|
@ -352,26 +502,39 @@ $(host)-stamp-holes:
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
.PHONY: comparison
|
.PHONY: comparison
|
||||||
comparison:
|
comparison: $(host)-stamp-3stage-compared
|
||||||
ifeq ($(subst rs6000,iris4,$(subst decstation,iris4,$(host))),iris4)
|
|
||||||
if [ -d $(TREE)/gcc ] ; then \
|
$(host)-stamp-3stage-compared:
|
||||||
for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
|
rm -f .bad-compare
|
||||||
tail +10c $(STAGE2DIR)/$$i > foo1 ; \
|
ifeq ($(subst rs6000-ibm-aix,mips-sgi-irix4,$(subst mips-dec-ultrix,mips-sgi-irix4,$(host))),mips-sgi-irix4)
|
||||||
tail +10c $(STAGE3DIR)/$$i > foo2 ; \
|
for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
|
||||||
cmp foo1 foo2 || echo $$i ; \
|
tail +10c $(STAGE2DIR)/$$i > foo1 ; \
|
||||||
done ; \
|
tail +10c $(STAGE3DIR)/$$i > foo2 ; \
|
||||||
else \
|
if cmp foo1 foo2 ; then \
|
||||||
true ; \
|
true ; \
|
||||||
fi
|
else \
|
||||||
|
echo $$i ; \
|
||||||
|
touch .bad-compare ; \
|
||||||
|
fi ; \
|
||||||
|
done
|
||||||
|
rm -f foo1 foo2
|
||||||
else
|
else
|
||||||
if [ -d $(TREE)/gcc ] ; then \
|
for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
|
||||||
for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
|
cmp $(STAGE2DIR)/$$i $(STAGE3DIR)/$$i || touch .bad-compare ; \
|
||||||
cmp $(STAGE2DIR)/$$i $(STAGE3DIR)/$$i ; \
|
done
|
||||||
done ; \
|
|
||||||
else \
|
|
||||||
true ; \
|
|
||||||
fi
|
|
||||||
endif
|
endif
|
||||||
|
if [ -f CLEAN_ALL ] ; then \
|
||||||
|
rm -rf $(STAGE2DIR) $(STAGE3DIR) ; \
|
||||||
|
else \
|
||||||
|
if [ -f CLEAN_STAGES ] ; then \
|
||||||
|
if [ -f .bad-compare ] ; then \
|
||||||
|
true ; \
|
||||||
|
else \
|
||||||
|
rm -rf $(STAGE1DIR) $(STAGE2DIR) ; \
|
||||||
|
fi ; \
|
||||||
|
fi ; \
|
||||||
|
fi
|
||||||
|
touch $@
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
@ -379,15 +542,7 @@ clean:
|
||||||
|
|
||||||
.PHONY: very
|
.PHONY: very
|
||||||
very:
|
very:
|
||||||
rm -rf $(TREE) $(TREE)-stamp-co
|
|
||||||
|
|
||||||
.PHONY: $(TREE)
|
|
||||||
$(TREE): $(TREE)-stamp-co
|
|
||||||
|
|
||||||
$(TREE)-stamp-co:
|
|
||||||
rm -rf $(TREE)
|
rm -rf $(TREE)
|
||||||
$(TIME) cvs co $(CVS_TAG) $(CVS_MODULE)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
force:
|
force:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue