Skip to content

Commit 08d9aee

Browse files
committed
build: Remove duplicate version information from src/clientversion.h
Fail when the version information is not defined otherwise when HAVE_CONFIG_H is not set.
1 parent 168a703 commit 08d9aee

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

src/clientversion.h

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,13 @@
77

88
#if defined(HAVE_CONFIG_H)
99
#include "config/bitcoin-config.h"
10-
#else
11-
12-
/**
13-
* client versioning and copyright year
14-
*/
15-
16-
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
17-
#define CLIENT_VERSION_MAJOR 0
18-
#define CLIENT_VERSION_MINOR 14
19-
#define CLIENT_VERSION_REVISION 99
20-
#define CLIENT_VERSION_BUILD 0
21-
22-
//! Set to true for release, false for prerelease or test build
23-
#define CLIENT_VERSION_IS_RELEASE false
24-
25-
/**
26-
* Copyright year (2009-this)
27-
* Todo: update this when changing our copyright comments in the source
28-
*/
29-
#define COPYRIGHT_YEAR 2017
30-
3110
#endif //HAVE_CONFIG_H
3211

12+
// Check that required client information is defined
13+
#if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || !defined(CLIENT_VERSION_REVISION) || !defined(CLIENT_VERSION_BUILD) || !defined(CLIENT_VERSION_IS_RELEASE) || !defined(COPYRIGHT_YEAR)
14+
#error Client version information missing: wasn't defined by bitcoin-config.h nor defined any other way
15+
#endif
16+
3317
/**
3418
* Converts the parameter X to a string after macro replacement on X has been performed.
3519
* Don't merge these into one macro!

0 commit comments

Comments
 (0)