# takes -v option to display compile failure message and line numbers
# src/tools/pginclude/pgcompinclude
+: ${CC:=cc}
+: ${PGSRC:=src}
+
if ! pgdefine
then echo "pgdefine must be in your PATH" 1>&2
exit 1
# Use -O1 to get warnings only generated by optimization,
# but -O2 is too slow.
- cc -fsyntax-only -Werror -Wall -Wmissing-prototypes \
- -Wmissing-declarations -I/pg/include -I/pg/backend \
- -I/pg/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \
+ $CC -fsyntax-only -Werror -Wall -Wmissing-prototypes \
+ -Wmissing-declarations -I$PGSRC/include -I$PGSRC/backend \
+ -I$PGSRC/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \
-o /tmp/$$.o >/tmp/$$ 2>&1
if [ "$?" -ne 0 ]
then echo "$FILE"
# be compiled on the platform from which pgrminclude is run cannot be
# processed, and are skipped.
+: ${CC:=cc}
+: ${PGSRC:=src}
+
if ! pgdefine
then echo "pgdefine must be in your PATH" 1>&2
exit 1
# Use -O1 to get warnings only generated by optimization,
# but -O2 is too slow.
- cc -fsyntax-only -Werror -Wall -Wmissing-prototypes \
- -Wmissing-declarations -I/pg/include -I/pg/backend \
- -I/pg/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \
+ $CC -fsyntax-only -Werror -Wall -Wmissing-prototypes \
+ -Wmissing-declarations -I$PGSRC/include -I$PGSRC/backend \
+ -I$PGSRC/interfaces/libpq -I`dirname $FILE` $CFLAGS -O1 -c /tmp/$$.c \
-o /tmp/$$.o >/tmp/$$ 2>&1
if [ "$?" -eq 0 ]
then [ "$INCLUDE" -o "$VERBOSE" ] && echo "$FILE $INCLUDE"