Replace Gen_dummy_probes.sed with Gen_dummy_probes.pl
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 14 Nov 2023 08:47:07 +0000 (09:47 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 14 Nov 2023 09:27:10 +0000 (10:27 +0100)
commit3849fe7c2ba7758eee5f1f524147a3620b677fb3
treed444962c80d408256a949059c9c82d1664c860b4
parent1e3f461e825fe61f741b291c91b30967739a90d0
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@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/3fd0f1bc-4483-4ba9-8aa0-64765b052039@eisentraut.org
.gitattributes
src/backend/utils/Gen_dummy_probes.pl
src/backend/utils/Gen_dummy_probes.pl.prolog [deleted file]
src/backend/utils/Gen_dummy_probes.sed [deleted file]
src/backend/utils/Makefile
src/backend/utils/README.Gen_dummy_probes [deleted file]
src/include/utils/meson.build
src/tools/msvc/Solution.pm