Skip to content

Commit c330b75

Browse files
Dynamically find correct installation docs in Makefile.
The base Makefile will output help to the user when invoking make in an unconfigured tree, the help was however always referring to a file which may not be present as it's only in tarballs. Dynamically check for the presence of the INSTALL file and fall back on README.git when it's not available (which is the case of Git checkouts). Reported-by: Tim McNamara <[email protected]> Reviewed-by: Magnus Hagander <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected]
1 parent 0f47e83 commit c330b75

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@ all:
1717

1818
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
1919
@if [ ! -f GNUmakefile ] ; then \
20+
if [ -f INSTALL ] ; then \
21+
INSTRUCTIONS="INSTALL"; \
22+
else \
23+
INSTRUCTIONS="README.git"; \
24+
fi; \
2025
echo "You need to run the 'configure' program first. See the file"; \
21-
echo "'INSTALL' for installation instructions." ; \
26+
echo "'$$INSTRUCTIONS' for installation instructions, or visit: " ; \
27+
echo "<https://www.postgresql.org/docs/devel/installation.html>" ; \
2228
false ; \
2329
fi
2430
@IFS=':' ; \

0 commit comments

Comments
 (0)