Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ece4932

Browse files
committed
Previous commit fix.
1 parent c350eaf commit ece4932

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ OBJS = pg_shardman.o
1111
PGFILEDESC = "pg_shardman - sharding for Postgres"
1212

1313
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) # abs path to this makefile
14-
mkfile_dir := $(shell basename $(dir $(mkfile_path))) # parent dir of the project
14+
mkfile_dir := $(shell basename $(shell dirname $(dir $(mkfile_path)))) # parent dir of the project
1515
ifndef USE_PGXS # hmm, user didn't requested to use pgxs
16-
ifneq ($(mkfile_dir),contrib) # a-ha, but we are not inside 'contrib' dir
17-
USE_PGXS := 1 # so use it anyway, most probably that's use user wants
16+
ifneq ($(strip $(mkfile_dir)),contrib) # a-ha, but we are not inside 'contrib' dir
17+
USE_PGXS := 1 # so use it anyway, most probably that's what the user wants
1818
endif
1919
endif
20+
$(info $$USE_PGXS is [${USE_PGXS}] (we use it automatically if not in contrib dir))
2021

2122
ifdef USE_PGXS # use pgxs
2223
# You can specify path to pg_config in PG_CONFIG var

0 commit comments

Comments
 (0)