Skip to content

Commit 49d37ec

Browse files
author
Michael Paquier
committed
Rework Makefile and remove incoherent definitions
-DFRONTEND should be overridden as part of CPPFLAGS and it is not really necessary to have the source list. The definition of pg_arman.h was rather obscure as well.
1 parent dc27aab commit 49d37ec

File tree

2 files changed

+18
-22
lines changed

2 files changed

+18
-22
lines changed

Makefile

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
PROGRAM = pg_arman
2-
SRCS = \
3-
backup.c \
4-
catalog.c \
5-
data.c \
6-
delete.c \
7-
dir.c \
8-
fetch.c \
9-
init.c \
10-
parray.c \
11-
pg_arman.c \
12-
restore.c \
13-
show.c \
14-
status.c \
15-
util.c \
16-
validate.c \
17-
xlog.c \
18-
pgut/pgut.c \
19-
pgut/pgut-port.c
20-
OBJS = $(SRCS:.c=.o)
2+
OBJS = backup.o \
3+
catalog.o \
4+
data.o \
5+
delete.o \
6+
dir.o \
7+
fetch.o \
8+
init.o \
9+
parray.o \
10+
pg_arman.o \
11+
restore.o \
12+
show.o \
13+
status.o \
14+
util.o \
15+
validate.o \
16+
xlog.o \
17+
pgut/pgut.o \
18+
pgut/pgut-port.o
2119

2220
DOCS = doc/pg_arman.txt
2321

@@ -32,6 +30,7 @@ endif # XMLTO
3230
endif # ASCIIDOC
3331

3432
PG_CPPFLAGS = -I$(libpq_srcdir)
33+
override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
3534
PG_LIBS = $(libpq_pgport)
3635

3736
REGRESS = init option show delete backup restore
@@ -40,8 +39,6 @@ PG_CONFIG = pg_config
4039
PGXS := $(shell $(PG_CONFIG) --pgxs)
4140
include $(PGXS)
4241

43-
$(OBJS): pg_arman.h
44-
4542
# Part related to documentation
4643
# Compile documentation as well is ASCIIDOC and XMLTO are defined
4744
ifneq ($(ASCIIDOC),)

pgut/pgut.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*-------------------------------------------------------------------------
88
*/
99

10-
#define FRONTEND
1110
#include "postgres_fe.h"
1211
#include "libpq/pqsignal.h"
1312

0 commit comments

Comments
 (0)