bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib-tool.py: follow gnulib-tool changes


From: Bruno Haible
Subject: Re: gnulib-tool.py: follow gnulib-tool changes
Date: Sat, 09 Sep 2017 17:41:36 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-93-generic; KDE/5.18.0; x86_64; ; )

Hi Dmitry,

> > [PATCH 6/6] gnulib-tool.py: follow gnulib-tool changes, part 14
> > gnulib-tool: don't transform binary files with sed
> All these sed transformers shall be IMHO entirely deprecated. I don't quite
> remember why I used sed

Using 'sed' is acceptable here because the input comes from a file and the
output goes to a file anyway. If you replace 'sed' here, you save a subprocess
invocation, though. This will be interesting when you/we are going to start
optimizing the thing.

Another possible optimization here is that first, we do a
  cp lookedup tmpfile
and then
  sed -e transformer < lookedup > tmpfile
We could eliminate the cp command when there is a transformer.

> be aware though that this part of code is going to be removed.

Well, the logic that binary files (*.mo, *.class) should be copied as-is,
not transformed, should be kept, no? You'll replace the implementation
of the transform?

> > [PATCH 5/6] gnulib-tool.py: follow gnulib-tool changes, part 13
> > gnulib-tool: concatenate lib_SOURCES to a single line
> A bit tricky one, but OK from my side. The only thing I noted is that
> `startpos,pos = match.span()` can be a bit better formatted into
> `(startpos, pos) = match.span()`.

Done. I had verified that both syntaxes work, but did not know which one is
the preferred one.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]