git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Denton Liu <liu.denton@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC PATCH] Makefile: create externcheck target
Date: Thu, 8 Oct 2020 16:26:01 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.2010081625450.50@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20201008095233.GA2611970@generichostname>

Hi Denton,

On Thu, 8 Oct 2020, Denton Liu wrote:

> On Thu, Oct 08, 2020 at 11:32:03AM +0200, Johannes Schindelin wrote:
> > P.S.: I am not really certain that the `\s` is portable, I do not see any
> > mention of it in
> > https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03
> > and would therefore expect BSD sed not to handle this correctly.
>
> I've run a varation of this on MacOS's sed before and it works.
> Unfortunately, I don't have access to a MacOS machine anymore so I can't
> 100% confirm it.
>
> > In any
> > case, the `-i` is _not_ portable, as BSD sed takes a mandatory argument
> > (see
> > https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux
> > for more details).
>
> This was the main reason why I sent it out as an RFC (although I forgot
> to mention it in the commit message, whoops). Perhaps we could write
> this as
>
> 	externcheck: $(filter-out $(THIRD_PARTY_SOURCES),$(filter %.c %.h,$(shell $(FIND_SOURCE_FILES))))
> 		sed -i.bak 's/^\(\s*\)extern \([^(]*([^*]\)/\1\2/' $^
> 		$(RM) $(addsuffix .bak,$^)
>
> instead? I think that since this is a developer target, we can probably
> call this portable enough.

Yep, I agree.

Thanks,
Dscho

  reply	other threads:[~2020-10-08 14:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  8:31 [PATCH] compat/mingw.h: drop extern from function declaration Denton Liu
2020-10-07  6:44 ` Johannes Schindelin
2020-10-08  7:30 ` [RFC PATCH] Makefile: create externcheck target Denton Liu
2020-10-08  9:32   ` Johannes Schindelin
2020-10-08  9:52     ` Denton Liu
2020-10-08 14:26       ` Johannes Schindelin [this message]
2020-10-09  2:45   ` 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=nycvar.QRO.7.76.6.2010081625450.50@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@gmail.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 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).