bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash
diff --git a/Misc/ACKS b/Misc/ACKS
index fb62b5b..6f80ab7 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1120,6 +1120,7 @@
 Douglas Orr
 William Orr
 Michele Orrù
+Tomáš Orsava
 Oleg Oshmyan
 Denis S. Otkidach
 Peter Otten
diff --git a/Misc/NEWS b/Misc/NEWS
index 4500021..25619ef 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1037,6 +1037,10 @@
 Build
 -----
 
+- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``,
+  ``make install`` and some other make targets when configured with
+  ``--enable-optimizations``.
+
 - bpo-23404: Don't regenerate generated files based on file modification time
   anymore: the action is now explicit. Replace ``make touch`` with
   ``make regen-all``.