Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
cc07f8cf
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cc07f8cf
编写于
8月 01, 2004
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Create a C version of pg_config.
Andrew Dunstan
上级
7510ac62
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
55 addition
and
104 deletion
+55
-104
src/bin/pg_config/Makefile
src/bin/pg_config/Makefile
+14
-16
src/bin/pg_config/pg_config.sh
src/bin/pg_config/pg_config.sh
+0
-83
src/include/port.h
src/include/port.h
+3
-1
src/port/Makefile
src/port/Makefile
+3
-1
src/port/path.c
src/port/path.c
+35
-3
未找到文件。
src/bin/pg_config/Makefile
浏览文件 @
cc07f8cf
# $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.
7 2004/07/30 12:26:40 petere
Exp $
# $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.
8 2004/08/01 06:56:38 momjian
Exp $
subdir
=
src/bin/pg_config
top_builddir
=
../../..
include
$(top_builddir)/src/Makefile.global
all
:
pg_config
OBJS
=
pg_config.o exec.o
pg_config
:
pg_config.sh $(top_builddir)/src/Makefile.global Makefile
sed
-e
's,@bindir@,
$(bindir)
,g'
\
-e
's,@includedir@,
$(includedir)
,g'
\
-e
's,@includedir_server@,
$(includedir_server)
,g'
\
-e
's,@libdir@,
$(libdir)
,g'
\
-e
's,@pkglibdir@,
$(pkglibdir)
,g'
\
-e
's,@pgxsdir@,
$(pgxsdir)
,g'
\
-e
"s|@configure@|
$(configure_args)
|g"
\
-e
's,@version@,
$(VERSION)
,g'
\
$<
>
$@
chmod
a+x
$@
override CPPFLAGS
:
= -DFRONTEND -I$(libpq_srcdir) -DVAL_CONFIGURE="
\"
$(configure_args)
\"
" $(CPPFLAGS)
install
:
all installdirs
$(INSTALL_SCRIPT)
pg_config
$(DESTDIR)$(bindir)
/pg_config
all
:
submake-libpgport pg_config
exec.c
:
% : $(top_srcdir)/src/port/%
rm
-f
$@
&&
$(LN_S)
$<
.
pg_config
:
$(OBJS)
$(CC)
$(CFLAGS)
$(OBJS)
$(LDFLAGS)
$(LIBS)
-o
$@$(X)
install
:
all installdirs
$(INSTALL_SCRIPT)
pg_config
$(X)
$(DESTDIR)$(bindir)
/pg_config
$(X)
installdirs
:
$(mkinstalldirs)
$(DESTDIR)$(bindir)
...
...
@@ -28,4 +26,4 @@ uninstall:
rm
-f
$(DESTDIR)$(bindir)
/pg_config
clean distclean maintainer-clean
:
rm
-f
pg_config
rm
-f
pg_config
$(X)
$(OBJS)
exec.c
src/bin/pg_config/pg_config.sh
已删除
100644 → 0
浏览文件 @
7510ac62
#! /bin/sh
# This shell script saves various pieces of information about the
# installed version of PostgreSQL. Packages that interface to
# PostgreSQL can use it to configure their build.
#
# Author: Peter Eisentraut <peter_e@gmx.net>
# Public domain
# $PostgreSQL: pgsql/src/bin/pg_config/pg_config.sh,v 1.10 2004/07/30 12:26:40 petere Exp $
me
=
`
basename
$0
`
# stored configuration values
val_bindir
=
'@bindir@'
val_includedir
=
'@includedir@'
val_includedir_server
=
'@includedir_server@'
val_libdir
=
'@libdir@'
val_pkglibdir
=
'@pkglibdir@'
val_pgxsdir
=
'@pgxsdir@'
val_configure
=
"@configure@"
val_version
=
'@version@'
help
=
"
\
$me
provides information about the installed version of PostgreSQL.
Usage:
$me
OPTION...
Options:
--bindir show location of user executables
--includedir show location of C header files of the client
interfaces
--includedir-server show location of C header files for the server
--libdir show location of object code libraries
--pkglibdir show location of dynamically loadable modules
--pgxs show location of extension makefile
--configure show options given to 'configure' script when
PostgreSQL was built
--version show the PostgreSQL version, then exit
--help show this help, then exit
Report bugs to <pgsql-bugs@postgresql.org>."
advice
=
"
\
Try
\"
$me
--help
\"
for more information."
if
test
"$#"
-eq
0
;
then
echo
"
$me
: argument required"
1>&2
echo
"
$advice
"
1>&2
exit
1
fi
show
=
for
opt
do
case
"
$opt
"
in
--bindir
)
show
=
"
$show
\$
val_bindir"
;;
--includedir
)
show
=
"
$show
\$
val_includedir"
;;
--includedir-server
)
show
=
"
$show
\$
val_includedir_server"
;;
--libdir
)
show
=
"
$show
\$
val_libdir"
;;
--pkglibdir
)
show
=
"
$show
\$
val_pkglibdir"
;;
--pgxs
)
show
=
"
$show
\$
val_pgxsdir/src/makefiles/pgxs.mk"
;;
--configure
)
show
=
"
$show
\$
val_configure"
;;
--version
)
echo
"PostgreSQL
$val_version
"
exit
0
;;
--help
|
-
\?
)
echo
"
$help
"
exit
0
;;
*
)
echo
"
$me
: invalid argument:
$opt
"
1>&2
echo
"
$advice
"
1>&2
exit
1
;;
esac
done
for
thing
in
$show
do
eval
"echo
$thing
"
done
# end of pg_config
src/include/port.h
浏览文件 @
cc07f8cf
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.4
6 2004/08/01 06:19:24
momjian Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.4
7 2004/08/01 06:56:39
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -44,6 +44,8 @@ extern void get_share_path(const char *my_exec_path, char *ret_path);
extern
void
get_etc_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
extern
void
get_include_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
extern
void
get_pkginclude_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
extern
void
get_includeserver_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
extern
void
get_lib_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
extern
void
get_pkglib_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
extern
void
get_locale_path
(
const
char
*
my_exec_path
,
char
*
ret_path
);
extern
void
set_pglocale_pgservice
(
const
char
*
argv0
,
const
char
*
app
);
...
...
src/port/Makefile
浏览文件 @
cc07f8cf
...
...
@@ -7,7 +7,7 @@
# with broken/missing library files.
# IDENTIFICATION
# $PostgreSQL: pgsql/src/port/Makefile,v 1.1
5 2004/05/30 14:07:47
momjian Exp $
# $PostgreSQL: pgsql/src/port/Makefile,v 1.1
6 2004/08/01 06:56:39
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -35,6 +35,8 @@ pg_config_paths.h: $(top_builddir)/src/Makefile.global
echo
"#define SYSCONFDIR
\"
$(sysconfdir)
\"
"
>>
$@
echo
"#define INCLUDEDIR
\"
$(includedir)
\"
"
>>
$@
echo
"#define PKGINCLUDEDIR
\"
$(pkgincludedir)
\"
"
>>
$@
echo
"#define INCLUDEDIRSERVER
\"
$(includedir_server)
\"
"
>>
$@
echo
"#define LIBDIR
\"
$(libdir)
\"
"
>>
$@
echo
"#define PKGLIBDIR
\"
$(pkglibdir)
\"
"
>>
$@
echo
"#define LOCALEDIR
\"
$(localedir)
\"
"
>>
$@
...
...
src/port/path.c
浏览文件 @
cc07f8cf
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/path.c,v 1.2
5 2004/07/12 19:27:31
momjian Exp $
* $PostgreSQL: pgsql/src/port/path.c,v 1.2
6 2004/08/01 06:56:39
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -205,10 +205,42 @@ get_pkginclude_path(const char *my_exec_path, char *ret_path)
/*
* get_includeserver_path
*/
void
get_includeserver_path
(
const
char
*
my_exec_path
,
char
*
ret_path
)
{
const
char
*
p
;
if
((
p
=
relative_path
(
PGBINDIR
,
INCLUDEDIRSERVER
)))
make_relative
(
my_exec_path
,
p
,
ret_path
);
else
StrNCpy
(
ret_path
,
INCLUDEDIRSERVER
,
MAXPGPATH
);
canonicalize_path
(
ret_path
);
}
/*
* get_lib_path
*/
void
get_lib_path
(
const
char
*
my_exec_path
,
char
*
ret_path
)
{
const
char
*
p
;
if
((
p
=
relative_path
(
PGBINDIR
,
LIBDIR
)))
make_relative
(
my_exec_path
,
p
,
ret_path
);
else
StrNCpy
(
ret_path
,
LIBDIR
,
MAXPGPATH
);
canonicalize_path
(
ret_path
);
}
/*
* get_pkglib_path
*
* Return library path, either relative to /bin or hardcoded
*/
void
get_pkglib_path
(
const
char
*
my_exec_path
,
char
*
ret_path
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录