git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Giuseppe Crino' <giuscri@gmail.com>
Cc: Johannes Sixt <j6t@kdbg.org>, git@vger.kernel.org
Subject: Re: How to build to debug with gdb?
Date: Wed, 28 Aug 2019 12:32:17 +0200	[thread overview]
Message-ID: <20190828103217.GA6400@szeder.dev> (raw)
In-Reply-To: <20190828081557.GA18785@instance-template-2.europe-west6-a.c.vaulted-journal-250706.internal>

On Wed, Aug 28, 2019 at 08:15:57AM +0000, Giuseppe Crino' wrote:
> On Tue, Aug 27, 2019 at 08:36:40PM +0200, SZEDER Gábor wrote:
> > Try using the same build flags for the install, i.e.:
> > 
> >   make prefix=/usr/local DEVELOPER=1 CFLAGS="-O0 -g" install
> 
> Yes, now it works thanks!
> 
> On Tue, Aug 27, 2019 at 08:34:23PM +0200, Johannes Sixt wrote:
> > That is because the command sequence above does not do what you think it
> > does. Didn't you notice that everything was recompiled during `sudo make
> > install`?
> 
> Shouldn't be this documented somewhere?

Well, perhaps.
But would users actually read it?  Dunno.

Case in point: the first few lines of 'INSTALL' already tell you to
build and install Git with the following commands:

  $ make prefix=/usr all doc info ;# as yourself
  # make prefix=/usr install install-doc install-html install-info ;# as root

Note the same 'prefix=...' in both commands, yet you omitted it when
you ran 'make install' ;)

> To my knowledge `make install` is expected to copy artifacts of the
> build under prefix. It's unusual to me that `install` has the `all`
> target as prerequisite.

I don't think it's unusual at all that the 'install' target depends on
'all'.  A quick and incomprehensive survey of Makefiles from a few
open source projects that I happen to have lying around seems to
confirm this.

What might be unusual (but is rather convenient for developers) is
that Git's build process checks the build flags, and rebuilds the
whole thing after the flags changed.


  reply	other threads:[~2019-08-28 10:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 16:27 How to build to debug with gdb? Giuseppe Crino'
2019-08-27 17:55 ` Matheus Tavares Bernardino
2019-08-27 18:07   ` Randall S. Becker
2019-08-27 18:34 ` Johannes Sixt
2019-08-27 18:36 ` SZEDER Gábor
2019-08-28  8:15   ` Giuseppe Crino'
2019-08-28 10:32     ` SZEDER Gábor [this message]
2019-08-28 11:00       ` Giuseppe Crino'
2019-08-28 12:43         ` Giuseppe Crino'

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190828103217.GA6400@szeder.dev \
    --to=szeder.dev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=giuscri@gmail.com \
    --cc=j6t@kdbg.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).