errcodes.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-errcodes.pl
$(PERL) $(srcdir)/generate-errcodes.pl --outfile $@ $<
-ifneq ($(enable_dtrace), yes)
-probes.h: Gen_dummy_probes.sed
-endif
-
-# We editorialize on dtrace's output to the extent of changing the macro
-# names (from POSTGRESQL_foo to TRACE_POSTGRESQL_foo) and changing any
-# "char *" arguments to "const char *".
-probes.h: probes.d
ifeq ($(enable_dtrace), yes)
- $(DTRACE) -C -h -s $< -o $@.tmp
- sed -e 's/POSTGRESQL_/TRACE_POSTGRESQL_/g' \
- -e 's/( *char \*/(const char */g' \
+probes.h: postprocess_dtrace.sed probes.h.tmp
+ sed -f $^ >$@
+
+probes.h.tmp: probes.d
+ $(DTRACE) -C -h -s $< -o $@
else
- sed -f $(srcdir)/Gen_dummy_probes.sed $< >$@
+probes.h: Gen_dummy_probes.sed probes.d
+ sed -f $^ >$@
endif
# These generated headers must be symlinked into builddir/src/include/,
--- /dev/null
+#-------------------------------------------------------------------------
+# sed script to postprocess dtrace output
+#
+# Copyright (c) 2008-2022, PostgreSQL Global Development Group
+#
+# src/backend/utils/postprocess_dtrace.sed
+#-------------------------------------------------------------------------
+
+# We editorialize on dtrace's output to the extent of changing the macro
+# names (from POSTGRESQL_foo to TRACE_POSTGRESQL_foo) and changing any
+# "char *" arguments to "const char *".
+
+s/POSTGRESQL_/TRACE_POSTGRESQL_/g
+s/( *char \*/(const char */g
+s/, *char \*/, const char */g