Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84ce707

Browse files
committed
Added --htmldir option to pg_config, equivalent to the new configure option.
1 parenta9bc069 commit84ce707

File tree

5 files changed

+41
-8
lines changed

5 files changed

+41
-8
lines changed

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

Lines changed: 12 additions & 4 deletions
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.27 2007/02/20 15:01:17 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.28 2008/02/18 14:51:48 petere Exp $ -->
22

33
<refentry id="app-pgconfig">
44
<refmeta>
@@ -57,9 +57,16 @@
5757
<term><option>--docdir</option></>
5858
<listitem>
5959
<para>
60-
Print the location of documentation files. (This will be an empty
61-
string if <literal>--without-docdir</> was specified when
62-
<productname>PostgreSQL</> was built.)
60+
Print the location of documentation files.
61+
</para>
62+
</listitem>
63+
</varlistentry>
64+
65+
<varlistentry>
66+
<term><option>--htmldir</option></>
67+
<listitem>
68+
<para>
69+
Print the location of HTML documentation files.
6370
</para>
6471
</listitem>
6572
</varlistentry>
@@ -284,6 +291,7 @@
284291
<option>--cflags</option>, <option>--cflags_sl</option>,
285292
<option>--ldflags</option>, <option>--ldflags_sl</option>,
286293
and <option>--libs</option> are new in <productname>PostgreSQL</> 8.1.
294+
The option <option>--htmldir</option> is new in <productname>PostgreSQL</> 8.4.
287295
</para>
288296

289297
<para>

‎src/bin/pg_config/pg_config.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
1919
*
20-
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.26 2008/01/01 19:45:55 momjian Exp $
20+
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.27 2008/02/18 14:51:48 petere Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -97,6 +97,18 @@ show_docdir(bool all)
9797
printf("%s\n",path);
9898
}
9999

100+
staticvoid
101+
show_htmldir(boolall)
102+
{
103+
charpath[MAXPGPATH];
104+
105+
if (all)
106+
printf("HTMLDIR = ");
107+
get_html_path(mypath,path);
108+
cleanup_path(path);
109+
printf("%s\n",path);
110+
}
111+
100112
staticvoid
101113
show_includedir(boolall)
102114
{
@@ -369,6 +381,7 @@ typedef struct
369381
staticconstInfoIteminfo_items[]= {
370382
{"--bindir",show_bindir},
371383
{"--docdir",show_docdir},
384+
{"--htmldir",show_htmldir},
372385
{"--includedir",show_includedir},
373386
{"--pkgincludedir",show_pkgincludedir},
374387
{"--includedir-server",show_includedir_server},
@@ -401,6 +414,7 @@ help(void)
401414
printf(_("Options:\n"));
402415
printf(_(" --bindir show location of user executables\n"));
403416
printf(_(" --docdir show location of documentation files\n"));
417+
printf(_(" --htmldir show location of HTML documentation files\n"));
404418
printf(_(" --includedir show location of C header files of the client\n"
405419
" interfaces\n"));
406420
printf(_(" --pkgincludedir show location of other C header files\n"));

‎src/include/port.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.116 2008/01/01 19:45:56 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.117 2008/02/18 14:51:48 petere Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -42,6 +42,7 @@ extern void get_lib_path(const char *my_exec_path, char *ret_path);
4242
externvoidget_pkglib_path(constchar*my_exec_path,char*ret_path);
4343
externvoidget_locale_path(constchar*my_exec_path,char*ret_path);
4444
externvoidget_doc_path(constchar*my_exec_path,char*ret_path);
45+
externvoidget_html_path(constchar*my_exec_path,char*ret_path);
4546
externvoidget_man_path(constchar*my_exec_path,char*ret_path);
4647
externboolget_home_path(char*ret_path);
4748
externvoidget_parent_directory(char*path);

‎src/port/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# OBJS adds additional object files that are always compiled.
2020
#
2121
# IDENTIFICATION
22-
# $PostgreSQL: pgsql/src/port/Makefile,v 1.35 2007/09/28 22:25:49 tgl Exp $
22+
# $PostgreSQL: pgsql/src/port/Makefile,v 1.36 2008/02/18 14:51:48 petere Exp $
2323
#
2424
#-------------------------------------------------------------------------
2525

@@ -84,6 +84,7 @@ pg_config_paths.h: $(top_builddir)/src/Makefile.global
8484
echo"#define PKGLIBDIR\"$(pkglibdir)\"">>$@
8585
echo"#define LOCALEDIR\"$(localedir)\"">>$@
8686
echo"#define DOCDIR\"$(docdir)\"">>$@
87+
echo"#define HTMLDIR\"$(htmldir)\"">>$@
8788
echo"#define MANDIR\"$(mandir)\"">>$@
8889

8990
cleandistcleanmaintainer-clean:

‎src/port/path.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/port/path.c,v 1.74 2008/01/01 19:46:00 momjian Exp $
11+
* $PostgreSQL: pgsql/src/port/path.c,v 1.75 2008/02/18 14:51:48 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -599,6 +599,15 @@ get_doc_path(const char *my_exec_path, char *ret_path)
599599
make_relative_path(ret_path,DOCDIR,PGBINDIR,my_exec_path);
600600
}
601601

602+
/*
603+
*get_html_path
604+
*/
605+
void
606+
get_html_path(constchar*my_exec_path,char*ret_path)
607+
{
608+
make_relative_path(ret_path,HTMLDIR,PGBINDIR,my_exec_path);
609+
}
610+
602611
/*
603612
*get_man_path
604613
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp