diff options
author | dvshkurko <dvshkurko@yandex-team.ru> | 2022-02-10 16:45:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:52 +0300 |
commit | c768a99151e47c3a4bb7b92c514d256abd301c4d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /build/scripts/c_templates/svn_interface.c | |
parent | 321ee9bce31ec6e238be26dbcbe539cffa2c3309 (diff) | |
download | ydb-c768a99151e47c3a4bb7b92c514d256abd301c4d.tar.gz |
Restoring authorship annotation for <dvshkurko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/scripts/c_templates/svn_interface.c')
-rw-r--r-- | build/scripts/c_templates/svn_interface.c | 314 |
1 files changed, 157 insertions, 157 deletions
diff --git a/build/scripts/c_templates/svn_interface.c b/build/scripts/c_templates/svn_interface.c index 45cb2b09b5..d8bdd1a70d 100644 --- a/build/scripts/c_templates/svn_interface.c +++ b/build/scripts/c_templates/svn_interface.c @@ -1,79 +1,79 @@ -// Used indirectly. See build/scripts/vcs_info.py -// ya-bin dump vcs-info > vcs.json +// Used indirectly. See build/scripts/vcs_info.py +// ya-bin dump vcs-info > vcs.json // python build/scripts/vcs_info.py vcs.json out.c build/scripts/c_templates/svn_interface.c <any_prefix>library/cpp/svnversion<any_suffix> - - -#include "build/scripts/c_templates/svnversion.h" - -#define STR1(x) #x -#define STR2(x) STR1(x) - -const char* GetProgramSvnVersion() { -#if defined(REVISION) -// for package systems generating from svn export but providing REVISION macro -#define STRREVISION STR2(REVISION) -#define REVISIONINFO "r" STRREVISION -#if defined(PROGRAM_VERSION) - return PROGRAM_VERSION "\n\n" REVISIONINFO; -#else - return REVISIONINFO " "__DATE__ - " "__TIME__; -#endif -#elif defined(PROGRAM_VERSION) - return PROGRAM_VERSION; -#else - return "No program version found"; -#endif -} - -const char* GetArcadiaSourcePath() { -#if defined(ARCADIA_SOURCE_PATH) - return ARCADIA_SOURCE_PATH; -#else - return ""; -#endif -} - -const char* GetArcadiaSourceUrl() { -#if defined(ARCADIA_SOURCE_URL) - return ARCADIA_SOURCE_URL; -#else - return ""; -#endif -} - -int GetArcadiaLastChangeNum() { -#if defined(ARCADIA_SOURCE_LAST_CHANGE) - return ARCADIA_SOURCE_LAST_CHANGE; -#else - return 0; -#endif -} - -const char* GetArcadiaLastChange() { -#if defined(ARCADIA_SOURCE_LAST_CHANGE) - return STR2(ARCADIA_SOURCE_LAST_CHANGE); -#else - return ""; -#endif -} - -const char* GetArcadiaLastAuthor() { -#if defined(ARCADIA_SOURCE_LAST_AUTHOR) - return ARCADIA_SOURCE_LAST_AUTHOR; -#else - return ""; -#endif -} - -int GetProgramSvnRevision() { -#if defined(ARCADIA_SOURCE_REVISION) - return ARCADIA_SOURCE_REVISION; -#else - return 0; -#endif -} - + + +#include "build/scripts/c_templates/svnversion.h" + +#define STR1(x) #x +#define STR2(x) STR1(x) + +const char* GetProgramSvnVersion() { +#if defined(REVISION) +// for package systems generating from svn export but providing REVISION macro +#define STRREVISION STR2(REVISION) +#define REVISIONINFO "r" STRREVISION +#if defined(PROGRAM_VERSION) + return PROGRAM_VERSION "\n\n" REVISIONINFO; +#else + return REVISIONINFO " "__DATE__ + " "__TIME__; +#endif +#elif defined(PROGRAM_VERSION) + return PROGRAM_VERSION; +#else + return "No program version found"; +#endif +} + +const char* GetArcadiaSourcePath() { +#if defined(ARCADIA_SOURCE_PATH) + return ARCADIA_SOURCE_PATH; +#else + return ""; +#endif +} + +const char* GetArcadiaSourceUrl() { +#if defined(ARCADIA_SOURCE_URL) + return ARCADIA_SOURCE_URL; +#else + return ""; +#endif +} + +int GetArcadiaLastChangeNum() { +#if defined(ARCADIA_SOURCE_LAST_CHANGE) + return ARCADIA_SOURCE_LAST_CHANGE; +#else + return 0; +#endif +} + +const char* GetArcadiaLastChange() { +#if defined(ARCADIA_SOURCE_LAST_CHANGE) + return STR2(ARCADIA_SOURCE_LAST_CHANGE); +#else + return ""; +#endif +} + +const char* GetArcadiaLastAuthor() { +#if defined(ARCADIA_SOURCE_LAST_AUTHOR) + return ARCADIA_SOURCE_LAST_AUTHOR; +#else + return ""; +#endif +} + +int GetProgramSvnRevision() { +#if defined(ARCADIA_SOURCE_REVISION) + return ARCADIA_SOURCE_REVISION; +#else + return 0; +#endif +} + const char* GetVCSDirty() { #if defined(DIRTY) @@ -83,33 +83,33 @@ const char* GetVCSDirty() #endif } -const char* GetProgramHash() { -#if defined(ARCADIA_SOURCE_HG_HASH) - return ARCADIA_SOURCE_HG_HASH; -#else - return ""; -#endif -} - -const char* GetProgramCommitId() { -#if defined(ARCADIA_SOURCE_REVISION) - if (ARCADIA_SOURCE_REVISION <= 0) { - return GetProgramHash(); - } - return STR2(ARCADIA_SOURCE_REVISION); -#else - return GetProgramHash(); -#endif -} - -const char* GetProgramScmData() { -#if defined(SCM_DATA) - return SCM_DATA; -#else - return ""; -#endif -} - +const char* GetProgramHash() { +#if defined(ARCADIA_SOURCE_HG_HASH) + return ARCADIA_SOURCE_HG_HASH; +#else + return ""; +#endif +} + +const char* GetProgramCommitId() { +#if defined(ARCADIA_SOURCE_REVISION) + if (ARCADIA_SOURCE_REVISION <= 0) { + return GetProgramHash(); + } + return STR2(ARCADIA_SOURCE_REVISION); +#else + return GetProgramHash(); +#endif +} + +const char* GetProgramScmData() { +#if defined(SCM_DATA) + return SCM_DATA; +#else + return ""; +#endif +} + const char* GetProgramShortVersionData() { #if defined(SVN_REVISION) && defined(SVN_TIME) return STR2(SVN_REVISION) " (" SVN_TIME ")"; @@ -118,30 +118,30 @@ const char* GetProgramShortVersionData() { #endif } -const char* GetProgramBuildUser() { -#if defined(BUILD_USER) - return BUILD_USER; -#else - return ""; -#endif -} - -const char* GetProgramBuildHost() { -#if defined(BUILD_HOST) - return BUILD_HOST; -#else - return ""; -#endif -} - -const char* GetProgramBuildDate() { -#if defined(BUILD_DATE) - return BUILD_DATE; -#else - return ""; -#endif -} - +const char* GetProgramBuildUser() { +#if defined(BUILD_USER) + return BUILD_USER; +#else + return ""; +#endif +} + +const char* GetProgramBuildHost() { +#if defined(BUILD_HOST) + return BUILD_HOST; +#else + return ""; +#endif +} + +const char* GetProgramBuildDate() { +#if defined(BUILD_DATE) + return BUILD_DATE; +#else + return ""; +#endif +} + int GetProgramBuildTimestamp() { #if defined(BUILD_TIMESTAMP) return BUILD_TIMESTAMP; @@ -151,34 +151,34 @@ int GetProgramBuildTimestamp() { } -const char* GetVCS() { -#if defined(VCS) - return VCS; -#else - return ""; -#endif -} - -const char* GetBranch() { -#if defined(BRANCH) - return BRANCH; -#else - return ""; -#endif -} - -int GetArcadiaPatchNumber() { -#if defined(ARCADIA_PATCH_NUMBER) - return ARCADIA_PATCH_NUMBER; -#else - return 42; -#endif -} - -const char* GetTag() { -#if defined(ARCADIA_TAG) - return ARCADIA_TAG; -#else - return ""; -#endif -} +const char* GetVCS() { +#if defined(VCS) + return VCS; +#else + return ""; +#endif +} + +const char* GetBranch() { +#if defined(BRANCH) + return BRANCH; +#else + return ""; +#endif +} + +int GetArcadiaPatchNumber() { +#if defined(ARCADIA_PATCH_NUMBER) + return ARCADIA_PATCH_NUMBER; +#else + return 42; +#endif +} + +const char* GetTag() { +#if defined(ARCADIA_TAG) + return ARCADIA_TAG; +#else + return ""; +#endif +} |