Skip to content

Commit b0929c8

Browse files
committed
Put back old Makefiles, in pgsql and pgsql/src.
1 parent 5083a01 commit b0929c8

File tree

2 files changed

+70
-14
lines changed

2 files changed

+70
-14
lines changed

Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# The PostgreSQL make files exploit features of GNU make that other
2+
# makes do not have. Because it is a common mistake for users to try
3+
# to build Postgres with a different make, we have this make file
4+
# that, as a service, will look for a GNU make and invoke it, or show
5+
# an error message if none could be found.
6+
7+
# If the user were using GNU make now, this file would not get used
8+
# because GNU make uses a make file named "GNUmakefile" in preference
9+
# to "Makefile" if it exists. PostgreSQL is shipped with a
10+
# "GNUmakefile". If the user hasn't run the configure script yet, the
11+
# GNUmakefile won't exist yet, so we catch that case as well.
12+
13+
14+
all install clean dep depend distclean maintainer-clean:
15+
@if ! [ -f GNUmakefile ] ; then \
16+
echo "You need to run the \`configure' program first. See the file"; \
17+
echo "\`INSTALL' for installation instructions." ; \
18+
false ; \
19+
fi
20+
@IFS=':' ; \
21+
for dir in $$PATH; do \
22+
for prog in gmake gnumake make; do \
23+
if [ -f $$dir/$$prog ] && ( $$dir/$$prog --version | grep GNU >/dev/null 2>&1 ) ; then \
24+
GMAKE=$$dir/$$prog; \
25+
break 2; \
26+
fi; \
27+
done; \
28+
done; \
29+
\
30+
if [ x"$${GMAKE+set}" = xset ]; then \
31+
echo "Using GNU make found at $${GMAKE}"; \
32+
$${GMAKE} $@ ; \
33+
else \
34+
echo "You must use GNU make to build PostgreSQL." ; \
35+
false; \
36+
fi

src/Makefile

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
1-
# The Postgres make files exploit features of GNU make that other makes
2-
# do not have. Because it is a common mistake for users to try to build
3-
# Postgres with a different make, we have this make file that does nothing
4-
# but tell the user to use GNU make.
1+
# The PostgreSQL make files exploit features of GNU make that other
2+
# makes do not have. Because it is a common mistake for users to try
3+
# to build Postgres with a different make, we have this make file
4+
# that, as a service, will look for a GNU make and invoke it, or show
5+
# an error message if none could be found.
56

6-
# If the user were using GNU make now, this file would not get used because
7-
# GNU make uses a make file named "GNUmakefile" in preference to "Makefile"
8-
# if it exists. Postgres is shipped with a "GNUmakefile".
7+
# If the user were using GNU make now, this file would not get used
8+
# because GNU make uses a make file named "GNUmakefile" in preference
9+
# to "Makefile" if it exists. PostgreSQL is shipped with a
10+
# "GNUmakefile". If the user hasn't run the configure script yet, the
11+
# GNUmakefile won't exist yet, so we catch that case as well.
912

10-
all install clean dep depend distclean:
11-
@echo "You must use GNU make to use Postgres. It may be installed"
12-
@echo "on your system with the name 'gmake'."
13-
@echo
14-
@echo "NOTE: If you are sure that you are using GNU make and you are"
15-
@echo " still getting this message, you may simply need to run"
16-
@echo " the configure program."
13+
14+
all install clean dep depend distclean maintainer-clean:
15+
@if ! [ -f GNUmakefile ] ; then \
16+
echo "You need to run the \`configure' program first. See the file"; \
17+
echo "\`INSTALL' for installation instructions." ; \
18+
false ; \
19+
fi
20+
@IFS=':' ; \
21+
for dir in $$PATH; do \
22+
for prog in gmake gnumake make; do \
23+
if [ -f $$dir/$$prog ] && ( $$dir/$$prog --version | grep GNU >/dev/null 2>&1 ) ; then \
24+
GMAKE=$$dir/$$prog; \
25+
break 2; \
26+
fi; \
27+
done; \
28+
done; \
29+
\
30+
if [ x"$${GMAKE+set}" = xset ]; then \
31+
echo "Using GNU make found at $${GMAKE}"; \
32+
$${GMAKE} $@ ; \
33+
else \
34+
echo "You must use GNU make to build PostgreSQL." ; \
35+
false; \
36+
fi

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy