pgsql: Replace Gen_dummy_probes.sed with Gen_dummy_probes.pl

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Replace Gen_dummy_probes.sed with Gen_dummy_probes.pl
Date: 2023-11-14 09:32:11
Message-ID: E1r2pmE-005Ojy-Ua@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Replace Gen_dummy_probes.sed with Gen_dummy_probes.pl

To generate a dummy probes.h file when dtrace is not available, we had
two different scripts: A sed version, which is the original version,
and a Perl version, which was generated by s2p. This split was
necessary because Perl was not a mandatory build dependency on Unix,
but sed was not guaranteed to be available on Windows.

(The Meson build system used the sed version even on Windows, which
was probably incorrect and probably would have had to be fixed before
elevating that build system from experimental status.)

As of 721856ff24, Perl is a required build dependency, so this split
is no longer necessary. We can just use the Perl script in all build
environments and remove a whole bunch of infrastructure to keep the
two variants in sync.

The new Gen_dummy_probes.pl is not the version generated by s2p but a
new implementation written by hand by adapting the sed version to Perl
syntax.

Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://www.postgresql.org/message-id/3fd0f1bc-4483-4ba9-8aa0-64765b052039@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3849fe7c2ba7758eee5f1f524147a3620b677fb3

Modified Files
--------------
.gitattributes | 1 -
src/backend/utils/Gen_dummy_probes.pl | 275 +++------------------------
src/backend/utils/Gen_dummy_probes.pl.prolog | 19 --
src/backend/utils/Gen_dummy_probes.sed | 24 ---
src/backend/utils/Makefile | 15 +-
src/backend/utils/README.Gen_dummy_probes | 27 ---
src/include/utils/meson.build | 2 +-
src/tools/msvc/Solution.pm | 2 +-
8 files changed, 26 insertions(+), 339 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2023-11-14 10:08:48 pgsql: Fix whitespace
Previous Message Tom Lane 2023-11-14 05:31:59 pgsql: Allow new role 'regress_dump_login_role' to log in under SSPI.