Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteb6569f

Browse files
committed
Refactor dtrace postprocessing make rules
This is in preparation for building postgres with meson / ninja.Move the dtrace postprocessing sed commands into a separate file sothat it can be shared by meson. Also split the rule into two forproper dependency declaration.Reviewed-by: Andres Freund <andres@anarazel.de>Author: Peter Eisentraut <peter@eisentraut.org>Discussion:https://postgr.es/m/5e216522-ba3c-f0e6-7f97-5276d0270029@enterprisedb.com
1 parentadba4b7 commiteb6569f

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

‎src/backend/utils/Makefile

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,15 @@ fmgr-stamp: Gen_fmgrtab.pl $(catalogdir)/Catalog.pm $(top_srcdir)/src/include/ca
5454
errcodes.h:$(top_srcdir)/src/backend/utils/errcodes.txt generate-errcodes.pl
5555
$(PERL)$(srcdir)/generate-errcodes.pl --outfile$@$<
5656

57-
ifneq ($(enable_dtrace), yes)
58-
probes.h: Gen_dummy_probes.sed
59-
endif
60-
61-
# We editorialize on dtrace's output to the extent of changing the macro
62-
# names (from POSTGRESQL_foo to TRACE_POSTGRESQL_foo) and changing any
63-
# "char *" arguments to "const char *".
64-
probes.h: probes.d
6557
ifeq ($(enable_dtrace), yes)
66-
$(DTRACE) -C -h -s $< -o $@.tmp
67-
sed -e 's/POSTGRESQL_/TRACE_POSTGRESQL_/g' \
68-
-e 's/( *char \*/(const char */g' \
69-
-e 's/, *char \*/, const char */g' $@.tmp >$@
70-
rm $@.tmp
58+
probes.h: postprocess_dtrace.sed probes.h.tmp
59+
sed -f$^>$@
60+
61+
probes.h.tmp: probes.d
62+
$(DTRACE) -C -h -s$< -o$@
7163
else
72-
sed -f $(srcdir)/Gen_dummy_probes.sed $< >$@
64+
probes.h: Gen_dummy_probes.sed probes.d
65+
sed -f$^>$@
7366
endif
7467

7568
# These generated headers must be symlinked into builddir/src/include/,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#-------------------------------------------------------------------------
2+
# sed script to postprocess dtrace output
3+
#
4+
# Copyright (c) 2008-2022, PostgreSQL Global Development Group
5+
#
6+
# src/backend/utils/postprocess_dtrace.sed
7+
#-------------------------------------------------------------------------
8+
9+
# We editorialize on dtrace's output to the extent of changing the macro
10+
# names (from POSTGRESQL_foo to TRACE_POSTGRESQL_foo) and changing any
11+
# "char *" arguments to "const char *".
12+
13+
s/POSTGRESQL_/TRACE_POSTGRESQL_/g
14+
s/(*char\*/(const char */g
15+
s/,*char\*/, const char */g

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp