mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Put path configuration information into a .h file instead of cluttering
several different module Makefiles with it. Also, do any adjustment of installation paths during configure, rather than every time Makefile.global is read.
This commit is contained in:
@ -8,14 +8,18 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/port/path.c,v 1.10 2004/05/19 04:21:49 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/port/path.c,v 1.11 2004/05/21 20:56:50 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "c.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "pg_config_paths.h"
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
#define ISSEP(ch) ((ch) == '/')
|
||||
#else
|
||||
@ -109,16 +113,15 @@ get_progname(const char *argv0)
|
||||
void
|
||||
get_share_path(const char *my_exec_path, char *ret_path)
|
||||
{
|
||||
if (relative_path(PGBINDIR, PGDATADIR))
|
||||
if (relative_path(PGBINDIR, PGSHAREDIR))
|
||||
{
|
||||
/* Autoconf calls our /share 'datadir' */
|
||||
StrNCpy(ret_path, my_exec_path, MAXPGPATH);
|
||||
trim_directory(ret_path); /* trim off binary */
|
||||
trim_directory(ret_path); /* trim off /bin */
|
||||
strcat(ret_path, "/share"); /* add /share */
|
||||
}
|
||||
else
|
||||
StrNCpy(ret_path, PGDATADIR, MAXPGPATH);
|
||||
StrNCpy(ret_path, PGSHAREDIR, MAXPGPATH);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user