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

Commit 513e89b

Browse files
committed
please find attached an alternate submission which addresses open item
"make pgxs install by default". It is up to the committers to chose. (1) there is only one "install" target. no more "install-all-headers". it simplifies/changes several makefiles. (2) the documentation reflects the change. (3) a minor fix on pgxs to use a nicer patch without a double slash. Fabien Coelho
1 parent d42d427 commit 513e89b

File tree

7 files changed

+23
-48
lines changed

7 files changed

+23
-48
lines changed

GNUmakefile.in

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# PostgreSQL top level makefile
33
#
4-
# $PostgreSQL: pgsql/GNUmakefile.in,v 1.40 2004/07/30 12:26:39 petere Exp $
4+
# $PostgreSQL: pgsql/GNUmakefile.in,v 1.41 2004/10/06 08:49:58 momjian Exp $
55
#
66

77
subdir =
@@ -15,19 +15,16 @@ all:
1515
@echo "All of PostgreSQL successfully made. Ready to install."
1616

1717
install:
18-
$(MAKE) -C doc install
19-
$(MAKE) -C src install
20-
$(MAKE) -C config install
18+
$(MAKE) -C doc $@
19+
$(MAKE) -C src $@
20+
$(MAKE) -C config $@
2121
@echo "PostgreSQL installation complete."
2222

2323
installdirs uninstall distprep:
2424
$(MAKE) -C doc $@
2525
$(MAKE) -C src $@
2626
$(MAKE) -C config $@
2727

28-
install-all-headers:
29-
$(MAKE) -C src $@
30-
3128
# clean, distclean, etc should apply to contrib too, even though
3229
# it's not built by default
3330
clean:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# GNUmakefile won't exist yet, so we catch that case as well.
1212

1313

14-
all check install installdirs install-all-headers installcheck uninstall dep depend clean distclean maintainer-clean:
14+
all check install installdirs installcheck uninstall dep depend clean distclean maintainer-clean:
1515
@if [ ! -f GNUmakefile ] ; then \
1616
echo "You need to run the 'configure' program first. See the file"; \
1717
echo "'INSTALL' for installation instructions." ; \

doc/src/sgml/installation.sgml

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.205 2004/10/01 02:00:43 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.206 2004/10/06 08:49:59 momjian Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1035,18 +1035,9 @@ All of PostgreSQL is successfully made. Ready to install.
10351035
</para>
10361036

10371037
<para>
1038-
The standard installation provides only the header files needed for client
1039-
application development. If you plan to do any server-side program
1040-
development (such as custom functions or data types written in C),
1041-
then you may want to install the entire <productname>PostgreSQL</>
1042-
include tree into your target include directory. To do that, enter
1043-
<screen>
1044-
<userinput>gmake install-all-headers</userinput>
1045-
</screen>
1046-
This adds a megabyte or two to the installation footprint, and is only
1047-
useful if you don't plan to keep the whole source tree around for
1048-
reference. (If you do, you can just use the source's include
1049-
directory when building server-side software.)
1038+
The standard installation provides all the header files needed for client
1039+
application development as well as for any server-side program
1040+
development (such as custom functions or data types written in C).
10501041
</para>
10511042

10521043
<formalpara>

