Fix build from gitversion.h-less source trees

Having proper gitversion.h helps tracking software versions
in the wild. This commit makes source trees that lack the
gitversion.h file for one reason or another buildable.
This commit is contained in:
Nedko Arnaudov 2022-08-29 19:13:33 +03:00
parent 8cba2eb6ef
commit dc662b6bdb
2 changed files with 3 additions and 2 deletions

2
main.c
View File

@ -17,7 +17,7 @@ int main(void)
printf(
"JACK Plugin Launcher, version " JPL_VERSION "\n"
"Copyleft JACK Plugin Authors\n"
#if (HAVE_GITVERSION_H)
#if defined(GIT_VERSION)
"built from " GIT_VERSION "\n"
#endif
"built on " BUILD_TIMESTAMP"\n"

View File

@ -46,7 +46,8 @@ def git_ver(self):
self.ver = "unknown"
fi = open(header, 'w')
fi.write('#define GIT_VERSION "%s"\n' % self.ver)
if self.ver != "unknown":
fi.write('#define GIT_VERSION "%s"\n' % self.ver)
fi.close()
def display_msg(conf, msg="", status = None, color = None):