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

Commit 44eaafe

Browse files
committed
End users shouldn't have to invoke a separate command to install the
documentation. Therefore it's now installed by default. If there is no documentation to be found (i.e., you are not using the distribution) then this step is skipped. Add --docdir option to configure to control installation directory.
1 parent 5da7e53 commit 44eaafe

File tree

4 files changed

+55
-65
lines changed

4 files changed

+55
-65
lines changed

GNUmakefile.in

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
#
22
# PostgreSQL top level makefile
33
#
4-
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.7 2000/07/16 14:50:28 petere Exp $
4+
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.8 2000/07/17 22:31:56 petere Exp $
55
#
66

77
subdir =
88
top_builddir = .
99
include src/Makefile.global
1010

1111
all:
12+
$(MAKE) -C doc all
1213
$(MAKE) -C src all
1314
@echo "All of PostgreSQL successfully made. Ready to install."
1415

1516
install:
17+
$(MAKE) -C doc install
1618
$(MAKE) -C src install
1719
@cat $(srcdir)/register.txt
1820

19-
installdirs uninstall:
21+
installdirs uninstall clean:
22+
$(MAKE) -C doc $@
2023
$(MAKE) -C src $@
2124

22-
clean:
23-
$(MAKE) -C src clean
24-
25+
# Important: distclean `doc' before `src', otherwise Makefile.global
26+
# will be gone too soon.
2527
distclean maintainer-clean:
28+
-$(MAKE) -C doc $@
2629
-$(MAKE) -C src $@
2730
-rm -f config.cache config.log config.status GNUmakefile
2831

configure.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ dnl 8. System services
1414
dnl
1515
dnl Read the Autoconf manual for details.
1616

17+
dnl The GNU folks apparently haven't heard that some people don't use
18+
dnl Texinfo. Use this sorcery to use "docdir" instead of "infodir".
19+
define([info], [doc])
20+
define([infodir], [docdir])
1721
AC_INIT(src/backend/access/common/heaptuple.c)
22+
undefine([infodir])
23+
undefine([info])
24+
1825
AC_PREFIX_DEFAULT(/usr/local/pgsql)
1926
AC_CONFIG_HEADER(src/include/config.h)
2027

