Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e3b8530

Browse files
committed
Readd pg_config --pgxs code.
1 parent f0efe26 commit e3b8530

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

doc/src/sgml/ref/pg_config-ref.sgml

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.17 2003/11/29 19:51:39 pgsql Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.18 2004/08/02 12:34:14 momjian Exp $ -->
22

33
<refentry id="app-pgconfig">
44
<refmeta>
@@ -25,6 +25,7 @@
2525
<arg>--includedir-server</arg>
2626
<arg>--libdir</arg>
2727
<arg>--pkglibdir</arg>
28+
<arg>--pgxs</arg>
2829
<arg>--configure</arg>
2930
<arg>--version</arg>
3031
</group>
@@ -100,6 +101,15 @@
100101
</listitem>
101102
</varlistentry>
102103

104+
<varlistentry>
105+
<term><option>--pgxs</option></>
106+
<listitem>
107+
<para>
108+
Print the location of extension makefiles.
109+
</para>
110+
</listitem>
111+
</varlistentry>
112+
103113
<varlistentry>
104114
<term><option>--configure</option></>
105115
<listitem>

src/bin/pg_config/pg_config.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
1919
*
20-
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.2 2004/08/01 14:01:36 momjian Exp $
20+
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.3 2004/08/02 12:34:14 momjian Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -43,6 +43,7 @@ help()
4343
printf(_(" --includedir-server show location of C header files for the server\n"));
4444
printf(_(" --libdir show location of object code libraries\n"));
4545
printf(_(" --pkglibdir show location of dynamically loadable modules\n"));
46+
printf(_(" --pgxs show location of extension makefile\n"));
4647
printf(_(" --configure show options given to 'configure' script when\n"));
4748
printf(_(" PostgreSQL was built\n"));
4849
printf(_(" --version show the PostgreSQL version, then exit\n"));
@@ -81,6 +82,7 @@ main (int argc, char ** argv)
8182
strcmp(argv[i],"--includedir-server") == 0 ||
8283
strcmp(argv[i],"--libdir") == 0 ||
8384
strcmp(argv[i],"--pkglibdir") == 0 ||
85+
strcmp(argv[i],"--pgxs") == 0 ||
8486
strcmp(argv[i],"--configure") == 0)
8587
{
8688
/* come back to these later */
@@ -136,6 +138,11 @@ main (int argc, char ** argv)
136138
get_lib_path(mypath,otherpath);
137139
else if (strcmp(argv[i],"--pkglibdir") == 0)
138140
get_pkglib_path(mypath,otherpath);
141+
else if (strcmp(argv[i],"--pgxs") == 0)
142+
{
143+
get_pkglib_path(mypath,otherpath);
144+
strncat(otherpath, "/pgxs", MAXPGPATH-1);
145+
}
139146

140147
printf("%s\n",otherpath);
141148
}

0 commit comments

Comments
 (0)