From 2f99c578716ebe81ddd266389f3ff614b4595a56 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 5 Mar 2016 16:16:13 +0100 Subject: Handle build.h in releases --- pcitool/CMakeLists.txt | 2 +- pcitool/buildinfo.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'pcitool') diff --git a/pcitool/CMakeLists.txt b/pcitool/CMakeLists.txt index d8b5a6c..af0f6e4 100644 --- a/pcitool/CMakeLists.txt +++ b/pcitool/CMakeLists.txt @@ -15,7 +15,7 @@ link_directories( if (NOT DISABLE_PCITOOL) set(HEADERS ${HEADERS} sysinfo.h formaters.h buildinfo.h) add_executable(pci cli.c sysinfo.c formaters.c buildinfo.c) - add_dependencies(pci build pcilib) + add_dependencies(pci pcilib) target_link_libraries(pci pcilib ${FASTWRITER_LIBRARIES}) set_target_properties(pci PROPERTIES LINK_FLAGS "${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_LIBS}" diff --git a/pcitool/buildinfo.c b/pcitool/buildinfo.c index 624a934..2206c62 100644 --- a/pcitool/buildinfo.c +++ b/pcitool/buildinfo.c @@ -4,7 +4,11 @@ void BuildInfo() { printf("\n"); +#ifdef PCILIB_RELEASE + printf("Release: %s (revision: %s built on %s in %s)\n", PCILIB_RELEASE, PCILIB_REVISION, PCILIB_BUILD_DATE, PCILIB_BUILD_DIR); +#else /* PCILIB_RELEASE */ printf("Revision: %s built on %s in %s\n", PCILIB_REVISION, PCILIB_BUILD_DATE, PCILIB_BUILD_DIR); +#endif /* PCILIB_RELEASE */ printf("Branch: %s by %s\n", PCILIB_REVISION_BRANCH, PCILIB_REVISION_AUTHOR); if (strlen(PCILIB_REVISION_MODIFICATIONS)) { printf("Modifications: %s - %s\n", PCILIB_LAST_MODIFICATION, PCILIB_REVISION_MODIFICATIONS); -- cgit v1.2.3