From: Greg Kurz <groug@kaod.org>
To: Connor Kuehl <ckuehl@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] Makefile: Add back TAGS/ctags/cscope rules
Date: Tue, 1 Sep 2020 17:18:11 +0200 [thread overview]
Message-ID: <20200901171811.24debd1d@bahia.lan> (raw)
In-Reply-To: <f31b9650-9db4-e038-9e4d-bd5faf1f5b96@redhat.com>
On Tue, 1 Sep 2020 09:59:23 -0500
Connor Kuehl <ckuehl@redhat.com> wrote:
> On 9/1/20 9:20 AM, Greg Kurz wrote:
> > It is a bit of a pain to be forced to run configure before being able
> > to use cscope and friends. Add back the rules to build them in-tree
> > as before commit a56650518f5b.
> >
> > Fixes: a56650518f5b ("configure: integrate Meson in the build system")
> > Signed-off-by: Greg Kurz <groug@kaod.org>
>
> This might be a user error on my part, but the way I read this it sounds
> like I could do this:
>
> $ rm -rf build
> $ make cscope
>
> and have it emit a cscope file, but when I do so it complains about the
> build dir not existing. As I understand it, running ./configure (or
> meson build) is what generates that build dir. Here's the error for
> posterity:
>
> changing dir to build for make "cscope"...
> make[1]: *** build: No such file or directory. Stop.
> make: *** [GNUmakefile:11: cscope] Error 2
>
My use case is :
$ git clone git://git.qemu.org/qemu.git && cd qemu && make cscope
Cloning into 'qemu'...
remote: Counting objects: 510519, done.
remote: Compressing objects: 100% (91407/91407), done.
remote: Total 510519 (delta 420069), reused 507399 (delta 417643)
Receiving objects: 100% (510519/510519), 180.42 MiB | 29.30 MiB/s, done.
Resolving deltas: 100% (420069/420069), done.
make: Nothing to be done for 'cscope'.
> One comment inline
>
> > ---
> > Makefile | 17 ++++++++++++++++-
> > 1 file changed, 16 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 81794d5c34a2..8ffe2872915d 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -62,7 +62,7 @@ ninja-distclean::
> > build.ninja: config-host.mak
> >
> > Makefile.ninja: build.ninja ninjatool
> > - ./ninjatool -t ninja2make --omit clean dist uninstall < $< > $@
> > + ./ninjatool -t ninja2make --omit clean dist uninstall cscope TAGS ctags < $< > $@
> > -include Makefile.ninja
> >
> > ${ninja-targets-c_COMPILER} ${ninja-targets-cpp_COMPILER}: .var.command += -MP
> > @@ -229,6 +229,21 @@ distclean: clean ninja-distclean
> > rm -f linux-headers/asm
> > rm -Rf .sdk
> >
> > +.PHONY: ctags
> > +ctags:
> > + rm -f tags
> > + find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
> > +
> > +.PHONY: TAGS
> > +TAGS:
> > + rm -f TAGS
> > + find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
> > +
> > +cscope:
>
> Since this recipe doesn't output an artifact called "cscope" I wonder if
> this should be:
>
> .PHONY: cscope
We already have it somewhere else in the makefile:
.PHONY: all clean cscope distclean install \
Since this patch is a partial revert of a56650518f5b, I didn't consider
moving it here.
Cheers,
--
Greg
> cscope:
> ...
>
> or alternatively:
>
> cscope.out:
> ...
>
>
> > + rm -f "$(SRC_PATH)"/cscope.*
> > + find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
> > + cscope -b -i"$(SRC_PATH)/cscope.files"
> > +
> > ifdef INSTALL_BLOBS
> > BLOBS=bios.bin bios-256k.bin bios-microvm.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
> > vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \
> >
> >
> >
>
> Connor
>
next prev parent reply other threads:[~2020-09-01 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 14:20 [PATCH 0/2] Makefile: A few post-meson-conversion fixes Greg Kurz
2020-09-01 14:20 ` [PATCH 1/2] Makefile: Add back TAGS/ctags/cscope rules Greg Kurz
2020-09-01 14:59 ` Connor Kuehl
2020-09-01 15:18 ` Greg Kurz [this message]
2020-09-01 16:04 ` Paolo Bonzini
2020-09-01 16:07 ` Connor Kuehl
2020-09-01 16:23 ` Greg Kurz
2020-09-01 14:20 ` [PATCH 2/2] Makefile: Fix in-tree clean/distclean Greg Kurz
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=20200901171811.24debd1d@bahia.lan \
--to=groug@kaod.org \
--cc=ckuehl@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).