Mark gcc-c-api target 'install' as PHONY

Ensure that 'make install' works even if a file named 'install' exists.
Mark top level target 'install' as PHONY

Ensure that 'make install' works even if a file named 'install' exists.
Derive PLUGIN_NAME from $PYTHON

Set PLUGIN_NAME from $PYTHON so that multi-Python builds do not collide.
Support building for a gcc other than the host compiler

This allows compiling a gcc-python-plugin to run in the context of a
cross-compiler.  Using the cross-compiler to build gcc-python-plugin
would produce a plugin that cannot be loaded on the host system.
Combine sed expressions to reduce number of sed calls

Replace "cp && sed -i" with "sed >", so that the file is written with
the desired values on the first pass.  Using a single sed reduces the
number of processes and the number of complete file rewrites.
Use $(MAKE) and -C when running sub-make processes

Use $(MAKE) to run the same make even when it is not named 'make' or is
not first on the path.  Use -C for simplicity, since the Makefile
already relies on GNU make extensions.
Avoid competing header generation in parallel builds

When GNU make is given the rule:

    a b: $(DEPS)
	    command

Then for each target that needs an update, command will run.  If a
single run of command generates all the targets, then multiple runs are
at best wasteful and at worst counterproductive if concurrent runs can
corrupt each other's output.
Extract gcc version without running a test program

Change generation of print-gcc-version to preprocess, but not compile, a
dummy source file containing the macro GCC_VERSION, then scan the
resulting output to find the numeric value of the macro.  This lets the
compiler do the work of expanding the expression, but avoids running a
test program.  This is necessary for cross-compiler support, since
cross-compiled test outputs cannot be run locally.

Store the output in autogenerated-gcc-version, since it is not a
runnable program.
Generate EXTRA_CFLAGS before recursing into gcc-c-api

Rules in gcc-c-api assume the available of
autogenerated-EXTRA_CFLAGS.txt, so ensure it is generated before
recursing into gcc-c-api, even in highly parallel workloads.
Stage generated files to a temporary name

Generate to a temporary name, so that a failure in the script does not
leave behind an up-to-date incomplete file.  If the script exits
successfully, then rename the file to its proper name.
Fix make warning for autogenerated-casts.c override

Use $(filter-out) to eliminate autogenerated-casts.c from the general
recipe, so that make does not warn when it encounters a specific recipe
for autogenerated-casts.c.
Set missing docstrings to NULL ptr, not (char*)"NULL"

Add a convenience function that knows not to quote the keyword NULL.
Avoid shell call for autogenerated-EXTRA_CFLAGS.txt

Instead of passing the contents of autogenerated-EXTRA_CFLAGS.txt on the
gcc command line, read it in and use it to decide whether to run gcc or
g++.  This also produces a cleaner failure mode if
autogenerated-EXTRA_CFLAGS.txt has an unexpected value.
Enable cross-version compiling

Rename GCC_VERSION to TARGET_GCC_VERSION in source files.  Add a command
line preprocessor definition setting TARGET_GCC_VERSION to the value of
the file autogenerated-gcc-version, which contains the effective
GCC_VERSION of TARGET_GCC.