-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (75 loc) · 2.52 KB
/
Copy pathMakefile
File metadata and controls
91 lines (75 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#-------------------------------------------------------------------------
#
# Makefile for src/fe_utils
#
# This makefile generates a static library, libpgfeutils.a,
# for use by client applications
#
# Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
# Portions Copyright (c) 2023-2026, IvorySQL Global Development Team
#
# IDENTIFICATION
# src/fe_utils/Makefile
#
#-------------------------------------------------------------------------
subdir = src/fe_utils
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
#override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) -I$(top_builddir)/src/include/oracle_fe_utils $(CPPFLAGS)
OBJS = \
archive.o \
astreamer_file.o \
astreamer_gzip.o \
astreamer_lz4.o \
astreamer_tar.o \
astreamer_zstd.o \
cancel.o \
conditional.o \
connect_utils.o \
mbprint.o \
option_utils.o \
parallel_slot.o \
print.o \
psqlscan.o \
query_utils.o \
recovery_gen.o \
simple_list.o \
string_utils.o \
version.o \
ora_keywords.o \
ora_string_utils.o
# where to find ora_gen_keywordlist.pl and subsidiary files
TOOLSDIR = $(top_srcdir)/src/tools
GEN_KEYWORDLIST = $(PERL) -I $(TOOLSDIR) $(TOOLSDIR)/ora_gen_keywordlist.pl
GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/ora_gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
ifeq ($(PORTNAME), win32)
override CPPFLAGS += -DFD_SETSIZE=1024
endif
all: libpgfeutils.a
libpgfeutils.a: $(OBJS)
rm -f $@
$(AR) $(AROPT) $@ $^
psqlscan.c: FLEXFLAGS = -Cfe -p -p
psqlscan.c: FLEX_NO_BACKUP=yes
# generate SQL keyword lookup table to be included into ora_keywords*.o.
ora_kwlist_d.h: $(top_srcdir)/src/include/oracle_parser/ora_kwlist.h $(GEN_KEYWORDLIST_DEPS)
$(GEN_KEYWORDLIST) --extern $<
# Dependencies of ora_keywords*.o need to be managed explicitly to make sure
# that you don't get broken parsing code, even in a non-enable-depend build.
ora_keywords.o: ora_kwlist_d.h
ora_keywords.c: % : $(top_srcdir)/src/backend/oracle_parser/%
rm -f $@ && $(LN_S) $< .
ora_string_utils.c: % : $(top_srcdir)/src/oracle_fe_utils/%
rm -f $@ && $(LN_S) $< .
# libpgfeutils could be useful to contrib, so install it
install: all installdirs
$(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(libdir)/libpgfeutils.a'
installdirs:
$(MKDIR_P) '$(DESTDIR)$(libdir)'
uninstall:
rm -f '$(DESTDIR)$(libdir)/libpgfeutils.a'
clean distclean:
rm -f libpgfeutils.a $(OBJS) lex.backup
rm -f psqlscan.c ora_keywords.c ora_string_utils.c ora_kwlist_d.h