@@ -78,7 +85,7 @@ esac
7885
AC_MSG_ERROR([
7986
*******************************************************************
8087
PostgreSQL has apparently not been ported to your platform yet.
81-
To try a manual configuration, look info the src/template directory
88+
To try a manual configuration, look into the src/template directory
8289
for a similar platform and use the \`--with-template=' option.
8390

8491
Please also contact <pgsql-ports@postgresql.org> to see about

doc/Makefile

Lines changed: 37 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,58 @@
11
#----------------------------------------------------------------------------
22
#
3-
# Makefile
4-
# Postgres documentation installation makefile
5-
# Thomas Lockhart
3+
# PostgreSQL documentation installation makefile
64
#
75
# Copyright (c) 1994, Regents of the University of California
86
#
9-
#
10-
# IDENTIFICATION
11-
# $Header: /cvsroot/pgsql/doc/Makefile,v 1.17 2000/07/16 14:50:32 petere Exp $
7+
# $Header: /cvsroot/pgsql/doc/Makefile,v 1.18 2000/07/17 22:31:57 petere Exp $
128
#
139
#----------------------------------------------------------------------------
1410

15-
PGDOCS= $(POSTGRESDIR)/doc
16-
SRCDIR= ../src
17-
18-
TAR= tar
11+
# This directory doesn't build anything, it is only responsible for
12+
# installing the documenation. It is invoked automatically by the
13+
# top-level makefile. The files to be installed are prepared specially
14+
# and are placed in this directory during distribution bundling. In
15+
# CVS-based trees these files don't exist, so we skip the installation
16+
# in that case.
17+
#
18+
# To actually build the documenation, look into the src/ and src/sgml
19+
# subdirectories.
1920

20-
# Pick up Makefile.global from the source area
21-
# This is the only resource from the code source area and is optional.
22-
# Actually, we want this to get Makefile.custom - thomas 1998-03-01
21+
subdir = doc
22+
top_builddir = ..
23+
include $(top_builddir)/src/Makefile.global
2324

24-
ifneq ($(wildcard $(SRCDIR)/Makefile.global), )
25-
include $(SRCDIR)/Makefile.global
26-
endif
27-
28-
# Hmm, made this optional but jade _really_ doesn't like them missing
29-
# - thomas 1998-03-01
30-
ifneq ($(HDSL), )
31-
HTMLOPTS= -d $(HDSL)
32-
endif
33-
ifneq ($(PDSL), )
34-
PRINTOPTS= -d $(PDSL)
35-
endif
3625

37-
MODULES= admin postgres programmer tutorial user
38-
TARGETS= $(MODULES:%=%.html)
26+
MODULES := admin postgres programmer tutorial user
3927

40-
.PRECIOUS: postgres.tex postgres.dvi
41-
.PHONY: beforeinstall install all clean distclean
28+
found_MODULES := $(foreach module, $(MODULES), $(shell test -f $(srcdir)/$(module).tar.gz && echo $(module)))
4229

43-
beforeinstall:
44-
-@if [ ! -d $(PGDOCS) ]; then mkdir $(PGDOCS); fi
30+
ifneq ($(wildcard $(srcdir)/man.tar.gz),)
31+
found_man := yes
32+
endif
4533

46-
install:
47-
$(MAKE) all
48-
$(MAKE) man
4934

50-
all: beforeinstall $(MODULES)
35+
all:
5136

52-
clean:
53-
rm -rf $(MODULES)
5437

55-
distclean:
56-
$(MAKE) clean
38+
install: all installdirs
39+
ifneq ($(strip $(found_MODULES)),)
40+
for module in $(found_MODULES); do \
41+
gunzip -c $${module}.tar.gz | ( cd $(docdir)/$$module && $(TAR) xf - ) || \
42+
exit; \
43+
done
44+
endif
45+
ifdef found_man
46+
gunzip -c man.tar.gz | ( cd $(mandir) && $(TAR) xf - )
47+
endif
5748

58-
man:
59-
-@if test ! -d $(POSTMANDIR) ; then mkdir $(POSTMANDIR) ; fi
60-
gunzip -c man.tar.gz | (cd $(POSTMANDIR) ; $(TAR) xf - )
6149

62-
#
63-
# Generic production rules
64-
#
50+
installdirs:
51+
$(mkinstalldirs) $(mandir) $(addprefix $(docdir)/, . $(found_MODULES))
6552

66-
# Unpack tar file
67-
# Put into area pointed to by $(PGDOCS).
68-
## Make a local file to keep track of dependencies,
69-
## if $(PGDOCS) points somewhere else.
70-
## Disable this for now - thomas 1998-03-01
71-
# Remove the contents of the target directory
72-
# to replace symlinks - thomas 1998-03-01
7353

74-
%: %.tar.gz
75-
rm -rf ./$@ $(PGDOCS)/$*
76-
if test ! -d $(PGDOCS)/$* ; then mkdir $(PGDOCS)/$* ; fi
77-
gunzip -c $< | (cd $(PGDOCS)/$* ; $(TAR) xf - )
78-
# touch ./$*
54+
uninstall:
55+
-rm -rf $(addprefix $(docdir)/, $(MODULES))
56+
ifdef found_man
57+
-rm -f $(addprefix $(mandir)/, $(shell gunzip -c man.tar.gz | tar tf -))
58+
endif

src/Makefile.global.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.87 2000/07/16 14:50:41 petere Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.88 2000/07/17 22:31:59 petere Exp $
1111
#
1212
# NOTES
1313
# Essentially all Postgres make files include this file and use the
@@ -95,8 +95,8 @@ localstatedir = @localstatedir@
9595
libdir = @libdir@
9696
includedir = @includedir@
9797
mandir = @mandir@
98+
docdir = @docdir@
9899

99-
docdir = ${prefix}/doc
100100
odbcinst_ini_dir = @odbcinst_ini_dir@
101101

102102
# old variable names for installation directories

0 commit comments

Comments
 (0)