src/Makefile

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/Makefile,v 1.34 2004/08/20 20:13:10 momjian Exp $
7+
# $PostgreSQL: pgsql/src/Makefile,v 1.35 2004/10/06 08:49:59 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -33,10 +33,6 @@ install-local: installdirs-local
3333
$(INSTALL_DATA) $(srcdir)/Makefile.shlib $(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.shlib
3434
$(INSTALL_DATA) $(srcdir)/nls-global.mk $(DESTDIR)$(pgxsdir)/$(subdir)/nls-global.mk
3535

36-
install-all-headers:
37-
$(MAKE) -C include $@
38-
$(MAKE) -C port $@
39-
4036
installdirs: installdirs-local
4137

4238
installdirs-local:

src/include/Makefile

+9-18
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
#
33
# Makefile for src/include
44
#
5-
# 'make install' installs only those headers needed for client-side
6-
# programming. 'make install-all-headers' installs the whole contents
7-
# of src/include.
5+
# 'make install' installs whole contents of src/include.
86
#
9-
# $PostgreSQL: pgsql/src/include/Makefile,v 1.12 2003/11/29 19:52:08 pgsql Exp $
7+
# $PostgreSQL: pgsql/src/include/Makefile,v 1.13 2004/10/06 08:50:00 momjian Exp $
108
#
119
#-------------------------------------------------------------------------
1210

@@ -18,8 +16,11 @@ include $(top_builddir)/src/Makefile.global
1816
all: pg_config.h pg_config_os.h
1917

2018

21-
# Install only selected headers
19+
# Subdirectories containing headers for server-side dev
20+
SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
21+
nodes optimizer parser port regex rewrite storage tcop utils
2222

23+
# Install all headers
2324
install: all installdirs remove-old-headers
2425
# These headers are needed by the public headers of the interfaces.
2526
$(INSTALL_DATA) $(srcdir)/postgres_ext.h $(DESTDIR)$(includedir)
@@ -33,18 +34,7 @@ install: all installdirs remove-old-headers
3334
$(INSTALL_DATA) $(srcdir)/postgres_fe.h $(DESTDIR)$(includedir_internal)
3435
$(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h $(DESTDIR)$(includedir_internal)/libpq
3536
$(INSTALL_DATA) $(srcdir)/lib/dllist.h $(DESTDIR)$(includedir_internal)/lib
36-
37-
installdirs:
38-
$(mkinstalldirs) $(DESTDIR)$(includedir)/libpq $(DESTDIR)$(includedir_internal)/libpq $(DESTDIR)$(includedir_internal)/lib
39-
40-
41-
# Install all headers
42-
43-
# Subdirectories containing headers that install-all-headers should install
44-
SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
45-
nodes optimizer parser port regex rewrite storage tcop utils
46-
47-
install-all-headers: all install-all-dirs
37+
# These headers are needed for server-side development
4838
$(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir_server)
4939
$(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
5040
for file in $(srcdir)/*.h; do \
@@ -56,7 +46,8 @@ install-all-headers: all install-all-dirs
5646
done \
5747
done
5848

59-
install-all-dirs:
49+
installdirs:
50+
$(mkinstalldirs) $(DESTDIR)$(includedir)/libpq $(DESTDIR)$(includedir_internal)/libpq $(DESTDIR)$(includedir_internal)/lib
6051
$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS))
6152

6253

src/makefiles/pgxs.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PGXS: PostgreSQL extensions makefile
22

3-
# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.1 2004/07/30 12:26:40 petere Exp $
3+
# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.2 2004/10/06 08:50:02 momjian Exp $
44

55
# This file contains generic rules to build many kinds of simple
66
# extension modules. You only need to set a few variables and include
@@ -50,7 +50,7 @@ endif
5050

5151
ifdef PGXS
5252
# We assume that we are in src/makefiles/, so top is ...
53-
top_builddir := $(dir $(PGXS))/../..
53+
top_builddir := $(dir $(PGXS))../..
5454
include $(top_builddir)/src/Makefile.global
5555

5656
top_srcdir = $(top_builddir)

src/port/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# for use only by the backend binaries
1616
#
1717
# IDENTIFICATION
18-
# $PostgreSQL: pgsql/src/port/Makefile,v 1.19 2004/10/04 13:43:58 momjian Exp $
18+
# $PostgreSQL: pgsql/src/port/Makefile,v 1.20 2004/10/06 08:50:02 momjian Exp $
1919
#
2020
#-------------------------------------------------------------------------
2121

@@ -36,7 +36,7 @@ LIBOBJS_SRV := $(patsubst thread.o,thread_srv.o, $(LIBOBJS_SRV))
3636
all: libpgport.a libpgport_srv.a
3737

3838
# libpgport is needed by some contrib
39-
install-all-headers:
39+
install:
4040
$(INSTALL_STLIB) libpgport.a $(DESTDIR)$(libdir)
4141

4242
uninstall:

0 commit comments

Comments
 (0)