Skip to content

Commit 9756f69

Browse files
committed
Use PG_CFLAGS
1 parent 3480a47 commit 9756f69

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

GitHubActions/build_sqlite_fdw.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mkdir -p ./workdir/postgresql-${VERSION}/contrib/sqlite_fdw
2121
tar zxf ./sqlite_fdw.tar.gz -C ./workdir/postgresql-${VERSION}/contrib/sqlite_fdw/
2222
cd ./workdir/postgresql-${VERSION}/contrib/sqlite_fdw
2323

24-
vars='CI_ENV=1 LD_LIBRARY_PATH=/usr/local/lib:/usr/lib'
24+
vars='CI_ENV=1'
2525

2626
if [ "$MODE" == "postgis" ]; then
2727
make $vars ENABLE_GIS=1

Makefile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ OBJS = connection.o option.o deparse.o sqlite_query.o sqlite_fdw.o sqlite_data_n
1515
EXTENSION = sqlite_fdw
1616
DATA = sqlite_fdw--1.0.sql sqlite_fdw--1.0--1.1.sql
1717

18+
# Use local downloaded and compiles SQLite library instead of system
19+
ifdef CI_ENV
20+
override PG_CFLAGS += -L/usr/local/lib
21+
endif
22+
1823
ifdef ENABLE_GIS
1924
override PG_CFLAGS += -DSQLITE_FDW_GIS_ENABLE
2025
GISTEST = postgis
2126
else
2227
GISTEST = nogis
2328
endif
2429

30+
# Tests for PostgreSQL data types support
2531
TYPETESTS = types/bitstring types/bool types/float4 types/float8 types/int4 types/int8 types/json types/numeric types/$(GISTEST) types/macaddr types/macaddr8 types/out_of_range types/timestamp types/uuid
2632

2733
ifndef REGRESS
34+
# System tests, full default sequence
2835
REGRESS = extra/sqlite_fdw_post $(TYPETESTS) extra/join extra/limit extra/aggregates extra/prepare extra/select_having extra/select extra/insert extra/update extra/encodings sqlite_fdw type_$(GISTEST) aggregate selectfunc
2936
endif
3037

38+
# Other encodings also sre tested. Client encoding should be UTF-8-
3139
REGRESS_OPTS = --encoding=utf8
3240

3341
UNAME = uname
@@ -38,10 +46,6 @@ else
3846
DLSUFFIX = .so
3947
endif
4048

41-
ifdef CI_ENV
42-
override LDFLAGS += -L/usr/local/lib
43-
endif
44-
4549
SHLIB_LINK := -lsqlite3
4650

4751
ifdef ENABLE_GIS
@@ -75,12 +79,12 @@ REGRESS := $(addprefix $(REGRESS_PREFIX_SUB)/,$(REGRESS))
7579
$(shell mkdir -p results/$(REGRESS_PREFIX_SUB)/extra)
7680
$(shell mkdir -p results/$(REGRESS_PREFIX_SUB)/types)
7781

78-
$(info SHLIB_LINK is $(SHLIB_LINK))
79-
$(info LD_LIBRARY_PATH is $(LD_LIBRARY_PATH))
80-
$(info REGRESS is $(REGRESS))
81-
$(info DLSUFFIX is $(DLSUFFIX))
82-
$(info CI_ENV is $(CI_ENV))
83-
$(info ENABLE_GIS is $(ENABLE_GIS))
82+
# $(info SHLIB_LINK is $(SHLIB_LINK))
83+
# $(info LD_LIBRARY_PATH is $(LD_LIBRARY_PATH))
84+
# $(info REGRESS is $(REGRESS))
85+
# $(info DLSUFFIX is $(DLSUFFIX))
86+
# $(info CI_ENV is $(CI_ENV))
87+
# $(info ENABLE_GIS is $(ENABLE_GIS))
8488

8589
ifdef ENABLE_GIS
8690
check: temp-install

0 commit comments

Comments
 (0)