core-lightning/common/version.c
ZmnSCPxj jxPCSnmZ 6fadd5aea2 Makefile: Remove gen_version.h from ALL_GEN_HEADERS.
This prevents recompiling everything when you are changing just a doc, or
touching only one file among hundreds of sources, just because the
`gen_version.h` is changed, especially since only one source actually
depends on that header.
2020-08-07 10:41:37 +09:30

20 lines
344 B
C

#include "version.h"
#include <stdio.h>
/* Only common/version.c can safely include this. */
# include "gen_version.h"
const char *version(void)
{
return VERSION;
}
char *version_and_exit(const void *unused UNUSED)
{
printf("%s\n", VERSION);
if (BUILD_FEATURES[0]) {
printf("Built with features: %s\n", BUILD_FEATURES);
}
exit(0);
}