postgresql/contrib/pg_plan_advice/Makefile
Robert Haas 59dcc19b39 pg_plan_advice: Always install pg_plan_advice.h, and in the right place
The Makefile failed to set HEADERS_pg_plan_advice, so the header wasn't
installed. Fixing that reveals another problem: since this is just a
loadable module, not an extension, the header file is installed into
$(includedir_server)/contrib rather than $(includedir_server)/extension.
While we have no existing cases of installing header files there, it
appears to be the intent of pgxs.mk.  However, this is inconsistent with
meson.build, which was using dir_include_extension. Changing that to
dir_include_server / 'contrib' makes the install locations consistent
across the two builds.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: http://postgr.es/m/CAN4CZFP6NOjv__4Mx+iQD8StdpbHvzDAatEQn2n15UKJ=MySSQ@mail.gmail.com
2026-03-17 12:53:13 -04:00

45 lines
1 KiB
Makefile

# contrib/pg_plan_advice/Makefile
MODULE_big = pg_plan_advice
OBJS = \
$(WIN32RES) \
pg_plan_advice.o \
pgpa_ast.o \
pgpa_identifier.o \
pgpa_join.o \
pgpa_output.o \
pgpa_parser.o \
pgpa_planner.o \
pgpa_scan.o \
pgpa_scanner.o \
pgpa_trove.o \
pgpa_walker.o
HEADERS_pg_plan_advice = pg_plan_advice.h
PGFILEDESC = "pg_plan_advice - help the planner get the right plan"
REGRESS = gather join_order join_strategy partitionwise prepared \
scan semijoin syntax
EXTRA_CLEAN = pgpa_parser.h pgpa_parser.c pgpa_scanner.c
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/pg_plan_advice
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
# See notes in src/backend/parser/Makefile about the following two rules
pgpa_parser.h: pgpa_parser.c
touch $@
pgpa_parser.c: BISONFLAGS += -d
# Force these dependencies to be known even without dependency info built:
pgpa_parser.o pgpa_scanner.o: pgpa_parser.h