• R/O
  • SSH

libctools: Commit

This library contains code that extends and simplifies different operations
for C language based programs.


Commit MetaInfo

Revisión39d7b8993db3a3d5cc49921cc35884fb8edfef2e (tree)
Tiempo2017-02-25 21:14:54
Autors.gusarov
Commiters.gusarov

Log Message

Refactoring: buildinfo renamed to build_info

Cambiar Resumen

Diferencia incremental

diff -r 64dd1246b938 -r 39d7b8993db3 .hgignore
--- a/.hgignore Tue Feb 21 19:14:54 2017 +0300
+++ b/.hgignore Sat Feb 25 15:14:54 2017 +0300
@@ -11,7 +11,7 @@
1111
1212 build
1313
14-buildinfo/include/ctools/version_info.h
14+build_info/include/ctools/version_info.h
1515 include/ctools/trace_bcc.h
1616
1717 libctools_README.pdf
diff -r 64dd1246b938 -r 39d7b8993db3 .hgsubstate
--- a/.hgsubstate Tue Feb 21 19:14:54 2017 +0300
+++ b/.hgsubstate Sat Feb 25 15:14:54 2017 +0300
@@ -1,4 +1,4 @@
1-d984a2a4b7a474ad7cb25a7d374d75fd4e758fa0 cmake/cmake_tools
1+d316064b2db0c5323048e49447db0f9a80723764 cmake/cmake_tools
22 5013d507802becd2c434d4dbdafad45c3da5ef23 include/ctools/std/msinttypes
3-07c40b2f37f1e1a850751747ac9674200da49c37 pyrepo
3+b97ab65c7f1d00796a67e3e5d89339576b11b7c3 pyrepo
44 2988e980fbc2252fa4290b608517d4ae25cd9a46 tests/unity
diff -r 64dd1246b938 -r 39d7b8993db3 CMakeLists.txt
--- a/CMakeLists.txt Tue Feb 21 19:14:54 2017 +0300
+++ b/CMakeLists.txt Sat Feb 25 15:14:54 2017 +0300
@@ -20,8 +20,8 @@
2020
2121 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_tools/tools/python_binary.cmake)
2222
23-execute_process(COMMAND ${CMT_PYTHON_BINARY} ${CMAKE_CURRENT_LIST_DIR}/pyrepo/gen_buildinfo.py
24- "CT" ${CMAKE_CURRENT_LIST_DIR}/buildinfo/include/ctools
23+execute_process(COMMAND ${CMT_PYTHON_BINARY} ${CMAKE_CURRENT_LIST_DIR}/pyrepo/gen_build_info.py
24+ "CT" ${CMAKE_CURRENT_LIST_DIR}/build_info/include/ctools
2525 )
2626
2727 if (NOT PROJECT_NAME AND NOT CT_STANDALONE_BUILD)
@@ -68,13 +68,13 @@
6868
6969 file(GLOB_RECURSE INC1 src/*.h)
7070 file(GLOB_RECURSE INC2 include/*.h)
71-file(GLOB_RECURSE INC3 buildinfo/include/*.h)
71+file(GLOB_RECURSE INC3 build_info/include/*.h)
7272
7373 set(SOURCES ${SRCS1} ${INC1} ${INC2} ${INC3})
7474
7575 include_directories(include)
7676 include_directories(src)
77-include_directories(buildinfo/include)
77+include_directories(build_info/include)
7878
7979 set(LIBRARY_OUTPUT_PATH ${CT_BIN_OUTPUT_PATH})
8080
diff -r 64dd1246b938 -r 39d7b8993db3 README.rst
--- a/README.rst Tue Feb 21 19:14:54 2017 +0300
+++ b/README.rst Sat Feb 25 15:14:54 2017 +0300
@@ -102,7 +102,7 @@
102102 There are 4 ways of how the library can be used:
103103
104104 * Building is not taking place. A project that is going to use ctools
105- should worry about a building process. include and buildinfo/include directories should be passed to the compiler
105+ should worry about a building process. include and build_info/include directories should be passed to the compiler
106106 as directories of headers files. All the modules from src and its subdirectories should be
107107 linked to the output binary (if it is required). In some cases preprocessor definitions
108108 should be set up to choose mode of various subsystems.
diff -r 64dd1246b938 -r 39d7b8993db3 README_RU.rst
--- a/README_RU.rst Tue Feb 21 19:14:54 2017 +0300
+++ b/README_RU.rst Sat Feb 25 15:14:54 2017 +0300
@@ -98,7 +98,7 @@
9898 Существует 4 варианта использования:
9999
100100 * Сборка не осуществляется. Сборкой должен заниматься тот проект,
101- который использует эту библиотеку. Для этого он должен указать пути для поиска заголовочных файлов include и buildinfo/include.
101+ который использует эту библиотеку. Для этого он должен указать пути для поиска заголовочных файлов include и build_info/include.
102102 Линковать все модули из src и подкаталогов src (если таковые нужны). Может потребоваться определение
103103 препроцессорных идентификаторов для выбора режима работы различных подсистем.
104104 По мере развития библиотеки этот вариант сборки нужно сопровождать. Вся актуальная информация может браться из файлов
diff -r 64dd1246b938 -r 39d7b8993db3 build_info/include/ctools/major_version.template
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build_info/include/ctools/major_version.template Sat Feb 25 15:14:54 2017 +0300
@@ -0,0 +1,1 @@
1+0
\ No newline at end of file
diff -r 64dd1246b938 -r 39d7b8993db3 build_info/include/ctools/minor_version.template
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build_info/include/ctools/minor_version.template Sat Feb 25 15:14:54 2017 +0300
@@ -0,0 +1,1 @@
1+1
\ No newline at end of file
diff -r 64dd1246b938 -r 39d7b8993db3 build_info/include/ctools/version_info.h.template
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build_info/include/ctools/version_info.h.template Sat Feb 25 15:14:54 2017 +0300
@@ -0,0 +1,26 @@
1+/*
2+ * @author Sergey Gusarov <laborer2008 (at) gmail.com>
3+ * @section LICENSE
4+ * This Source Code Form is subject to the terms of the Mozilla Public
5+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+ *
8+ * @section DESCRIPTION
9+ * This file should be process by C/C++ compilers and MS resource compiler
10+ * Do not edit. Automatically generated file
11+ */
12+
13+#pragma once
14+
15+#include <ctools/std/stdbool.h>
16+#include <ctools/version.h>
17+
18+
19+#define {prefix}_MAJOR_VERSION {major_version}
20+#define {prefix}_MINOR_VERSION {minor_version}
21+
22+#define {prefix}_BUILD_REVISION {rev}
23+#define {prefix}_INTERNAL_BUILD {is_internal}
24+
25+#define {prefix}_K_VERSION\
26+ CT_VER_STR_DOT({prefix}_MAJOR_VERSION, {prefix}_MINOR_VERSION, {prefix}_BUILD_REVISION)
diff -r 64dd1246b938 -r 39d7b8993db3 buildinfo/include/ctools/major_version.template
--- a/buildinfo/include/ctools/major_version.template Tue Feb 21 19:14:54 2017 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
1-0
\ No newline at end of file
diff -r 64dd1246b938 -r 39d7b8993db3 buildinfo/include/ctools/minor_version.template
--- a/buildinfo/include/ctools/minor_version.template Tue Feb 21 19:14:54 2017 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
1-1
\ No newline at end of file
diff -r 64dd1246b938 -r 39d7b8993db3 buildinfo/include/ctools/version_info.h.template
--- a/buildinfo/include/ctools/version_info.h.template Tue Feb 21 19:14:54 2017 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
1-/*
2- * @author Sergey Gusarov <laborer2008 (at) gmail.com>
3- * @section LICENSE
4- * This Source Code Form is subject to the terms of the Mozilla Public
5- * License, v. 2.0. If a copy of the MPL was not distributed with this
6- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7- *
8- * @section DESCRIPTION
9- * This file should be process by C/C++ compilers and MS resource compiler
10- * Do not edit. Automatically generated file
11- */
12-
13-#pragma once
14-
15-#include <ctools/std/stdbool.h>
16-#include <ctools/version.h>
17-
18-
19-#define {prefix}_MAJOR_VERSION {major_version}
20-#define {prefix}_MINOR_VERSION {minor_version}
21-
22-#define {prefix}_BUILD_REVISION {rev}
23-#define {prefix}_INTERNAL_BUILD {is_internal}
24-
25-#define {prefix}_K_VERSION\
26- CT_VER_STR_DOT({prefix}_MAJOR_VERSION, {prefix}_MINOR_VERSION, {prefix}_BUILD_REVISION)
diff -r 64dd1246b938 -r 39d7b8993db3 scripts/cleanall.py
--- a/scripts/cleanall.py Tue Feb 21 19:14:54 2017 +0300
+++ b/scripts/cleanall.py Sat Feb 25 15:14:54 2017 +0300
@@ -22,7 +22,7 @@
2222
2323 common_clean.clean()
2424
25- fs.removeFile(os.path.join(parentDir, 'buildinfo', 'include', 'ctools', 'version_info.h'))
25+ fs.removeFile(os.path.join(parentDir, 'build_info', 'include', 'ctools', 'version_info.h'))
2626 fs.removeFile(os.path.join(parentDir, 'include', 'ctools', 'trace_bcc.h'))
2727 fs.cleanDir(os.path.join(parentDir, 'build', 'runners'))
2828
diff -r 64dd1246b938 -r 39d7b8993db3 tests/CMakeLists.txt
--- a/tests/CMakeLists.txt Tue Feb 21 19:14:54 2017 +0300
+++ b/tests/CMakeLists.txt Sat Feb 25 15:14:54 2017 +0300
@@ -78,10 +78,10 @@
7878 file(GLOB_RECURSE UNITY_SRC unity/src/*.c)
7979
8080
81-set(TESTS_BUILDINFO_INCLUDE_DIR "../buildinfo/include/ctools")
81+set(TESTS_BUILD_INFO_INCLUDE_DIR "../build_info/include/ctools")
8282
83-file(GLOB TESTS_INCLUDE "${TESTS_BUILDINFO_INCLUDE_DIR}/*.h")
84-generateTest("${TESTS_INCLUDE}" "buildinfo")
83+file(GLOB TESTS_INCLUDE "${TESTS_BUILD_INFO_INCLUDE_DIR}/*.h")
84+generateTest("${TESTS_INCLUDE}" "build_info")
8585
8686
8787 set(TESTS_INCLUDE_DIR "../include/ctools")
diff -r 64dd1246b938 -r 39d7b8993db3 tests/build_info/test_version_info.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/build_info/test_version_info.c Sat Feb 25 15:14:54 2017 +0300
@@ -0,0 +1,43 @@
1+/*
2+ * @author Sergey Gusarov <laborer2008 (at) gmail.com>
3+ * @section LICENSE
4+ * This Source Code Form is subject to the terms of the Mozilla Public
5+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+ *
8+ * @section DESCRIPTION
9+ *
10+ */
11+
12+#include "tests/unity_headers.h"
13+
14+#include <ctools/unused.h>
15+#include <ctools/version_info.h>
16+
17+
18+void setUp(void)
19+{
20+}
21+
22+void tearDown(void)
23+{
24+}
25+
26+void testCompile(void)
27+{
28+ const int kMajorVersion = CT_MAJOR_VERSION;
29+ const int kMinorVersion = CT_MINOR_VERSION;
30+ const int kBuildRevision = CT_BUILD_REVISION;
31+
32+ const bool kInternalBuild = CT_INTERNAL_BUILD;
33+
34+ const char* const kVersion = CT_K_VERSION;
35+
36+ CT_UNUSED(kMajorVersion);
37+ CT_UNUSED(kMinorVersion);
38+ CT_UNUSED(kBuildRevision);
39+
40+ CT_UNUSED(kInternalBuild);
41+
42+ CT_UNUSED(kVersion);
43+}
diff -r 64dd1246b938 -r 39d7b8993db3 tests/buildinfo/test_version_info.c
--- a/tests/buildinfo/test_version_info.c Tue Feb 21 19:14:54 2017 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
1-/*
2- * @author Sergey Gusarov <laborer2008 (at) gmail.com>
3- * @section LICENSE
4- * This Source Code Form is subject to the terms of the Mozilla Public
5- * License, v. 2.0. If a copy of the MPL was not distributed with this
6- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7- *
8- * @section DESCRIPTION
9- *
10- */
11-
12-#include "tests/unity_headers.h"
13-
14-#include <ctools/unused.h>
15-#include <ctools/version_info.h>
16-
17-
18-void setUp(void)
19-{
20-}
21-
22-void tearDown(void)
23-{
24-}
25-
26-void testCompile(void)
27-{
28- const int kMajorVersion = CT_MAJOR_VERSION;
29- const int kMinorVersion = CT_MINOR_VERSION;
30- const int kBuildRevision = CT_BUILD_REVISION;
31-
32- const bool kInternalBuild = CT_INTERNAL_BUILD;
33-
34- const char* const kVersion = CT_K_VERSION;
35-
36- CT_UNUSED(kMajorVersion);
37- CT_UNUSED(kMinorVersion);
38- CT_UNUSED(kBuildRevision);
39-
40- CT_UNUSED(kInternalBuild);
41-
42- CT_UNUSED(kVersion);
43-}
diff -r 64dd1246b938 -r 39d7b8993db3 tests/generate_runners.py
--- a/tests/generate_runners.py Tue Feb 21 19:14:54 2017 +0300
+++ b/tests/generate_runners.py Sat Feb 25 15:14:54 2017 +0300
@@ -28,7 +28,7 @@
2828 return os.path.join(scriptDir, 'src')
2929
3030 def kTestsBuildInfoDir():
31- return os.path.join(scriptDir, 'buildinfo')
31+ return os.path.join(scriptDir, 'build_info')
3232
3333 def kCtoolsBuildDir():
3434 return os.path.join(kParentDir(), 'build')
Show on old repository browser