Martin, thanks for the review and the suggestions.
The attached patch makes the following changes:
* do not modify the source files so as not to break builds made from
read-only build sources (as per issue 15819)
* the cross-build copies the graminit.[ch] files to the build directory
* fix tab indentation
Patch tested by checking that the graminit.[ch] time stamps do not
change in the source directory afer a build and after a cross-build,
and by running the test suite both natively and on android emulator.