From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] sim: fix arch Makefile regen when unified
Date: Wed, 30 Jun 2021 13:24:50 -0400 [thread overview]
Message-ID: <YNyo4pNRRM3Tvtnt@vapier> (raw)
In-Reply-To: <87k0mbp9ma.fsf@tromey.com>
On 30 Jun 2021 11:04, Tom Tromey wrote:
> >>>>> "Mike" == Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Mike> -@SIM_COMMON_BUILD_TRUE@ cd .. && $(SHELL) ./config.status $(arch)/Makefile
> Mike> +@SIM_COMMON_BUILD_TRUE@ pwd=`pwd` && subdir=`basename "$$pwd"` && cd .. && \
> Mike> +@SIM_COMMON_BUILD_TRUE@ $(SHELL) ./config.status Make-common.sim $$subdir/Makefile.sim $$subdir/Makefile
>
> My understanding is that the argument to config.status is the "tag" (aka
> filename) of the output -- so the other arguments aren't needed.
> If those are also outputs, there should just be new rules for them.
Make-common.sim is a common rule shared by all subdirs.
subdir/Makefile.sim & subdir/Makefile are separate rules (and files).
Makefile.sim uses the existing autotool infra to rewrite the source
subdir/Makefile.in (as i don't think i can easily do this myself),
and then the final subdir/Makefile blends the Make-common.sim in.
$src/common/Make-common.in -> $build/Make-common.sim
$src/$arch/Makefile.in -> $build/$arch/Makefile.sim
$build/Make-common.sim + $build/$arch/Makefile.sim -> $build/$arch/Makefile
it's a bit convoluted still, but it's not exactly new ... the sim code
has been doing this for a while. i've moved bits around by merging into
a single configure script, but it's still the same number of bits.
the long term plan is to convert it over to automake & subdir/local.mk
modules, then this code would all go away.
-mike
prev parent reply other threads:[~2021-06-30 17:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 0:51 Mike Frysinger via Gdb-patches
2021-06-30 17:04 ` Tom Tromey
2021-06-30 17:24 ` Mike Frysinger via Gdb-patches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YNyo4pNRRM3Tvtnt@vapier \
--to=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox