2005-04-06 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (BUILD_CONFIGARGS): Include --with-build-subdir. (TARGET_CONFIGARGS): Include --with-target-subdir. (configure, all): New macros. Use them throughout.
This commit is contained in:
parent
4ef6a27a5a
commit
f0fdfd3454
@ -1,3 +1,9 @@
|
|||||||
|
2005-04-06 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
|
* Makefile.tpl (BUILD_CONFIGARGS): Include --with-build-subdir.
|
||||||
|
(TARGET_CONFIGARGS): Include --with-target-subdir.
|
||||||
|
(configure, all): New macros. Use them throughout.
|
||||||
|
|
||||||
2005-04-05 Paolo Bonzini <bonzini@gnu.org>
|
2005-04-05 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
* Makefile.tpl: Sync with gcc.
|
* Makefile.tpl: Sync with gcc.
|
||||||
|
889
Makefile.in
889
Makefile.in
File diff suppressed because it is too large
Load Diff
193
Makefile.tpl
193
Makefile.tpl
@ -93,7 +93,7 @@ BUILD_CONFIGDIRS = libiberty
|
|||||||
BUILD_SUBDIR = @build_subdir@
|
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@ --with-build-subdir="$(BUILD_SUBDIR)"
|
||||||
|
|
||||||
# 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 any subdirectory. It must also be exported whenever
|
# configuring any subdirectory. It must also be exported whenever
|
||||||
@ -178,7 +178,7 @@ TARGET_CONFIGDIRS = @target_configdirs@
|
|||||||
TARGET_SUBDIR = @target_subdir@
|
TARGET_SUBDIR = @target_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 target.
|
# directories built for the target.
|
||||||
TARGET_CONFIGARGS = @target_configargs@
|
TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
|
||||||
# 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.
|
# configuring subdirectories for the host system.
|
||||||
BASE_TARGET_EXPORTS = \
|
BASE_TARGET_EXPORTS = \
|
||||||
@ -818,92 +818,74 @@ etags tags: TAGS
|
|||||||
# built are.
|
# built are.
|
||||||
TAGS: do-TAGS
|
TAGS: do-TAGS
|
||||||
|
|
||||||
# --------------------------------------
|
# ------------------------------------
|
||||||
# Modules which run on the build machine
|
# Macros for configure and all targets
|
||||||
# --------------------------------------
|
# ------------------------------------
|
||||||
[+ FOR build_modules +]
|
|
||||||
.PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
|
[+ DEFINE configure +]
|
||||||
maybe-configure-build-[+module+]:
|
.PHONY: configure-[+prefix+][+module+] maybe-configure-[+prefix+][+module+]
|
||||||
@if build-[+module+]
|
maybe-configure-[+prefix+][+module+]:
|
||||||
maybe-configure-build-[+module+]: configure-build-[+module+]
|
@if [+prefix+][+module+]
|
||||||
configure-build-[+module+]:
|
maybe-configure-[+prefix+][+module+]: configure-[+prefix+][+module+]
|
||||||
@test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \
|
configure-[+prefix+][+module+]: [+deps+]
|
||||||
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/[+module+] ; \
|
@[+ IF bootstrap +]test -f stage_last && exit 0; \
|
||||||
|
[+ ENDIF bootstrap +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
|
||||||
|
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
|
||||||
r=`${PWD_COMMAND}`; export r; \
|
r=`${PWD_COMMAND}`; export r; \
|
||||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
$(BUILD_EXPORTS) \
|
[+exports+] \
|
||||||
echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
|
echo Configuring in [+subdir+]/[+module+]; \
|
||||||
cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
|
cd "[+subdir+]/[+module+]" || exit 1; \
|
||||||
case $(srcdir) in \
|
case $(srcdir) in \
|
||||||
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
|
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
|
||||||
*) topdir=`echo $(BUILD_SUBDIR)/[+module+]/ | \
|
*) topdir=`echo [+subdir+]/[+module+]/ | \
|
||||||
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
|
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
|
||||||
esac; \
|
esac; \
|
||||||
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
|
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
|
||||||
libsrcdir="$$s/[+module+]"; \
|
libsrcdir="$$s/[+module+]"; \
|
||||||
rm -f no-such-file || : ; \
|
[+ IF no-config-site +]rm -f no-such-file || : ; \
|
||||||
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
|
CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) $${libsrcdir}/configure \
|
||||||
$(BUILD_CONFIGARGS) $${srcdiroption} \
|
[+args+] $${srcdiroption} [+extra_configure_flags+] \
|
||||||
--with-build-subdir="$(BUILD_SUBDIR)" [+extra_configure_flags+] \
|
|
||||||
|| exit 1
|
|| exit 1
|
||||||
@endif build-[+module+]
|
@endif [+prefix+][+module+]
|
||||||
|
[+ ENDDEF +]
|
||||||
|
|
||||||
.PHONY: all-build-[+module+] maybe-all-build-[+module+]
|
[+ DEFINE all +]
|
||||||
maybe-all-build-[+module+]:
|
.PHONY: all-[+prefix+][+module+] maybe-all-[+prefix+][+module+]
|
||||||
@if build-[+module+]
|
maybe-all-[+prefix+][+module+]:
|
||||||
TARGET-build-[+module+]=[+ IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
|
@if [+prefix+][+module+]
|
||||||
maybe-all-build-[+module+]: all-build-[+module+]
|
TARGET-[+prefix+][+module+]=[+
|
||||||
all-build-[+module+]: configure-build-[+module+]
|
IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
|
||||||
@r=`${PWD_COMMAND}`; export r; \
|
maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+]
|
||||||
|
all-[+prefix+][+module+]: configure-[+prefix+][+module+]
|
||||||
|
@[+ IF bootstrap +]test -f stage_last && exit 0; \
|
||||||
|
[+ ENDIF bootstrap +]r=`${PWD_COMMAND}`; export r; \
|
||||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||||
$(BUILD_EXPORTS) \
|
[+exports+] \
|
||||||
(cd $(BUILD_SUBDIR)/[+module+] && \
|
(cd [+subdir+]/[+module+] && \
|
||||||
$(MAKE) [+extra_make_flags+] $(TARGET-build-[+module+]))
|
$(MAKE) [+args+] [+extra_make_flags+] $(TARGET-[+prefix+][+module+]))
|
||||||
@endif build-[+module+]
|
@endif [+prefix+][+module+]
|
||||||
[+ ENDFOR build_modules +]
|
[+ ENDDEF +]
|
||||||
|
|
||||||
|
# --------------------------------------
|
||||||
|
# Modules which run on the build machine
|
||||||
|
# --------------------------------------
|
||||||
|
[+ FOR build_modules +]
|
||||||
|
[+ configure prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
|
||||||
|
args="$(BUILD_CONFIGARGS)" no-config-site=true +]
|
||||||
|
|
||||||
|
[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +]
|
||||||
|
[+ ENDFOR build_module +]
|
||||||
|
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
# Modules which run on the host machine
|
# Modules which run on the host machine
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
[+ FOR host_modules +]
|
[+ FOR host_modules +]
|
||||||
.PHONY: configure-[+module+] maybe-configure-[+module+]
|
[+ configure prefix="" subdir="$(HOST_SUBDIR)" exports="$(HOST_EXPORTS)"
|
||||||
maybe-configure-[+module+]:
|
args="$(HOST_CONFIGARGS)" +]
|
||||||
@if [+module+]
|
|
||||||
maybe-configure-[+module+]: configure-[+module+]
|
|
||||||
configure-[+module+]:
|
|
||||||
@[+ IF bootstrap +]test -f stage_last && exit 0; \
|
|
||||||
[+ ENDIF bootstrap +]test ! -f $(HOST_SUBDIR)/[+module+]/Makefile || exit 0; \
|
|
||||||
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/[+module+] ; \
|
|
||||||
r=`${PWD_COMMAND}`; export r; \
|
|
||||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
|
||||||
$(HOST_EXPORTS) \
|
|
||||||
echo Configuring in [+module+]; \
|
|
||||||
cd $(HOST_SUBDIR)/[+module+] || exit 1; \
|
|
||||||
case $(srcdir) in \
|
|
||||||
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
|
|
||||||
*) topdir=`echo $(HOST_SUBDIR)/[+module+]/ | \
|
|
||||||
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
|
|
||||||
esac; \
|
|
||||||
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
|
|
||||||
libsrcdir="$$s/[+module+]"; \
|
|
||||||
$(SHELL) $${libsrcdir}/configure \
|
|
||||||
$(HOST_CONFIGARGS) $${srcdiroption} [+extra_configure_flags+] \
|
|
||||||
|| exit 1
|
|
||||||
@endif [+module+]
|
|
||||||
|
|
||||||
.PHONY: all-[+module+] maybe-all-[+module+]
|
[+ all prefix="" subdir="$(HOST_SUBDIR)" exports="$(HOST_EXPORTS)"
|
||||||
maybe-all-[+module+]:
|
args="$(FLAGS_TO_PASS)" +]
|
||||||
@if [+module+]
|
|
||||||
TARGET-[+module+]=[+ IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
|
|
||||||
maybe-all-[+module+]: all-[+module+]
|
|
||||||
all-[+module+]: configure-[+module+]
|
|
||||||
@[+ IF bootstrap +]test -f stage_last && exit 0; \
|
|
||||||
[+ ENDIF bootstrap +]r=`${PWD_COMMAND}`; export r; \
|
|
||||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
|
||||||
$(HOST_EXPORTS) \
|
|
||||||
(cd $(HOST_SUBDIR)/[+module+] && \
|
|
||||||
$(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] $(TARGET-[+module+]))
|
|
||||||
@endif [+module+]
|
|
||||||
|
|
||||||
.PHONY: check-[+module+] maybe-check-[+module+]
|
.PHONY: check-[+module+] maybe-check-[+module+]
|
||||||
maybe-check-[+module+]:
|
maybe-check-[+module+]:
|
||||||
@ -985,63 +967,34 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
|
|||||||
# Modules which run on the target machine
|
# Modules which run on the target machine
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
[+ FOR target_modules +]
|
[+ FOR target_modules +]
|
||||||
.PHONY: configure-target-[+module+] maybe-configure-target-[+module+]
|
|
||||||
maybe-configure-target-[+module+]:
|
|
||||||
@if target-[+module+]
|
|
||||||
maybe-configure-target-[+module+]: configure-target-[+module+]
|
|
||||||
|
|
||||||
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
|
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
|
||||||
|
@if target-[+module+]
|
||||||
$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
|
$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
|
||||||
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
|
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
|
||||||
rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \
|
rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \
|
||||||
cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
|
cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
|
||||||
|
|
||||||
configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/multilib.out
|
|
||||||
@test ! -f $(TARGET_SUBDIR)/[+module+]/Makefile || exit 0; \
|
|
||||||
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
|
|
||||||
r=`${PWD_COMMAND}`; export r; \
|
|
||||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
|
|
||||||
IF raw_cxx +]
|
|
||||||
$(RAW_CXX_TARGET_EXPORTS) \[+
|
|
||||||
ELSE normal_cxx +]
|
|
||||||
$(NORMAL_TARGET_EXPORTS) \[+
|
|
||||||
ENDIF raw_cxx +]
|
|
||||||
echo Configuring in $(TARGET_SUBDIR)/[+module+]; \
|
|
||||||
cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \
|
|
||||||
case $(srcdir) in \
|
|
||||||
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
|
|
||||||
*) topdir=`echo $(TARGET_SUBDIR)/[+module+]/ | \
|
|
||||||
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
|
|
||||||
esac; \
|
|
||||||
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
|
|
||||||
libsrcdir="$$s/[+module+]"; \
|
|
||||||
rm -f no-such-file || : ; \
|
|
||||||
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
|
|
||||||
$(TARGET_CONFIGARGS) $${srcdiroption} \
|
|
||||||
--with-target-subdir="$(TARGET_SUBDIR)" [+extra_configure_flags+] \
|
|
||||||
|| exit 1
|
|
||||||
@endif target-[+module+]
|
@endif target-[+module+]
|
||||||
|
|
||||||
.PHONY: all-target-[+module+] maybe-all-target-[+module+]
|
[+ IF raw_cxx +]
|
||||||
maybe-all-target-[+module+]:
|
[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
|
||||||
@if target-[+module+]
|
deps=(string-append "$(TARGET_SUBDIR)/" (get "module") "/multilib.out")
|
||||||
TARGET-target-[+module+]=[+ IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
|
exports="$(RAW_CXX_TARGET_EXPORTS)"
|
||||||
maybe-all-target-[+module+]: all-target-[+module+]
|
args="$(TARGET_CONFIGARGS)" no-config-site=true +]
|
||||||
all-target-[+module+]: configure-target-[+module+]
|
|
||||||
@r=`${PWD_COMMAND}`; export r; \
|
[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
|
||||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
|
exports="$(RAW_CXX_TARGET_EXPORTS)"
|
||||||
IF raw_cxx +]
|
args="$(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
|
||||||
$(RAW_CXX_TARGET_EXPORTS) \[+
|
[+ ELSE +]
|
||||||
ELSE normal_cxx +]
|
[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
|
||||||
$(NORMAL_TARGET_EXPORTS) \[+
|
deps=(string-append "$(TARGET_SUBDIR)/" (get "module") "/multilib.out")
|
||||||
ENDIF raw_cxx +]
|
exports="$(NORMAL_TARGET_EXPORTS)"
|
||||||
(cd $(TARGET_SUBDIR)/[+module+] && \
|
args="$(TARGET_CONFIGARGS)" no-config-site=true +]
|
||||||
$(MAKE) $(TARGET_FLAGS_TO_PASS) [+
|
|
||||||
IF raw_cxx
|
[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
|
||||||
+] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
|
exports="$(NORMAL_TARGET_EXPORTS)"
|
||||||
ENDIF raw_cxx
|
args="$(TARGET_FLAGS_TO_PASS)" +]
|
||||||
+] [+extra_make_flags+] $(TARGET-target-[+module+]))
|
[+ ENDIF +]
|
||||||
@endif target-[+module+]
|
|
||||||
|
|
||||||
.PHONY: check-target-[+module+] maybe-check-target-[+module+]
|
.PHONY: check-target-[+module+] maybe-check-target-[+module+]
|
||||||
maybe-check-target-[+module+]:
|
maybe-check-target-[+module+]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user