Fix generating demo_conf.h on builds without GIT in PATH
Hi,
The latest update to how demo_conf.h is generated assumes that the git
program is in the PATH
, which may not always be the case, so this adds a fallback like we did before if the git
program was not found. Also, pass in the $(srcroot)
to the script so that we can have call git
on the source directory, so that we can get the right SHA1 sum (or nothing in stdout
if $(srcroot)
is not a GIT checkout). Also do a minor cleanup to the lines where we output the line for #define VCS_TAG ...
.
With blessings, thank you!
Edited by Chun-wei Fan