libabigail/include/abg-version.h.in
Dodji Seketeli 522cc62b9b abidw: Add --abixml-version
Add a command line option to display the version number of the ABIXML
output format.

	* doc/manuals/abidw.rst: Document the --abixml-version command
	line option.
	* configure.ac (ABIXML_VERSION_MAJOR, ABIXML_VERSION_MINOR):
	Define these two new autoconf variables.
	* include/abg-config.h (abigail_get_abixml_version): Declare new
	function.
	* include/abg-tools-utils.h (get_abixml_version_string): Declare
	new function.
	* include/abg-version.h.in (ABIGAIL_ABIXML_VERSION_MAJOR)
	(ABIGAIL_ABIXML_VERSION_MINOR): Define new preprocessor macros.
	* src/abg-config.cc (config::config): Initialize
	config::m_format_{minor,major} using the newly defined
	preprocessor macros ABIGAIL_ABIXML_VERSION_M{IN,AJ}OR.
	* src/abg-tools-utils.cc (get_abixml_version_string): Define new
	function.
	* tools/abidw.cc (options::display_abixml_version): Define new
	data member.
	(options::options): Initialize it.
	(display_usage): Emit a help string for the new --abixml-version
	option.
	(parse_command_line): Parse the --abixml-version string.
	(main): Emit the abixml version when asked.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2021-11-12 18:31:28 +01:00

11 lines
442 B
C

// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#ifndef __ABG_VERSION_H__
#define __ABG_VERSION_H__
#define ABIGAIL_VERSION_MAJOR "@VERSION_MAJOR@"
#define ABIGAIL_VERSION_MINOR "@VERSION_MINOR@"
#define ABIGAIL_VERSION_REVISION "@VERSION_REVISION@"
#define ABIGAIL_VERSION_SUFFIX "@VERSION_SUFFIX@"
#define ABIGAIL_ABIXML_VERSION_MAJOR "@ABIXML_VERSION_MAJOR@"
#define ABIGAIL_ABIXML_VERSION_MINOR "@ABIXML_VERSION_MINOR@"
#endif