Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
RekGRpth committed Nov 28, 2023
1 parent c3408e3 commit 90ea3fe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1,425 deletions.
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,24 @@ postgres.c:
sed -i 's/EndCommand/EndCommandMy/' $@
sed -i 's/NullCommand/NullCommandMy/' $@

EXTRA_CLEAN = postgres.c
MODULE_big = pg_task

PG9495 = $(shell $(PG_CONFIG) --version | egrep " 9\.4| 9\.5" > /dev/null && echo yes || echo no)
ifeq ($(PG9495),yes)
work.o: latch.h
latch.h:
wget -O $@ "https://raw.githubusercontent.com/postgres/postgres/REL9_6_STABLE/src/include/storage/latch.h"
latch.c: latch.h
wget -O $@ "https://raw.githubusercontent.com/postgres/postgres/REL9_6_STABLE/src/backend/storage/ipc/latch.c"
sed -i 's/storage\/latch/latch/' $@
OBJS = init.o conf.o work.o task.o spi.o dest.o latch.o
EXTRA_CLEAN = postgres.c latch.c latch.h
PG_CFLAGS += -Wno-cpp
else
OBJS = init.o conf.o work.o task.o spi.o dest.o
EXTRA_CLEAN = postgres.c
endif

PG94 = $(shell $(PG_CONFIG) --version | egrep " 8\.| 9\.0| 9\.1| 9\.2| 9\.3" > /dev/null && echo no || echo yes)
ifeq ($(PG94),no)
$(error Minimum version of PostgreSQL required is 9.4.0)
Expand Down
Loading

0 comments on commit 90ea3fe

Please sign in to comment.