File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -128,4 +128,7 @@ distcheck: dist
128128 rm -rf $(distdir) $(dummy)
129129 @echo "Distribution integrity checks out."
130130
131+ cpluspluscheck: submake-generated-headers
132+ $(top_srcdir)/src/tools/pginclude/cpluspluscheck $(top_srcdir) $(abs_top_builddir)
133+
131134.PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33# Check all exported PostgreSQL include files for C++ compatibility.
4- # Run this from the top-level source directory after performing a build.
4+ #
5+ # Argument 1 is the top-level source directory, argument 2 the
6+ # top-level build directory (they might be the same). If not set, they
7+ # default to the current directory.
8+ #
9+ # Needs to be run after all generated headers are created.
10+ #
511# No output if everything is OK, else compiler errors.
612
13+ if [ -z " $1 " ]; then
14+ srcdir=" ."
15+ else
16+ srcdir=" $1 "
17+ fi
18+
19+ if [ -z " $2 " ]; then
20+ builddir=" $."
21+ else
22+ builddir=" $2 "
23+ fi
24+
725me=` basename $0 `
826
927tmp=` mktemp -d /tmp/$me .XXXXXX`
@@ -22,7 +40,7 @@ trap 'rm -rf $tmp' 0 1 2 3 15
2240# which itself contains C++ code and so won't compile with a C++
2341# compiler under extern "C" linkage.
2442
25- for f in ` find src/include src/interfaces/libpq/libpq-fe.h src/interfaces/libpq/libpq-events.h -name ' *.h' -print | \
43+ for f in ` cd " $srcdir " && find src/include src/interfaces/libpq/libpq-fe.h src/interfaces/libpq/libpq-events.h -name ' *.h' -print | \
2644 grep -v -e ^src/include/port/ \
2745 -e ^src/include/rusagestub.h -e ^src/include/regex/regerrs.h \
2846 -e ^src/include/access/rmgrlist.h \
3654 echo ' };'
3755 } > $tmp /test.cpp
3856
39- ${CXX:- g++} -I . -I src/interfaces/libpq -I src/include -fsyntax-only -Wall -c $tmp /test.cpp
57+ ${CXX:- g++} -I $srcdir -I $srcdir /src/interfaces/libpq -I $srcdir /src/include \
58+ -I $builddir -I $builddir /src/interfaces/libpq -I $builddir /src/include \
59+ -fsyntax-only -Wall -c $tmp /test.cpp
4060done
You can’t perform that action at this time.
0 commit comments