Re: Why do we have perl and sed versions of Gen_dummy_probes?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>, Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>
Subject: Re: Why do we have perl and sed versions of Gen_dummy_probes?
Date: 2021-05-11 17:21:15
Message-ID: 20210511172115.wtqi2ept6jfqu4pg@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-05-11 10:52:22 -0400, Tom Lane wrote:
> Works for me. One other thought --- do we care whether this works
> in a VPATH build, and if so does it? The $< and $@ references should
> be OK, but I'm betting you need $(srcdir)/Gen_dummy_probes.pl.prolog
> or the like.

It doesn't work in a VPATH build right now, FWIW. $@, $< will point to a
local file in the build directory, right now. And the path to perltidyrc
doesn't work either. It seems to work after the following modifications

diff --git i/src/backend/utils/Makefile w/src/backend/utils/Makefile
index bcf9dd41adf..ca733d12dce 100644
--- i/src/backend/utils/Makefile
+++ w/src/backend/utils/Makefile
@@ -92,10 +92,10 @@ $(top_builddir)/src/include/utils/probes.h: probes.h
# Nothing depends on it, so it will never be called unless explicitly requested
# The last two lines of the recipe format the script according to our
# standard and put back some blank lines for improved readability.
-Gen_dummy_probes.pl: Gen_dummy_probes.sed
+$(top_srcdir)/src/backend/utils/Gen_dummy_probes.pl: $(top_srcdir)/src/backend/utils/Gen_dummy_probes.sed
perl -ni -e ' print; exit if /^\$$0/;' $@
s2p -f $< | sed -e 1,4d -e '/# #/d' -e '$$d' >> $@
- perltidy --profile=../../tools/pgindent/perltidyrc $@
+ perltidy --profile=$(top_srcdir)/src/tools/pgindent/perltidyrc $@
perl -pi -e '!$$lb && ( /^\t+#/ || /^# prototypes/ ) && print qq{\n};'\
-e '$$lb = m/^\n/; ' $@

diff --git i/src/test/regress/parallel_schedule w/src/test/regress/parallel_schedule

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-05-11 17:22:11 Re: Why do we have perl and sed versions of Gen_dummy_probes?
Previous Message Andres Freund 2021-05-11 17:13:42 Re: seawasp failing, maybe in glibc allocator