* Re: (toplevel patch) host subconfigures in Makefile, fixed version
@ 2002-12-03 16:44 Nathanael Nerode
2002-12-03 17:00 ` DJ Delorie
0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2002-12-03 16:44 UTC (permalink / raw)
To: gcc-patches, gdb-patches, binutils, dj
>> # gcc is the only module which uses GCC_FLAGS_TO_PASS.
>
>Could we use an automake conditional to cut down on the replication?
^^^^s/make/gen
We certainly can, and will. Bruce actually sent me a decent way of
doing this. The reason I wrote things out is that I
actually anticipate some changes for purposes of accuracy, and I
wouldn't be at all surprised if gcc's 'configure' section ought to
deviate from that of other host modules.
In my previous completed versions, there's actually a section in
Makefile.def called "flags_to_pass", with an entry for each flag,
and Makefile.tpl simply loops over them, inserting the ones appropriate
for the situation. I intend to do that eventually. (Which flags are
passed down when is a great mish-mash right now and I want to spend some
time simplifying it as much as I can.)
(My ideal layout involves adding a HOST_SUBDIR as well as BUILD_SUBDIR
and TARGET_SUBDIR, and effectively unifying all of those sections.
There's some evidence that this isn't a good idea though.)
>> +expect/Makefile: configure-tcl maybe-configure-tk
>
>No maybe here?
I believe that I tried it with TCL installed and not in the tree, and it
failed. It shouldn't have though... so you're right, that should be a
maybe. Will change.
--Nathanael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: (toplevel patch) host subconfigures in Makefile, fixed version
2002-12-03 16:44 (toplevel patch) host subconfigures in Makefile, fixed version Nathanael Nerode
@ 2002-12-03 17:00 ` DJ Delorie
0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2002-12-03 17:00 UTC (permalink / raw)
To: neroden; +Cc: gcc-patches, gdb-patches, binutils
Ok, approved then.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: (toplevel patch) host subconfigures in Makefile, fixed version
2002-12-03 16:23 Nathanael Nerode
@ 2002-12-03 16:29 ` DJ Delorie
0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2002-12-03 16:29 UTC (permalink / raw)
To: neroden; +Cc: gcc-patches, gdb-patches, binutils
> # gcc is the only module which uses GCC_FLAGS_TO_PASS.
Could we use an automake conditional to cut down on the replication?
> +expect/Makefile: configure-tcl maybe-configure-tk
No maybe here?
^ permalink raw reply [flat|nested] 4+ messages in thread
* (toplevel patch) host subconfigures in Makefile, fixed version
@ 2002-12-03 16:23 Nathanael Nerode
2002-12-03 16:29 ` DJ Delorie
0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2002-12-03 16:23 UTC (permalink / raw)
To: gcc-patches, gdb-patches, binutils, dj
Typo which I'd fixed somehow crept into my previous submission.
Update of http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01885.html
Tested on i686-pc-linux-gnu. This doesn't configure in
the Makefile by default, so it's pretty safe. I'll do that a bit later. :-)
* Makefile.tpl: Add targets for configuring host subdirs in Makefile,
and corresponding dependencies.
* Makefile.in: Regenerate.
--- Makefile.tpl 2002-12-03 16:20:16.000000000 -0500
+++ Makefile.tpl.newer 2002-12-03 18:46:48.000000000 -0500
@@ -867,6 +867,47 @@
# Modules which run on the host machine
# --------------------------------------
[+ FOR host_modules +]
+.PHONY: configure-[+module+] maybe-configure-[+module+]
+maybe-configure-[+module+]:
+configure-[+module+]: [+module+]/Makefile
+
+[+module+]/Makefile: config.status
+ @[ -d [+module+] ] || mkdir [+module+]; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ fi; \
+ echo Configuring in [+module+]; \
+ cd [+module+] || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/[+module+]"; \
+ libsrcdir="$$s/[+module+]";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/[+module+]"; \
+ libsrcdir="$$s/[+module+]";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+
.PHONY: all-[+module+] maybe-all-[+module+]
maybe-all-[+module+]:
all-[+module+]:
@@ -1057,6 +1098,47 @@
# build modules. So GCC is a sort of hybrid.
# gcc is the only module which uses GCC_FLAGS_TO_PASS.
+.PHONY: configure-gcc maybe-configure-gcc
+maybe-configure-gcc:
+configure-gcc: gcc/Makefile
+
+gcc/Makefile: config.status
+ @[ -d gcc ] || mkdir gcc; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ fi; \
+ echo Configuring in gcc; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+
.PHONY: all-gcc maybe-all-gcc
maybe-all-gcc:
all-gcc:
@@ -1190,6 +1272,8 @@
# it's safer to use a soft dependency.
# Host modules specific to gcc.
+# GCC needs to identify certain tools.
+gcc/Makefile: maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
all-gcc: maybe-all-libiberty maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
# This is a slightly kludgy method of getting dependencies on
# all-build-libiberty correct; it would be better to build it every time.
@@ -1197,12 +1281,16 @@
all-bootstrap: maybe-all-libiberty maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
# Host modules specific to gdb.
+# GDB needs to know that the simulator is being built.
+gdb/Makefile: maybe-configure-tcl maybe-configure-tk maybe-configure-sim
GDB_TK = @GDB_TK@
all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
+libgui/Makefile: maybe-configure-tcl maybe-configure-tk
all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
# Host modules specific to binutils.
+bfd/Makefile: configure-libiberty
all-bfd: maybe-all-libiberty maybe-all-intl
all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
# We put install-opcodes before install-binutils because the installed
@@ -1216,7 +1304,9 @@
# Other host modules in the 'src' repository.
all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
+expect/Makefile: configure-tcl maybe-configure-tk
all-expect: maybe-all-tcl maybe-all-tk
+itcl/Makefile: maybe-configure-tcl maybe-configure-tk
all-itcl: maybe-all-tcl maybe-all-tk
# We put install-tcl before install-itcl because itcl wants to run a
# program on installation which uses the Tcl libraries.
@@ -1224,7 +1314,9 @@
all-sid: maybe-all-tcl maybe-all-tk
install-sid: maybe-install-tcl maybe-install-tk
all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline
+tk/Makefile: maybe-configure-tcl
all-tk: maybe-all-tcl
+tix/Makefile: maybe-configure-tcl maybe-configure-tk
all-tix: maybe-all-tcl maybe-all-tk
all-texinfo: maybe-all-libiberty
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-12-04 1:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-03 16:44 (toplevel patch) host subconfigures in Makefile, fixed version Nathanael Nerode
2002-12-03 17:00 ` DJ Delorie
-- strict thread matches above, loose matches on Subject: below --
2002-12-03 16:23 Nathanael Nerode
2002-12-03 16:29 ` DJ Delorie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox