Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#-------------------------------------------------------------------------
#
# Makefile for the PL/Tcl procedural language
#
# src/pl/tcl/Makefile
#
#-------------------------------------------------------------------------
 
subdir = src/pl/tcl
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
 
 
override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS) $(TCL_INCLUDE_SPEC)
 
# On Windows, we don't link directly with the Tcl library; see below
ifneq ($(PORTNAME), win32)
SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS)
endif
 
PGFILEDESC = "PL/Tcl - procedural language"
 
NAME = pltcl
 
OBJS = \
    $(WIN32RES) \
    pltcl.o
 
DATA = pltcl.control pltcl--1.0.sql \
       pltclu.control pltclu--1.0.sql
 
REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-extension=pltcl
# "pltcl_setup" is first because the other tests depend on the objects it
# creates.
REGRESS = \
    pltcl_setup \
    pltcl_call \
    pltcl_queries \
    pltcl_start_proc \
    pltcl_subxact \
    pltcl_transaction \
    pltcl_trigger \
    pltcl_unicode
 
# Tcl on win32 ships with import libraries only for Microsoft Visual C++,
# which are not compatible with mingw gcc. Therefore we need to build a
# new import library to link with.
ifeq ($(PORTNAME), win32)
 
tclwithver = $(subst -l,,$(filter -l%, $(TCL_LIB_SPEC)))
TCLDLL = $(dir $(TCLSH))/$(tclwithver).dll
 
OBJS += lib$(tclwithver).a
 
lib$(tclwithver).a: $(tclwithver).def
    dlltool --dllname $(tclwithver).dll --def $(tclwithver).def --output-lib lib$(tclwithver).a
 
$(tclwithver).def: $(TCLDLL)
    gendef - $^ > $@
 
endif # win32
 
 
include $(top_srcdir)/src/Makefile.shlib
 
 
all: all-lib
 
# Force this dependency to be known even without dependency info built:
pltcl.o: pltclerrcodes.h
 
# generate pltclerrcodes.h from src/backend/utils/errcodes.txt
pltclerrcodes.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-pltclerrcodes.pl
    $(PERL) $(srcdir)/generate-pltclerrcodes.pl $< > $@
 
install: all install-lib install-data
 
installdirs: installdirs-lib
    $(MKDIR_P) '$(DESTDIR)$(datadir)/extension'
 
uninstall: uninstall-lib uninstall-data
 
install-data: installdirs
    $(INSTALL_DATA) $(addprefix $(srcdir)/, $(DATA)) '$(DESTDIR)$(datadir)/extension/'
 
uninstall-data:
    rm -f $(addprefix '$(DESTDIR)$(datadir)/extension'/, $(notdir $(DATA)))
 
.PHONY: install-data uninstall-data
 
 
check: submake
    $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
installcheck: submake
    $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
 
.PHONY: submake
submake:
    $(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X)
 
clean distclean: clean-lib
    rm -f $(OBJS)
    rm -rf $(pg_regress_clean_files)
ifeq ($(PORTNAME), win32)
    rm -f $(tclwithver).def
endif
    rm -f pltclerrcodes.h