Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3b86b46

Browse files
committed
Make pgcompinclude/pgrminclude less tied to Bruce's personal machine.
Not everyone has /pg linked to the src subdirectory of their PostgreSQLtree. Also, cc isn't the way to invoke the compiler everywhere.
1 parent65d9aed commit3b86b46

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

‎src/tools/pginclude/pgcompinclude

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# takes -v option to display compile failure message and line numbers
44
# src/tools/pginclude/pgcompinclude
55

6+
: ${CC:=cc}
7+
: ${PGSRC:=src}
8+
69
if ! pgdefine
710
thenecho "pgdefine must be in your PATH" 1>&2
811
exit 1
@@ -29,9 +32,9 @@ do
2932

3033
# Use -O1 to get warnings only generated by optimization,
3134
# but -O2 is too slow.
32-
cc -fsyntax-only -Werror -Wall -Wmissing-prototypes \
33-
-Wmissing-declarations -I/pg/include -I/pg/backend \
34-
-I/pg/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \
35+
$CC -fsyntax-only -Werror -Wall -Wmissing-prototypes \
36+
-Wmissing-declarations -I$PGSRC/include -I$PGSRC/backend \
37+
-I$PGSRC/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \
3538
-o /tmp/$$.o >/tmp/$$ 2>&1
3639
if [ "$?" -ne 0 ]
3740
thenecho "$FILE"

‎src/tools/pginclude/pgrminclude

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
# be compiled on the platform from which pgrminclude is run cannot be
1919
# processed, and are skipped.
2020

21+
: ${CC:=cc}
22+
: ${PGSRC:=src}
23+
2124
if ! pgdefine
2225
thenecho "pgdefine must be in your PATH" 1>&2
2326
exit 1
@@ -104,9 +107,9 @@ compile_file() {
104107

105108
# Use -O1 to get warnings only generated by optimization,
106109
# but -O2 is too slow.
107-
cc -fsyntax-only -Werror -Wall -Wmissing-prototypes \
108-
-Wmissing-declarations -I/pg/include -I/pg/backend \
109-
-I/pg/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \
110+
$CC -fsyntax-only -Werror -Wall -Wmissing-prototypes \
111+
-Wmissing-declarations -I$PGSRC/include -I$PGSRC/backend \
112+
-I$PGSRC/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \
110113
-o /tmp/$$.o >/tmp/$$ 2>&1
111114
if [ "$?" -eq 0 ]
112115
then[ "$INCLUDE" -o "$VERBOSE" ] && echo "$FILE $INCLUDE"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp