- Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify
  to include some information about the build environment.
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 0e4baad..d2250bb 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -597,7 +597,11 @@
 
 
 # Like testall, but with a single pass only
+# run an optional script to include some information about the build environment
 buildbottest:	all platform
+		-@if which pybuildbot.identify >/dev/null 2>&1; then \
+			pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
+		fi
 		$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rw
 
 QUICKTESTOPTS=	$(TESTOPTS) -x test_thread test_signal test_strftime \
diff --git a/Misc/NEWS b/Misc/NEWS
index 9f4a228..d397a5c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -133,6 +133,8 @@
 
 - Allow Emacs 22 for building the documentation in info format.
 
+- Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify
+  to include some information about the build environment.
 
 What's New in Python 2.5.1?
 =============================