All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Jeff King <peff@peff.net>, GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 1/9] Makefile: add a hdr-check target
Date: Thu, 20 Sep 2018 07:26:46 -0700	[thread overview]
Message-ID: <xmqqbm8s2qjd.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <d24df21a-7ab2-84f6-8b18-83fd9c8c2b30@ramsayjones.plus.com> (Ramsay Jones's message of "Wed, 19 Sep 2018 01:07:08 +0100")

Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> Commit ef3ca95475 ("Add missing includes and forward declarations",
> 2018-08-15) resulted from the author employing a manual method to
> create a C file consisting of a pair of pre-processor #include
> lines (for 'git-compat-util.h' and a given toplevel header), and
> fixing any resulting compiler errors or warnings.

It makes sense to have tool do what we do not have to do manually.

One thing that makes me wonder with the patch is that the new check
command does not seem to need to see what is on CFLAGS and friends.
Having seen that "make DEVELOPER=1" adds more -W... on the command
line of the compiler and makes a build fail on a source that
otherwise would build, I am wondering if there are some (subset of)
options that the header-check command line wants to give to the
compiler.

Of course, there are also conditionally compiled sections of code,
which are affected by the choice of -DMACRO=VALUE; how does this new
feature handle that?

> Add a Makefile target to automate this process. This implementation
> relies on the '-include' and '-xc' arguments to the 'gcc' and 'clang'
> compilers, which allows us to effectively create the required C
> compilation unit on-the-fly. This limits the portability of this
> solution to those systems which have such a compiler.

  parent reply	other threads:[~2018-09-20 14:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19  0:07 [PATCH 1/9] Makefile: add a hdr-check target Ramsay Jones
2018-09-19 17:49 ` Martin Ågren
2018-09-19 19:37   ` Ramsay Jones
2018-09-20  5:53     ` Martin Ågren
2018-09-20 14:26 ` Junio C Hamano [this message]
2018-09-20 16:03   ` Ramsay Jones
2018-09-20 18:49     ` Junio C Hamano

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=xmqqbm8s2qjd.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.