diff options
| author | Tom Lane | 2005-09-27 17:39:35 +0000 |
|---|---|---|
| committer | Tom Lane | 2005-09-27 17:39:35 +0000 |
| commit | 4fc935a5d47d40aac5b1ecf51aa5beaab03e8f76 (patch) | |
| tree | 9aef18fd9bff87d88ae58fb0d3eb93654cf9c83e /src/port | |
| parent | 2d8225eecc555552b89b66bc6d975760e4f1de4c (diff) | |
Fix problems with PGXS builds against an installation tree that was
relocated after installation. We can't trust the installation paths
inserted into Makefile.global by configure, so instead we must get the
paths from pg_config. This requires extending pg_config to support all
the separately-configurable path names, but that was on TODO anyway.
Diffstat (limited to 'src/port')
| -rw-r--r-- | src/port/Makefile | 4 | ||||
| -rw-r--r-- | src/port/path.c | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/src/port/Makefile b/src/port/Makefile index 2b5b50a914c..e17f324c0d4 100644 --- a/src/port/Makefile +++ b/src/port/Makefile @@ -15,7 +15,7 @@ # for use only by the backend binaries # # IDENTIFICATION -# $PostgreSQL: pgsql/src/port/Makefile,v 1.28 2005/08/12 19:45:14 momjian Exp $ +# $PostgreSQL: pgsql/src/port/Makefile,v 1.29 2005/09/27 17:39:35 tgl Exp $ # #------------------------------------------------------------------------- @@ -81,6 +81,8 @@ pg_config_paths.h: $(top_builddir)/src/Makefile.global echo "#define LIBDIR \"$(libdir)\"" >>$@ echo "#define PKGLIBDIR \"$(pkglibdir)\"" >>$@ echo "#define LOCALEDIR \"$(localedir)\"" >>$@ + echo "#define DOCDIR \"$(docdir)\"" >>$@ + echo "#define MANDIR \"$(mandir)\"" >>$@ clean distclean maintainer-clean: rm -f libpgport.a libpgport_srv.a $(LIBOBJS) $(LIBOBJS_SRV) pg_config_paths.h diff --git a/src/port/path.c b/src/port/path.c index 41a505759e9..bdb6e29adf1 100644 --- a/src/port/path.c +++ b/src/port/path.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/path.c,v 1.58 2005/08/29 19:39:39 tgl Exp $ + * $PostgreSQL: pgsql/src/port/path.c,v 1.59 2005/09/27 17:39:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -538,6 +538,24 @@ get_locale_path(const char *my_exec_path, char *ret_path) make_relative_path(ret_path, LOCALEDIR, PGBINDIR, my_exec_path); } +/* + * get_doc_path + */ +void +get_doc_path(const char *my_exec_path, char *ret_path) +{ + make_relative_path(ret_path, DOCDIR, PGBINDIR, my_exec_path); +} + +/* + * get_man_path + */ +void +get_man_path(const char *my_exec_path, char *ret_path) +{ + make_relative_path(ret_path, MANDIR, PGBINDIR, my_exec_path); +} + /* * get_home_path |
