2004-07-01 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (build_modules): Add bison, byacc, flex, m4, texinfo. (flags_to_pass): Add FLEX. * Makefile.tpl (BUILD_DIR_PREFIX, BASE_EXPORTS): New. (BUILD_EXPORTS, HOST_EXPORTS, BASE_TARGET_EXPORTS): Include it. (DEFAULT_YACC, USUAL_YACC, DEFAULT_LEX, USUAL_LEX, DEFAULT_M4, DEFAULT_MAKEINFO): Remove. (CONFIGURED_YACC, CONFIGURED_FLEX, CONFIGURED_BISON, CONFIGURED_LEX, CONFIGURED_M4, CONFIGURED_MAKEINFO): Substitute. (YACC, FLEX, BISON, LEX, M4, MAKEINFO): Define to look into objdir or else use configured tool. (all-build): New. (all): Depend on it. (Build module dependencies): Add. * Makefile.in: Regenerate. * configure.in: Better support for multiple build modules, matching what is done for host/target modules. Do not look for "plausible" locations of build tools if Canadian cross. Use autoconf's AC_PROG_CC to find a C compiler. Define BUILD_DIR_PREFIX. Look for flex, makeinfo and m4. * configure: Regenerate.
This commit is contained in:
parent
78c6a5b53a
commit
2cb47d686e
24
ChangeLog
24
ChangeLog
|
@ -1,3 +1,27 @@
|
||||||
|
2004-07-01 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
|
* Makefile.def (build_modules): Add bison, byacc, flex,
|
||||||
|
m4, texinfo.
|
||||||
|
(flags_to_pass): Add FLEX.
|
||||||
|
* Makefile.tpl (BUILD_DIR_PREFIX, BASE_EXPORTS): New.
|
||||||
|
(BUILD_EXPORTS, HOST_EXPORTS, BASE_TARGET_EXPORTS): Include it.
|
||||||
|
(DEFAULT_YACC, USUAL_YACC, DEFAULT_LEX, USUAL_LEX, DEFAULT_M4,
|
||||||
|
DEFAULT_MAKEINFO): Remove.
|
||||||
|
(CONFIGURED_YACC, CONFIGURED_FLEX, CONFIGURED_BISON,
|
||||||
|
CONFIGURED_LEX, CONFIGURED_M4, CONFIGURED_MAKEINFO): Substitute.
|
||||||
|
(YACC, FLEX, BISON, LEX, M4, MAKEINFO): Define to look into
|
||||||
|
objdir or else use configured tool.
|
||||||
|
(all-build): New.
|
||||||
|
(all): Depend on it.
|
||||||
|
(Build module dependencies): Add.
|
||||||
|
* Makefile.in: Regenerate.
|
||||||
|
* configure.in: Better support for multiple build modules,
|
||||||
|
matching what is done for host/target modules. Do not look
|
||||||
|
for "plausible" locations of build tools if Canadian cross.
|
||||||
|
Use autoconf's AC_PROG_CC to find a C compiler. Define
|
||||||
|
BUILD_DIR_PREFIX. Look for flex, makeinfo and m4.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2004-06-22 Paolo Bonzini <bonzini@gnu.org>
|
2004-06-22 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
* Makefile.tpl (HOST_EXPORTS): Fix pasto.
|
* Makefile.tpl (HOST_EXPORTS): Fix pasto.
|
||||||
|
|
|
@ -26,6 +26,11 @@ AutoGen definitions Makefile.tpl;
|
||||||
|
|
||||||
build_modules= { module= libiberty; };
|
build_modules= { module= libiberty; };
|
||||||
build_modules= { module= libbanshee; };
|
build_modules= { module= libbanshee; };
|
||||||
|
build_modules= { module= bison; };
|
||||||
|
build_modules= { module= byacc; };
|
||||||
|
build_modules= { module= flex; };
|
||||||
|
build_modules= { module= m4; };
|
||||||
|
build_modules= { module= texinfo; };
|
||||||
|
|
||||||
host_modules= { module= ash; };
|
host_modules= { module= ash; };
|
||||||
host_modules= { module= autoconf; };
|
host_modules= { module= autoconf; };
|
||||||
|
@ -177,6 +182,7 @@ flags_to_pass = { flag= BISON ; };
|
||||||
flags_to_pass = { flag= CC_FOR_BUILD ; };
|
flags_to_pass = { flag= CC_FOR_BUILD ; };
|
||||||
flags_to_pass = { flag= CXX_FOR_BUILD ; };
|
flags_to_pass = { flag= CXX_FOR_BUILD ; };
|
||||||
flags_to_pass = { flag= EXPECT ; };
|
flags_to_pass = { flag= EXPECT ; };
|
||||||
|
flags_to_pass = { flag= FLEX ; };
|
||||||
flags_to_pass = { flag= INSTALL ; };
|
flags_to_pass = { flag= INSTALL ; };
|
||||||
flags_to_pass = { flag= INSTALL_DATA ; };
|
flags_to_pass = { flag= INSTALL_DATA ; };
|
||||||
flags_to_pass = { flag= INSTALL_PROGRAM ; };
|
flags_to_pass = { flag= INSTALL_PROGRAM ; };
|
||||||
|
|
421
Makefile.in
421
Makefile.in
|
@ -110,11 +110,23 @@ BUILD_SUBDIR = @build_subdir@
|
||||||
# This is set by the configure script to the arguments to use when configuring
|
# This is set by the configure script to the arguments to use when configuring
|
||||||
# directories built for the build system.
|
# directories built for the build system.
|
||||||
BUILD_CONFIGARGS = @build_configargs@
|
BUILD_CONFIGARGS = @build_configargs@
|
||||||
|
|
||||||
# This is the list of variables to export in the environment when
|
# This is the list of variables to export in the environment when
|
||||||
# configuring subdirectories for the build system. It must also be
|
# configuring any subdirectory. It must also be exported whenever
|
||||||
# exported whenever recursing into a build directory in case that
|
# recursing into a build directory in case that directory's Makefile
|
||||||
# directory's Makefile re-runs configure.
|
# re-runs configure.
|
||||||
|
BASE_EXPORTS = \
|
||||||
|
FLEX="$(FLEX)"; export FLEX; \
|
||||||
|
LEX="$(LEX)"; export LEX; \
|
||||||
|
BISON="$(BISON)"; export BISON; \
|
||||||
|
YACC="$(YACC)"; export YACC; \
|
||||||
|
M4="$(M4)"; export M4; \
|
||||||
|
MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
|
||||||
|
|
||||||
|
# This is the list of variables to export in the environment when
|
||||||
|
# configuring subdirectories for the build system.
|
||||||
BUILD_EXPORTS = \
|
BUILD_EXPORTS = \
|
||||||
|
$(BASE_EXPORTS) \
|
||||||
AR="$(AR_FOR_BUILD)"; export AR; \
|
AR="$(AR_FOR_BUILD)"; export AR; \
|
||||||
AS="$(AS_FOR_BUILD)"; export AS; \
|
AS="$(AS_FOR_BUILD)"; export AS; \
|
||||||
CC="$(CC_FOR_BUILD)"; export CC; \
|
CC="$(CC_FOR_BUILD)"; export CC; \
|
||||||
|
@ -137,10 +149,9 @@ SUBDIRS = @configdirs@
|
||||||
# directories built for the host system.
|
# directories built for the host system.
|
||||||
HOST_CONFIGARGS = @host_configargs@
|
HOST_CONFIGARGS = @host_configargs@
|
||||||
# This is the list of variables to export in the environment when
|
# This is the list of variables to export in the environment when
|
||||||
# configuring subdirectories for the host system. It must also be
|
# configuring subdirectories for the host system.
|
||||||
# exported whenever recursing into a host directory in case that
|
|
||||||
# directory's Makefile re-runs configure.
|
|
||||||
HOST_EXPORTS = \
|
HOST_EXPORTS = \
|
||||||
|
$(BASE_EXPORTS) \
|
||||||
CC="$(CC)"; export CC; \
|
CC="$(CC)"; export CC; \
|
||||||
CFLAGS="$(CFLAGS)"; export CFLAGS; \
|
CFLAGS="$(CFLAGS)"; export CFLAGS; \
|
||||||
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
||||||
|
@ -176,10 +187,9 @@ TARGET_SUBDIR = @target_subdir@
|
||||||
# directories built for the target.
|
# directories built for the target.
|
||||||
TARGET_CONFIGARGS = @target_configargs@
|
TARGET_CONFIGARGS = @target_configargs@
|
||||||
# This is the list of variables to export in the environment when
|
# This is the list of variables to export in the environment when
|
||||||
# configuring subdirectories for the host system. It must also be
|
# configuring subdirectories for the host system.
|
||||||
# exported whenever recursing into a host directory in case that
|
|
||||||
# directory's Makefile re-runs configure.
|
|
||||||
BASE_TARGET_EXPORTS = \
|
BASE_TARGET_EXPORTS = \
|
||||||
|
$(BASE_EXPORTS) \
|
||||||
AR="$(AR_FOR_TARGET)"; export AR; \
|
AR="$(AR_FOR_TARGET)"; export AR; \
|
||||||
AS="$(AS_FOR_TARGET)"; export AS; \
|
AS="$(AS_FOR_TARGET)"; export AS; \
|
||||||
CC="$(CC_FOR_TARGET)"; export CC; \
|
CC="$(CC_FOR_TARGET)"; export CC; \
|
||||||
|
@ -230,47 +240,55 @@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
|
||||||
|
|
||||||
CXX_FOR_BUILD = $(CXX)
|
CXX_FOR_BUILD = $(CXX)
|
||||||
|
|
||||||
|
# Path to the build directory for a Canadian cross, empty otherwise.
|
||||||
|
BUILD_DIR_PREFIX = @BUILD_DIR_PREFIX@
|
||||||
|
|
||||||
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
|
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
|
||||||
# here so that they can be overridden by Makefile fragments.
|
# here so that they can be overridden by Makefile fragments.
|
||||||
BUILD_PREFIX = @BUILD_PREFIX@
|
BUILD_PREFIX = @BUILD_PREFIX@
|
||||||
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
|
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
|
||||||
|
|
||||||
BISON=@BISON@
|
CONFIGURED_BISON = @CONFIGURED_BISON@
|
||||||
USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
|
BISON = `if [ -f $$r/$(BUILD_DIR_PREFIX)/bison/bison ] ; then \
|
||||||
echo $$r/bison/bison -L $$s/bison/ ; \
|
echo $$r/$(BUILD_DIR_PREFIX)/bison/bison -L $$s/bison/ ; \
|
||||||
else \
|
else \
|
||||||
echo bison ; \
|
echo ${CONFIGURED_BISON} ; \
|
||||||
fi`
|
fi`
|
||||||
|
|
||||||
DEFAULT_YACC = @DEFAULT_YACC@
|
CONFIGURED_YACC = @CONFIGURED_YACC@
|
||||||
YACC=@YACC@
|
YACC = `if [ -f $$s/$(BUILD_DIR_PREFIX)/bison/bison ] ; then \
|
||||||
USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
|
echo $$r/$(BUILD_DIR_PREFIX)/bison/bison -y -L $$s/bison/ ; \
|
||||||
echo $$r/bison/bison -y -L $$s/bison/ ; \
|
elif [ -f $$s/$(BUILD_DIR_PREFIX)/byacc/byacc ] ; then \
|
||||||
elif [ -f $$r/byacc/byacc ] ; then \
|
echo $$r/$(BUILD_DIR_PREFIX)/byacc/byacc ; \
|
||||||
echo $$r/byacc/byacc ; \
|
|
||||||
else \
|
else \
|
||||||
echo ${DEFAULT_YACC} ; \
|
echo ${CONFIGURED_YACC} ; \
|
||||||
fi`
|
fi`
|
||||||
|
|
||||||
DEFAULT_LEX = @DEFAULT_LEX@
|
CONFIGURED_FLEX = @CONFIGURED_FLEX@
|
||||||
LEX=@LEX@
|
FLEX = `if [ -f $$r/$(BUILD_DIR_PREFIX)/flex/flex ] ; \
|
||||||
USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
|
then echo $$r/$(BUILD_DIR_PREFIX)/flex/flex ; \
|
||||||
then echo $$r/flex/flex ; \
|
else echo ${CONFIGURED_FLEX} ; fi`
|
||||||
else echo ${DEFAULT_LEX} ; fi`
|
|
||||||
|
|
||||||
DEFAULT_M4 = @DEFAULT_M4@
|
CONFIGURED_LEX = @CONFIGURED_LEX@
|
||||||
M4 = `if [ -f $$r/m4/m4 ] ; \
|
LEX = `if [ -f $$r/$(BUILD_DIR_PREFIX)/flex/flex ] ; \
|
||||||
then echo $$r/m4/m4 ; \
|
then echo $$r/$(BUILD_DIR_PREFIX)/flex/flex ; \
|
||||||
else echo ${DEFAULT_M4} ; fi`
|
else echo ${CONFIGURED_LEX} ; fi`
|
||||||
|
|
||||||
|
CONFIGURED_M4 = @CONFIGURED_M4@
|
||||||
|
M4 = `if [ -f $$r/$(BUILD_DIR_PREFIX)/m4/m4 ] ; \
|
||||||
|
then echo $$r/$(BUILD_DIR_PREFIX)/m4/m4 ; \
|
||||||
|
else echo ${CONFIGURED_M4} ; fi`
|
||||||
|
|
||||||
# For an installed makeinfo, we require it to be from texinfo 4.2 or
|
# For an installed makeinfo, we require it to be from texinfo 4.2 or
|
||||||
# higher, else we use the "missing" dummy.
|
# higher, else we use the "missing" dummy. We also pass the subdirectory
|
||||||
MAKEINFO=@MAKEINFO@
|
# makeinfo even if only the Makefile is there, because Texinfo builds its
|
||||||
USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
|
# manual when made, and it requires its own version.
|
||||||
then echo $$r/texinfo/makeinfo/makeinfo ; \
|
CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@
|
||||||
else if (makeinfo --version \
|
MAKEINFO = `if [ -f $$r/$(BUILD_DIR_PREFIX)/texinfo/makeinfo/Makefile ] ; \
|
||||||
|
then echo $$r/$(BUILD_DIR_PREFIX)/texinfo/makeinfo/makeinfo ; \
|
||||||
|
else if (${CONFIGURED_MAKEINFO} --version \
|
||||||
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
|
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
|
||||||
then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
|
then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
|
||||||
|
|
||||||
# This just becomes part of the MAKEINFO definition passed down to
|
# This just becomes part of the MAKEINFO definition passed down to
|
||||||
# sub-makes. It lets flags be given on the command line while still
|
# sub-makes. It lets flags be given on the command line while still
|
||||||
|
@ -506,6 +524,7 @@ BASE_FLAGS_TO_PASS = \
|
||||||
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
||||||
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
|
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
|
||||||
"EXPECT=$(EXPECT)" \
|
"EXPECT=$(EXPECT)" \
|
||||||
|
"FLEX=$(FLEX)" \
|
||||||
"INSTALL=$(INSTALL)" \
|
"INSTALL=$(INSTALL)" \
|
||||||
"INSTALL_DATA=$(INSTALL_DATA)" \
|
"INSTALL_DATA=$(INSTALL_DATA)" \
|
||||||
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
||||||
|
@ -713,8 +732,17 @@ configure-target: \
|
||||||
|
|
||||||
# The target built for a native non-bootstrap build.
|
# The target built for a native non-bootstrap build.
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: @all_build_modules@ all-host all-target
|
all: all-build all-host all-target
|
||||||
|
|
||||||
|
.PHONY: all-build
|
||||||
|
all-build: \
|
||||||
|
maybe-all-build-libiberty \
|
||||||
|
maybe-all-build-libbanshee \
|
||||||
|
maybe-all-build-bison \
|
||||||
|
maybe-all-build-byacc \
|
||||||
|
maybe-all-build-flex \
|
||||||
|
maybe-all-build-m4 \
|
||||||
|
maybe-all-build-texinfo
|
||||||
.PHONY: all-host
|
.PHONY: all-host
|
||||||
all-host: maybe-all-gcc \
|
all-host: maybe-all-gcc \
|
||||||
maybe-all-ash \
|
maybe-all-ash \
|
||||||
|
@ -2159,6 +2187,321 @@ all-build-libbanshee: configure-build-libbanshee
|
||||||
(cd $(BUILD_SUBDIR)/libbanshee && $(MAKE) all)
|
(cd $(BUILD_SUBDIR)/libbanshee && $(MAKE) all)
|
||||||
@endif build-libbanshee
|
@endif build-libbanshee
|
||||||
|
|
||||||
|
.PHONY: configure-build-bison maybe-configure-build-bison
|
||||||
|
maybe-configure-build-bison:
|
||||||
|
@if build-bison
|
||||||
|
maybe-configure-build-bison: configure-build-bison
|
||||||
|
configure-build-bison:
|
||||||
|
@test ! -f $(BUILD_SUBDIR)/bison/Makefile || exit 0; \
|
||||||
|
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/bison ; \
|
||||||
|
r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
echo Configuring in $(BUILD_SUBDIR)/bison; \
|
||||||
|
cd "$(BUILD_SUBDIR)/bison" || exit 1; \
|
||||||
|
case $(srcdir) in \
|
||||||
|
/* | [A-Za-z]:[\\/]*) \
|
||||||
|
topdir=$(srcdir) ;; \
|
||||||
|
*) \
|
||||||
|
case "$(BUILD_SUBDIR)" in \
|
||||||
|
.) topdir="../$(srcdir)" ;; \
|
||||||
|
*) topdir="../../$(srcdir)" ;; \
|
||||||
|
esac ;; \
|
||||||
|
esac; \
|
||||||
|
if [ "$(srcdir)" = "." ] ; then \
|
||||||
|
if [ "$(BUILD_SUBDIR)" != "." ] ; then \
|
||||||
|
if $(SHELL) $$s/symlink-tree $${topdir}/bison "no-such-file" ; then \
|
||||||
|
if [ -f Makefile ]; then \
|
||||||
|
if $(MAKE) distclean; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
srcdiroption="--srcdir=."; \
|
||||||
|
libsrcdir="."; \
|
||||||
|
else \
|
||||||
|
srcdiroption="--srcdir=$${topdir}/bison"; \
|
||||||
|
libsrcdir="$$s/bison"; \
|
||||||
|
fi; \
|
||||||
|
rm -f no-such-file || : ; \
|
||||||
|
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
|
||||||
|
$(BUILD_CONFIGARGS) $${srcdiroption} \
|
||||||
|
--with-build-subdir="$(BUILD_SUBDIR)" \
|
||||||
|
|| exit 1
|
||||||
|
@endif build-bison
|
||||||
|
|
||||||
|
.PHONY: all-build-bison maybe-all-build-bison
|
||||||
|
maybe-all-build-bison:
|
||||||
|
@if build-bison
|
||||||
|
maybe-all-build-bison: all-build-bison
|
||||||
|
all-build-bison: configure-build-bison
|
||||||
|
@r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
(cd $(BUILD_SUBDIR)/bison && $(MAKE) all)
|
||||||
|
@endif build-bison
|
||||||
|
|
||||||
|
.PHONY: configure-build-byacc maybe-configure-build-byacc
|
||||||
|
maybe-configure-build-byacc:
|
||||||
|
@if build-byacc
|
||||||
|
maybe-configure-build-byacc: configure-build-byacc
|
||||||
|
configure-build-byacc:
|
||||||
|
@test ! -f $(BUILD_SUBDIR)/byacc/Makefile || exit 0; \
|
||||||
|
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/byacc ; \
|
||||||
|
r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
echo Configuring in $(BUILD_SUBDIR)/byacc; \
|
||||||
|
cd "$(BUILD_SUBDIR)/byacc" || exit 1; \
|
||||||
|
case $(srcdir) in \
|
||||||
|
/* | [A-Za-z]:[\\/]*) \
|
||||||
|
topdir=$(srcdir) ;; \
|
||||||
|
*) \
|
||||||
|
case "$(BUILD_SUBDIR)" in \
|
||||||
|
.) topdir="../$(srcdir)" ;; \
|
||||||
|
*) topdir="../../$(srcdir)" ;; \
|
||||||
|
esac ;; \
|
||||||
|
esac; \
|
||||||
|
if [ "$(srcdir)" = "." ] ; then \
|
||||||
|
if [ "$(BUILD_SUBDIR)" != "." ] ; then \
|
||||||
|
if $(SHELL) $$s/symlink-tree $${topdir}/byacc "no-such-file" ; then \
|
||||||
|
if [ -f Makefile ]; then \
|
||||||
|
if $(MAKE) distclean; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
srcdiroption="--srcdir=."; \
|
||||||
|
libsrcdir="."; \
|
||||||
|
else \
|
||||||
|
srcdiroption="--srcdir=$${topdir}/byacc"; \
|
||||||
|
libsrcdir="$$s/byacc"; \
|
||||||
|
fi; \
|
||||||
|
rm -f no-such-file || : ; \
|
||||||
|
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
|
||||||
|
$(BUILD_CONFIGARGS) $${srcdiroption} \
|
||||||
|
--with-build-subdir="$(BUILD_SUBDIR)" \
|
||||||
|
|| exit 1
|
||||||
|
@endif build-byacc
|
||||||
|
|
||||||
|
.PHONY: all-build-byacc maybe-all-build-byacc
|
||||||
|
maybe-all-build-byacc:
|
||||||
|
@if build-byacc
|
||||||
|
maybe-all-build-byacc: all-build-byacc
|
||||||
|
all-build-byacc: configure-build-byacc
|
||||||
|
@r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
(cd $(BUILD_SUBDIR)/byacc && $(MAKE) all)
|
||||||
|
@endif build-byacc
|
||||||
|
|
||||||
|
.PHONY: configure-build-flex maybe-configure-build-flex
|
||||||
|
maybe-configure-build-flex:
|
||||||
|
@if build-flex
|
||||||
|
maybe-configure-build-flex: configure-build-flex
|
||||||
|
configure-build-flex:
|
||||||
|
@test ! -f $(BUILD_SUBDIR)/flex/Makefile || exit 0; \
|
||||||
|
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/flex ; \
|
||||||
|
r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
echo Configuring in $(BUILD_SUBDIR)/flex; \
|
||||||
|
cd "$(BUILD_SUBDIR)/flex" || exit 1; \
|
||||||
|
case $(srcdir) in \
|
||||||
|
/* | [A-Za-z]:[\\/]*) \
|
||||||
|
topdir=$(srcdir) ;; \
|
||||||
|
*) \
|
||||||
|
case "$(BUILD_SUBDIR)" in \
|
||||||
|
.) topdir="../$(srcdir)" ;; \
|
||||||
|
*) topdir="../../$(srcdir)" ;; \
|
||||||
|
esac ;; \
|
||||||
|
esac; \
|
||||||
|
if [ "$(srcdir)" = "." ] ; then \
|
||||||
|
if [ "$(BUILD_SUBDIR)" != "." ] ; then \
|
||||||
|
if $(SHELL) $$s/symlink-tree $${topdir}/flex "no-such-file" ; then \
|
||||||
|
if [ -f Makefile ]; then \
|
||||||
|
if $(MAKE) distclean; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
srcdiroption="--srcdir=."; \
|
||||||
|
libsrcdir="."; \
|
||||||
|
else \
|
||||||
|
srcdiroption="--srcdir=$${topdir}/flex"; \
|
||||||
|
libsrcdir="$$s/flex"; \
|
||||||
|
fi; \
|
||||||
|
rm -f no-such-file || : ; \
|
||||||
|
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
|
||||||
|
$(BUILD_CONFIGARGS) $${srcdiroption} \
|
||||||
|
--with-build-subdir="$(BUILD_SUBDIR)" \
|
||||||
|
|| exit 1
|
||||||
|
@endif build-flex
|
||||||
|
|
||||||
|
.PHONY: all-build-flex maybe-all-build-flex
|
||||||
|
maybe-all-build-flex:
|
||||||
|
@if build-flex
|
||||||
|
maybe-all-build-flex: all-build-flex
|
||||||
|
all-build-flex: configure-build-flex
|
||||||
|
@r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
(cd $(BUILD_SUBDIR)/flex && $(MAKE) all)
|
||||||
|
@endif build-flex
|
||||||
|
|
||||||
|
.PHONY: configure-build-m4 maybe-configure-build-m4
|
||||||
|
maybe-configure-build-m4:
|
||||||
|
@if build-m4
|
||||||
|
maybe-configure-build-m4: configure-build-m4
|
||||||
|
configure-build-m4:
|
||||||
|
@test ! -f $(BUILD_SUBDIR)/m4/Makefile || exit 0; \
|
||||||
|
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/m4 ; \
|
||||||
|
r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
echo Configuring in $(BUILD_SUBDIR)/m4; \
|
||||||
|
cd "$(BUILD_SUBDIR)/m4" || exit 1; \
|
||||||
|
case $(srcdir) in \
|
||||||
|
/* | [A-Za-z]:[\\/]*) \
|
||||||
|
topdir=$(srcdir) ;; \
|
||||||
|
*) \
|
||||||
|
case "$(BUILD_SUBDIR)" in \
|
||||||
|
.) topdir="../$(srcdir)" ;; \
|
||||||
|
*) topdir="../../$(srcdir)" ;; \
|
||||||
|
esac ;; \
|
||||||
|
esac; \
|
||||||
|
if [ "$(srcdir)" = "." ] ; then \
|
||||||
|
if [ "$(BUILD_SUBDIR)" != "." ] ; then \
|
||||||
|
if $(SHELL) $$s/symlink-tree $${topdir}/m4 "no-such-file" ; then \
|
||||||
|
if [ -f Makefile ]; then \
|
||||||
|
if $(MAKE) distclean; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
srcdiroption="--srcdir=."; \
|
||||||
|
libsrcdir="."; \
|
||||||
|
else \
|
||||||
|
srcdiroption="--srcdir=$${topdir}/m4"; \
|
||||||
|
libsrcdir="$$s/m4"; \
|
||||||
|
fi; \
|
||||||
|
rm -f no-such-file || : ; \
|
||||||
|
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
|
||||||
|
$(BUILD_CONFIGARGS) $${srcdiroption} \
|
||||||
|
--with-build-subdir="$(BUILD_SUBDIR)" \
|
||||||
|
|| exit 1
|
||||||
|
@endif build-m4
|
||||||
|
|
||||||
|
.PHONY: all-build-m4 maybe-all-build-m4
|
||||||
|
maybe-all-build-m4:
|
||||||
|
@if build-m4
|
||||||
|
maybe-all-build-m4: all-build-m4
|
||||||
|
all-build-m4: configure-build-m4
|
||||||
|
@r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
(cd $(BUILD_SUBDIR)/m4 && $(MAKE) all)
|
||||||
|
@endif build-m4
|
||||||
|
|
||||||
|
.PHONY: configure-build-texinfo maybe-configure-build-texinfo
|
||||||
|
maybe-configure-build-texinfo:
|
||||||
|
@if build-texinfo
|
||||||
|
maybe-configure-build-texinfo: configure-build-texinfo
|
||||||
|
configure-build-texinfo:
|
||||||
|
@test ! -f $(BUILD_SUBDIR)/texinfo/Makefile || exit 0; \
|
||||||
|
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/texinfo ; \
|
||||||
|
r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
echo Configuring in $(BUILD_SUBDIR)/texinfo; \
|
||||||
|
cd "$(BUILD_SUBDIR)/texinfo" || exit 1; \
|
||||||
|
case $(srcdir) in \
|
||||||
|
/* | [A-Za-z]:[\\/]*) \
|
||||||
|
topdir=$(srcdir) ;; \
|
||||||
|
*) \
|
||||||
|
case "$(BUILD_SUBDIR)" in \
|
||||||
|
.) topdir="../$(srcdir)" ;; \
|
||||||
|
*) topdir="../../$(srcdir)" ;; \
|
||||||
|
esac ;; \
|
||||||
|
esac; \
|
||||||
|
if [ "$(srcdir)" = "." ] ; then \
|
||||||
|
if [ "$(BUILD_SUBDIR)" != "." ] ; then \
|
||||||
|
if $(SHELL) $$s/symlink-tree $${topdir}/texinfo "no-such-file" ; then \
|
||||||
|
if [ -f Makefile ]; then \
|
||||||
|
if $(MAKE) distclean; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi; \
|
||||||
|
srcdiroption="--srcdir=."; \
|
||||||
|
libsrcdir="."; \
|
||||||
|
else \
|
||||||
|
srcdiroption="--srcdir=$${topdir}/texinfo"; \
|
||||||
|
libsrcdir="$$s/texinfo"; \
|
||||||
|
fi; \
|
||||||
|
rm -f no-such-file || : ; \
|
||||||
|
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
|
||||||
|
$(BUILD_CONFIGARGS) $${srcdiroption} \
|
||||||
|
--with-build-subdir="$(BUILD_SUBDIR)" \
|
||||||
|
|| exit 1
|
||||||
|
@endif build-texinfo
|
||||||
|
|
||||||
|
.PHONY: all-build-texinfo maybe-all-build-texinfo
|
||||||
|
maybe-all-build-texinfo:
|
||||||
|
@if build-texinfo
|
||||||
|
maybe-all-build-texinfo: all-build-texinfo
|
||||||
|
all-build-texinfo: configure-build-texinfo
|
||||||
|
@r=`${PWD_COMMAND}`; export r; \
|
||||||
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
|
$(BUILD_EXPORTS) \
|
||||||
|
(cd $(BUILD_SUBDIR)/texinfo && $(MAKE) all)
|
||||||
|
@endif build-texinfo
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
# Modules which run on the host machine
|
# Modules which run on the host machine
|
||||||
|
@ -28842,6 +29185,12 @@ profiledbootstrap: all-bootstrap configure-gcc
|
||||||
# are specified by depending on a 'maybe-' target. If you're not sure,
|
# are specified by depending on a 'maybe-' target. If you're not sure,
|
||||||
# it's safer to use a soft dependency.
|
# it's safer to use a soft dependency.
|
||||||
|
|
||||||
|
# Build modules
|
||||||
|
all-build-bison: maybe-all-build-texinfo
|
||||||
|
all-build-flex: maybe-all-build-texinfo
|
||||||
|
all-build-libiberty: maybe-all-build-texinfo
|
||||||
|
all-build-m4: maybe-all-build-libiberty maybe-all-build-texinfo
|
||||||
|
|
||||||
# Host modules specific to gcc.
|
# Host modules specific to gcc.
|
||||||
# GCC needs to identify certain tools.
|
# GCC needs to identify certain tools.
|
||||||
# GCC also needs the information exported by the intl configure script.
|
# GCC also needs the information exported by the intl configure script.
|
||||||
|
|
101
Makefile.tpl
101
Makefile.tpl
|
@ -113,11 +113,23 @@ BUILD_SUBDIR = @build_subdir@
|
||||||
# This is set by the configure script to the arguments to use when configuring
|
# This is set by the configure script to the arguments to use when configuring
|
||||||
# directories built for the build system.
|
# directories built for the build system.
|
||||||
BUILD_CONFIGARGS = @build_configargs@
|
BUILD_CONFIGARGS = @build_configargs@
|
||||||
|
|
||||||
# This is the list of variables to export in the environment when
|
# This is the list of variables to export in the environment when
|
||||||
# configuring subdirectories for the build system. It must also be
|
# configuring any subdirectory. It must also be exported whenever
|
||||||
# exported whenever recursing into a build directory in case that
|
# recursing into a build directory in case that directory's Makefile
|
||||||
# directory's Makefile re-runs configure.
|
# re-runs configure.
|
||||||
|
BASE_EXPORTS = \
|
||||||
|
FLEX="$(FLEX)"; export FLEX; \
|
||||||
|
LEX="$(LEX)"; export LEX; \
|
||||||
|
BISON="$(BISON)"; export BISON; \
|
||||||
|
YACC="$(YACC)"; export YACC; \
|
||||||
|
M4="$(M4)"; export M4; \
|
||||||
|
MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
|
||||||
|
|
||||||
|
# This is the list of variables to export in the environment when
|
||||||
|
# configuring subdirectories for the build system.
|
||||||
BUILD_EXPORTS = \
|
BUILD_EXPORTS = \
|
||||||
|
$(BASE_EXPORTS) \
|
||||||
AR="$(AR_FOR_BUILD)"; export AR; \
|
AR="$(AR_FOR_BUILD)"; export AR; \
|
||||||
AS="$(AS_FOR_BUILD)"; export AS; \
|
AS="$(AS_FOR_BUILD)"; export AS; \
|
||||||
CC="$(CC_FOR_BUILD)"; export CC; \
|
CC="$(CC_FOR_BUILD)"; export CC; \
|
||||||
|
@ -140,10 +152,9 @@ SUBDIRS = @configdirs@
|
||||||
# directories built for the host system.
|
# directories built for the host system.
|
||||||
HOST_CONFIGARGS = @host_configargs@
|
HOST_CONFIGARGS = @host_configargs@
|
||||||
# This is the list of variables to export in the environment when
|
# This is the list of variables to export in the environment when
|
||||||
# configuring subdirectories for the host system. It must also be
|
# configuring subdirectories for the host system.
|
||||||
# exported whenever recursing into a host directory in case that
|
|
||||||
# directory's Makefile re-runs configure.
|
|
||||||
HOST_EXPORTS = \
|
HOST_EXPORTS = \
|
||||||
|
$(BASE_EXPORTS) \
|
||||||
CC="$(CC)"; export CC; \
|
CC="$(CC)"; export CC; \
|
||||||
CFLAGS="$(CFLAGS)"; export CFLAGS; \
|
CFLAGS="$(CFLAGS)"; export CFLAGS; \
|
||||||
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
||||||
|
@ -179,10 +190,9 @@ TARGET_SUBDIR = @target_subdir@
|
||||||
# directories built for the target.
|
# directories built for the target.
|
||||||
TARGET_CONFIGARGS = @target_configargs@
|
TARGET_CONFIGARGS = @target_configargs@
|
||||||
# This is the list of variables to export in the environment when
|
# This is the list of variables to export in the environment when
|
||||||
# configuring subdirectories for the host system. It must also be
|
# configuring subdirectories for the host system.
|
||||||
# exported whenever recursing into a host directory in case that
|
|
||||||
# directory's Makefile re-runs configure.
|
|
||||||
BASE_TARGET_EXPORTS = \
|
BASE_TARGET_EXPORTS = \
|
||||||
|
$(BASE_EXPORTS) \
|
||||||
AR="$(AR_FOR_TARGET)"; export AR; \
|
AR="$(AR_FOR_TARGET)"; export AR; \
|
||||||
AS="$(AS_FOR_TARGET)"; export AS; \
|
AS="$(AS_FOR_TARGET)"; export AS; \
|
||||||
CC="$(CC_FOR_TARGET)"; export CC; \
|
CC="$(CC_FOR_TARGET)"; export CC; \
|
||||||
|
@ -233,47 +243,55 @@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
|
||||||
|
|
||||||
CXX_FOR_BUILD = $(CXX)
|
CXX_FOR_BUILD = $(CXX)
|
||||||
|
|
||||||
|
# Path to the build directory for a Canadian cross, empty otherwise.
|
||||||
|
BUILD_DIR_PREFIX = @BUILD_DIR_PREFIX@
|
||||||
|
|
||||||
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
|
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
|
||||||
# here so that they can be overridden by Makefile fragments.
|
# here so that they can be overridden by Makefile fragments.
|
||||||
BUILD_PREFIX = @BUILD_PREFIX@
|
BUILD_PREFIX = @BUILD_PREFIX@
|
||||||
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
|
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
|
||||||
|
|
||||||
BISON=@BISON@
|
CONFIGURED_BISON = @CONFIGURED_BISON@
|
||||||
USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
|
BISON = `if [ -f $$r/$(BUILD_DIR_PREFIX)/bison/bison ] ; then \
|
||||||
echo $$r/bison/bison -L $$s/bison/ ; \
|
echo $$r/$(BUILD_DIR_PREFIX)/bison/bison -L $$s/bison/ ; \
|
||||||
else \
|
else \
|
||||||
echo bison ; \
|
echo ${CONFIGURED_BISON} ; \
|
||||||
fi`
|
fi`
|
||||||
|
|
||||||
DEFAULT_YACC = @DEFAULT_YACC@
|
CONFIGURED_YACC = @CONFIGURED_YACC@
|
||||||
YACC=@YACC@
|
YACC = `if [ -f $$s/$(BUILD_DIR_PREFIX)/bison/bison ] ; then \
|
||||||
USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
|
echo $$r/$(BUILD_DIR_PREFIX)/bison/bison -y -L $$s/bison/ ; \
|
||||||
echo $$r/bison/bison -y -L $$s/bison/ ; \
|
elif [ -f $$s/$(BUILD_DIR_PREFIX)/byacc/byacc ] ; then \
|
||||||
elif [ -f $$r/byacc/byacc ] ; then \
|
echo $$r/$(BUILD_DIR_PREFIX)/byacc/byacc ; \
|
||||||
echo $$r/byacc/byacc ; \
|
|
||||||
else \
|
else \
|
||||||
echo ${DEFAULT_YACC} ; \
|
echo ${CONFIGURED_YACC} ; \
|
||||||
fi`
|
fi`
|
||||||
|
|
||||||
DEFAULT_LEX = @DEFAULT_LEX@
|
CONFIGURED_FLEX = @CONFIGURED_FLEX@
|
||||||
LEX=@LEX@
|
FLEX = `if [ -f $$r/$(BUILD_DIR_PREFIX)/flex/flex ] ; \
|
||||||
USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
|
then echo $$r/$(BUILD_DIR_PREFIX)/flex/flex ; \
|
||||||
then echo $$r/flex/flex ; \
|
else echo ${CONFIGURED_FLEX} ; fi`
|
||||||
else echo ${DEFAULT_LEX} ; fi`
|
|
||||||
|
|
||||||
DEFAULT_M4 = @DEFAULT_M4@
|
CONFIGURED_LEX = @CONFIGURED_LEX@
|
||||||
M4 = `if [ -f $$r/m4/m4 ] ; \
|
LEX = `if [ -f $$r/$(BUILD_DIR_PREFIX)/flex/flex ] ; \
|
||||||
then echo $$r/m4/m4 ; \
|
then echo $$r/$(BUILD_DIR_PREFIX)/flex/flex ; \
|
||||||
else echo ${DEFAULT_M4} ; fi`
|
else echo ${CONFIGURED_LEX} ; fi`
|
||||||
|
|
||||||
|
CONFIGURED_M4 = @CONFIGURED_M4@
|
||||||
|
M4 = `if [ -f $$r/$(BUILD_DIR_PREFIX)/m4/m4 ] ; \
|
||||||
|
then echo $$r/$(BUILD_DIR_PREFIX)/m4/m4 ; \
|
||||||
|
else echo ${CONFIGURED_M4} ; fi`
|
||||||
|
|
||||||
# For an installed makeinfo, we require it to be from texinfo 4.2 or
|
# For an installed makeinfo, we require it to be from texinfo 4.2 or
|
||||||
# higher, else we use the "missing" dummy.
|
# higher, else we use the "missing" dummy. We also pass the subdirectory
|
||||||
MAKEINFO=@MAKEINFO@
|
# makeinfo even if only the Makefile is there, because Texinfo builds its
|
||||||
USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
|
# manual when made, and it requires its own version.
|
||||||
then echo $$r/texinfo/makeinfo/makeinfo ; \
|
CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@
|
||||||
else if (makeinfo --version \
|
MAKEINFO = `if [ -f $$r/$(BUILD_DIR_PREFIX)/texinfo/makeinfo/Makefile ] ; \
|
||||||
|
then echo $$r/$(BUILD_DIR_PREFIX)/texinfo/makeinfo/makeinfo ; \
|
||||||
|
else if (${CONFIGURED_MAKEINFO} --version \
|
||||||
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
|
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
|
||||||
then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
|
then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
|
||||||
|
|
||||||
# This just becomes part of the MAKEINFO definition passed down to
|
# This just becomes part of the MAKEINFO definition passed down to
|
||||||
# sub-makes. It lets flags be given on the command line while still
|
# sub-makes. It lets flags be given on the command line while still
|
||||||
|
@ -577,8 +595,13 @@ configure-target: [+
|
||||||
|
|
||||||
# The target built for a native non-bootstrap build.
|
# The target built for a native non-bootstrap build.
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: @all_build_modules@ all-host all-target
|
all: all-build all-host all-target
|
||||||
|
|
||||||
|
.PHONY: all-build
|
||||||
|
all-build: [+
|
||||||
|
FOR build_modules +] \
|
||||||
|
maybe-all-build-[+module+][+
|
||||||
|
ENDFOR build_modules +]
|
||||||
.PHONY: all-host
|
.PHONY: all-host
|
||||||
all-host: maybe-all-gcc [+
|
all-host: maybe-all-gcc [+
|
||||||
FOR host_modules +] \
|
FOR host_modules +] \
|
||||||
|
@ -1642,6 +1665,12 @@ profiledbootstrap: all-bootstrap configure-gcc
|
||||||
# are specified by depending on a 'maybe-' target. If you're not sure,
|
# are specified by depending on a 'maybe-' target. If you're not sure,
|
||||||
# it's safer to use a soft dependency.
|
# it's safer to use a soft dependency.
|
||||||
|
|
||||||
|
# Build modules
|
||||||
|
all-build-bison: maybe-all-build-texinfo
|
||||||
|
all-build-flex: maybe-all-build-texinfo
|
||||||
|
all-build-libiberty: maybe-all-build-texinfo
|
||||||
|
all-build-m4: maybe-all-build-libiberty maybe-all-build-texinfo
|
||||||
|
|
||||||
# Host modules specific to gcc.
|
# Host modules specific to gcc.
|
||||||
# GCC needs to identify certain tools.
|
# GCC needs to identify certain tools.
|
||||||
# GCC also needs the information exported by the intl configure script.
|
# GCC also needs the information exported by the intl configure script.
|
||||||
|
|
168
configure.in
168
configure.in
|
@ -126,6 +126,14 @@ fi
|
||||||
# Double entries in build_configdirs, configdirs, or target_configdirs may
|
# Double entries in build_configdirs, configdirs, or target_configdirs may
|
||||||
# cause circular dependencies and break everything horribly.
|
# cause circular dependencies and break everything horribly.
|
||||||
|
|
||||||
|
# these library is used by various programs built for the build
|
||||||
|
# environment
|
||||||
|
#
|
||||||
|
build_libs="build-libiberty"
|
||||||
|
|
||||||
|
# these tools are built for the build environment
|
||||||
|
build_tools="build-texinfo build-byacc build-flex build-bison build-m4"
|
||||||
|
|
||||||
# these libraries are used by various programs built for the host environment
|
# these libraries are used by various programs built for the host environment
|
||||||
#
|
#
|
||||||
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib libbanshee libcpp"
|
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib libbanshee libcpp"
|
||||||
|
@ -173,20 +181,14 @@ target_tools="target-examples target-groff target-gperf target-rda"
|
||||||
## is important because configure will choke if they ever get through.
|
## is important because configure will choke if they ever get through.
|
||||||
## ${configdirs} is directories we build using the host tools.
|
## ${configdirs} is directories we build using the host tools.
|
||||||
## ${target_configdirs} is directories we build using the target tools.
|
## ${target_configdirs} is directories we build using the target tools.
|
||||||
#
|
|
||||||
configdirs=`echo ${host_libs} ${host_tools}`
|
configdirs=`echo ${host_libs} ${host_tools}`
|
||||||
target_configdirs=`echo ${target_libraries} ${target_tools}`
|
target_configdirs=`echo ${target_libraries} ${target_tools}`
|
||||||
|
|
||||||
# Only make build modules if build != host.
|
# Only make build modules if build != host.
|
||||||
# This should be done more generally, but at the moment it doesn't matter.
|
|
||||||
if test ${host_alias} != ${build_alias} ; then
|
if test ${host_alias} != ${build_alias} ; then
|
||||||
# This is the only build module.
|
build_configdirs=`echo ${build_libs} ${build_tools}`
|
||||||
build_modules=libiberty
|
|
||||||
else
|
|
||||||
build_modules=
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
srcname="gnu development package"
|
srcname="gnu development package"
|
||||||
|
@ -956,7 +958,6 @@ if test "${build}" != "${host}" ; then
|
||||||
# If we are doing a Canadian Cross, in which the host and build systems
|
# If we are doing a Canadian Cross, in which the host and build systems
|
||||||
# are not the same, we set reasonable default values for the tools.
|
# are not the same, we set reasonable default values for the tools.
|
||||||
|
|
||||||
BISON=${BISON-bison}
|
|
||||||
CC=${CC-${host_alias}-gcc}
|
CC=${CC-${host_alias}-gcc}
|
||||||
CFLAGS=${CFLAGS-"-g -O2"}
|
CFLAGS=${CFLAGS-"-g -O2"}
|
||||||
CXX=${CXX-${host_alias}-c++}
|
CXX=${CXX-${host_alias}-c++}
|
||||||
|
@ -966,49 +967,9 @@ if test "${build}" != "${host}" ; then
|
||||||
CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
|
CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
|
||||||
GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
|
GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
|
||||||
GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
|
GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
|
||||||
|
BUILD_DIR_PREFIX=${build_subdir}
|
||||||
BUILD_PREFIX=${build_alias}-
|
BUILD_PREFIX=${build_alias}-
|
||||||
BUILD_PREFIX_1=${build_alias}-
|
BUILD_PREFIX_1=${build_alias}-
|
||||||
MAKEINFO=${MAKEINFO-makeinfo}
|
|
||||||
|
|
||||||
if test -z "${YACC}" ; then
|
|
||||||
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
|
|
||||||
for dir in $PATH; do
|
|
||||||
test -z "$dir" && dir=.
|
|
||||||
if test -f $dir/bison; then
|
|
||||||
YACC="bison -y"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f $dir/byacc; then
|
|
||||||
YACC=byacc
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f $dir/yacc; then
|
|
||||||
YACC=yacc
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS="$save_ifs"
|
|
||||||
if test -z "${YACC}" ; then
|
|
||||||
YACC="bison -y"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "${LEX}" ; then
|
|
||||||
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
|
|
||||||
for dir in $PATH; do
|
|
||||||
test -z "$dir" && dir=.
|
|
||||||
if test -f $dir/flex; then
|
|
||||||
LEX=flex
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f $dir/lex; then
|
|
||||||
LEX=lex
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS="$save_ifs"
|
|
||||||
LEX=${LEX-flex}
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
else
|
||||||
# Set reasonable default values for some tools even if not Canadian.
|
# Set reasonable default values for some tools even if not Canadian.
|
||||||
|
@ -1019,71 +980,19 @@ else
|
||||||
# in Makefile.in, so can still be overridden by fragments.
|
# in Makefile.in, so can still be overridden by fragments.
|
||||||
# This is all going to change when we autoconfiscate...
|
# This is all going to change when we autoconfiscate...
|
||||||
|
|
||||||
BISON="\$(USUAL_BISON)"
|
|
||||||
CC_FOR_BUILD="\$(CC)"
|
CC_FOR_BUILD="\$(CC)"
|
||||||
GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
|
GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
|
||||||
|
BUILD_DIR_PREFIX=
|
||||||
BUILD_PREFIX=
|
BUILD_PREFIX=
|
||||||
BUILD_PREFIX_1=loser-
|
BUILD_PREFIX_1=loser-
|
||||||
MAKEINFO="\$(USUAL_MAKEINFO)"
|
|
||||||
LEX="\$(USUAL_LEX)"
|
|
||||||
YACC="\$(USUAL_YACC)"
|
|
||||||
|
|
||||||
# If CC is still not set, try to get gcc.
|
AC_PROG_CC
|
||||||
cc_prog_is_gcc=
|
|
||||||
if test -z "${CC}" ; then
|
|
||||||
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
|
|
||||||
for dir in $PATH; do
|
|
||||||
test -z "$dir" && dir=.
|
|
||||||
if test -f $dir/gcc; then
|
|
||||||
CC="gcc"
|
|
||||||
cc_prog_is_gcc=yes
|
|
||||||
echo 'void f(){}' > conftest.c
|
|
||||||
if test -z "`${CC} -g -c conftest.c 2>&1`"; then
|
|
||||||
CFLAGS=${CFLAGS-"-g -O2"}
|
|
||||||
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
|
||||||
else
|
|
||||||
CFLAGS=${CFLAGS-"-O2"}
|
|
||||||
CXXFLAGS=${CXXFLAGS-"-O2"}
|
|
||||||
fi
|
|
||||||
rm -f conftest*
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS="$save_ifs"
|
|
||||||
CC=${CC-cc}
|
|
||||||
else
|
|
||||||
# Determine if we are using gcc.
|
|
||||||
cat > conftest.c <<EOF
|
|
||||||
#ifdef __GNUC__
|
|
||||||
yes;
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
|
|
||||||
cc_prog_is_gcc=yes
|
|
||||||
fi
|
|
||||||
rm -f conftest.c
|
|
||||||
if test -z "${CFLAGS}"; then
|
|
||||||
# Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
|
|
||||||
# is set to a version of gcc.
|
|
||||||
if test "$cc_prog_is_gcc" = yes; then
|
|
||||||
echo 'void f(){}' > conftest.c
|
|
||||||
if test -z "`${CC} -g -c conftest.c 2>&1`"; then
|
|
||||||
CFLAGS=${CFLAGS-"-g -O2"}
|
|
||||||
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
|
||||||
else
|
|
||||||
CFLAGS=${CFLAGS-"-O2"}
|
|
||||||
CXXFLAGS=${CXXFLAGS-"-O2"}
|
|
||||||
fi
|
|
||||||
rm -f conftest*
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We must set the default linker to the linker used by gcc for the correct
|
# We must set the default linker to the linker used by gcc for the correct
|
||||||
# operation of libtool. If LD is not defined and we are using gcc, try to
|
# operation of libtool. If LD is not defined and we are using gcc, try to
|
||||||
# set the LD default to the ld used by gcc.
|
# set the LD default to the ld used by gcc.
|
||||||
if test -z "$LD"; then
|
if test -z "$LD"; then
|
||||||
if test "$cc_prog_is_gcc" = yes; then
|
if test "$GCC" = yes; then
|
||||||
case $build in
|
case $build in
|
||||||
*-*-mingw*)
|
*-*-mingw*)
|
||||||
gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
|
gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
|
||||||
|
@ -1349,6 +1258,15 @@ fi
|
||||||
# Quietly strip out all directories which aren't configurable in this tree.
|
# Quietly strip out all directories which aren't configurable in this tree.
|
||||||
# This relies on all configurable subdirectories being autoconfiscated, which
|
# This relies on all configurable subdirectories being autoconfiscated, which
|
||||||
# is now the case.
|
# is now the case.
|
||||||
|
build_configdirs_all="$build_configdirs"
|
||||||
|
build_configdirs=
|
||||||
|
for i in ${build_configdirs_all} ; do
|
||||||
|
j=`echo $i | sed -e s/build-//g`
|
||||||
|
if test -f ${srcdir}/$j/configure ; then
|
||||||
|
build_configdirs="${build_configdirs} $i"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
configdirs_all="$configdirs"
|
configdirs_all="$configdirs"
|
||||||
configdirs=
|
configdirs=
|
||||||
for i in ${configdirs_all} ; do
|
for i in ${configdirs_all} ; do
|
||||||
|
@ -1356,6 +1274,7 @@ for i in ${configdirs_all} ; do
|
||||||
configdirs="${configdirs} $i"
|
configdirs="${configdirs} $i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
target_configdirs_all="$target_configdirs"
|
target_configdirs_all="$target_configdirs"
|
||||||
target_configdirs=
|
target_configdirs=
|
||||||
for i in ${target_configdirs_all} ; do
|
for i in ${target_configdirs_all} ; do
|
||||||
|
@ -1382,7 +1301,7 @@ if test -n "${notsupp}" && test -z "${norecursion}" ; then
|
||||||
appdirs=""
|
appdirs=""
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
|
||||||
appdirs=""
|
appdirs=""
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -1597,12 +1516,16 @@ esac
|
||||||
tooldir='${exec_prefix}'/${target_alias}
|
tooldir='${exec_prefix}'/${target_alias}
|
||||||
build_tooldir=${tooldir}
|
build_tooldir=${tooldir}
|
||||||
|
|
||||||
# Generate default definitions for YACC, M4, LEX. These are used if the
|
# Generate default definitions for YACC, M4, LEX and other programs that run
|
||||||
# Makefile can't locate these programs in objdir.
|
# on the build machine. These are used if the Makefile can't locate these
|
||||||
|
# programs in objdir.
|
||||||
MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
|
MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
|
||||||
AC_CHECK_PROGS([DEFAULT_YACC], ['bison -y' byacc yacc], [$MISSING bison])
|
AC_CHECK_PROGS([CONFIGURED_BISON], [bison], [$MISSING bison])
|
||||||
AC_CHECK_PROGS([DEFAULT_M4], [gm4 gnum4 m4], [$MISSING m4])
|
AC_CHECK_PROGS([CONFIGURED_YACC], ['bison -y' byacc yacc], [$MISSING bison -y])
|
||||||
AC_CHECK_PROGS([DEFAULT_LEX], [flex lex], [$MISSING flex])
|
AC_CHECK_PROGS([CONFIGURED_M4], [gm4 gnum4 m4], [$MISSING m4])
|
||||||
|
AC_CHECK_PROGS([CONFIGURED_FLEX], [flex], [$MISSING flex])
|
||||||
|
AC_CHECK_PROGS([CONFIGURED_LEX], [flex lex], [$MISSING flex])
|
||||||
|
AC_CHECK_PROGS([CONFIGURED_MAKEINFO], makeinfo, [$MISSING makeinfo])
|
||||||
|
|
||||||
# Create a .gdbinit file which runs the one in srcdir
|
# Create a .gdbinit file which runs the one in srcdir
|
||||||
# and tells GDB to look there for source files.
|
# and tells GDB to look there for source files.
|
||||||
|
@ -1685,17 +1608,7 @@ esac
|
||||||
# Record target_configdirs and the configure arguments for target and
|
# Record target_configdirs and the configure arguments for target and
|
||||||
# build configuration in Makefile.
|
# build configuration in Makefile.
|
||||||
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
|
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
|
||||||
|
build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
|
||||||
# This is the final value for target_configdirs. configdirs already
|
|
||||||
# has its final value, as does build_modules. It's time to create some
|
|
||||||
# lists of valid targets.
|
|
||||||
|
|
||||||
all_build_modules=
|
|
||||||
configure_build_modules=
|
|
||||||
for module in ${build_modules} ; do
|
|
||||||
all_build_modules=all-build-${module}
|
|
||||||
configure_build_modules=configure-build-${module}
|
|
||||||
done
|
|
||||||
|
|
||||||
# Determine whether gdb needs tk/tcl or not.
|
# Determine whether gdb needs tk/tcl or not.
|
||||||
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
|
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
|
||||||
|
@ -1761,7 +1674,7 @@ case "$enable_bootstrap" in
|
||||||
esac
|
esac
|
||||||
AC_SUBST(default_target)
|
AC_SUBST(default_target)
|
||||||
|
|
||||||
for module in ${build_modules} ; do
|
for module in ${build_configdirs} ; do
|
||||||
if test -z "${no_recursion}" \
|
if test -z "${no_recursion}" \
|
||||||
&& test -f ${build_subdir}/${module}/Makefile; then
|
&& test -f ${build_subdir}/${module}/Makefile; then
|
||||||
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
|
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
|
||||||
|
@ -2138,6 +2051,7 @@ AC_SUBST_FILE(ospace_frag)
|
||||||
# Miscellanea: directories, flags, etc.
|
# Miscellanea: directories, flags, etc.
|
||||||
AC_SUBST(SET_LIB_PATH)
|
AC_SUBST(SET_LIB_PATH)
|
||||||
AC_SUBST(RPATH_ENVVAR)
|
AC_SUBST(RPATH_ENVVAR)
|
||||||
|
AC_SUBST(BUILD_DIR_PREFIX)
|
||||||
AC_SUBST(BUILD_PREFIX)
|
AC_SUBST(BUILD_PREFIX)
|
||||||
AC_SUBST(BUILD_PREFIX_1)
|
AC_SUBST(BUILD_PREFIX_1)
|
||||||
AC_SUBST(gcc_version_trigger)
|
AC_SUBST(gcc_version_trigger)
|
||||||
|
@ -2150,8 +2064,7 @@ AC_SUBST(libstdcxx_incdir)
|
||||||
|
|
||||||
# Build module lists & subconfigure args.
|
# Build module lists & subconfigure args.
|
||||||
AC_SUBST(build_configargs)
|
AC_SUBST(build_configargs)
|
||||||
AC_SUBST(configure_build_modules)
|
AC_SUBST(build_configdirs)
|
||||||
AC_SUBST(all_build_modules)
|
|
||||||
|
|
||||||
# Host module lists & subconfigure args.
|
# Host module lists & subconfigure args.
|
||||||
AC_SUBST(host_configargs)
|
AC_SUBST(host_configargs)
|
||||||
|
@ -2162,11 +2075,7 @@ AC_SUBST(target_configargs)
|
||||||
AC_SUBST(target_configdirs)
|
AC_SUBST(target_configdirs)
|
||||||
|
|
||||||
# Build tools.
|
# Build tools.
|
||||||
AC_SUBST(BISON)
|
|
||||||
AC_SUBST(CC_FOR_BUILD)
|
AC_SUBST(CC_FOR_BUILD)
|
||||||
AC_SUBST(LEX)
|
|
||||||
AC_SUBST(MAKEINFO)
|
|
||||||
AC_SUBST(YACC)
|
|
||||||
AC_SUBST(config_shell)
|
AC_SUBST(config_shell)
|
||||||
|
|
||||||
# Host tools.
|
# Host tools.
|
||||||
|
@ -2184,9 +2093,6 @@ AC_SUBST(CXX)
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
AC_SUBST(CFLAGS_FOR_BUILD)
|
AC_SUBST(CFLAGS_FOR_BUILD)
|
||||||
AC_SUBST(CXXFLAGS)
|
AC_SUBST(CXXFLAGS)
|
||||||
AC_SUBST(DEFAULT_YACC)
|
|
||||||
AC_SUBST(DEFAULT_LEX)
|
|
||||||
AC_SUBST(DEFAULT_M4)
|
|
||||||
|
|
||||||
# Target tools.
|
# Target tools.
|
||||||
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AR_FOR_TARGET, ar)
|
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AR_FOR_TARGET, ar)
|
||||||
|
|
Loading…
Reference in New Issue