Commit Graph

76 Commits

Author SHA1 Message Date
Dodji Seketeli
1b4e3844e9 Nested automake conditionals don't work
* configure.ac (ENABLE_ZIP_ARCHIVE_AND_CXX11): Define this
	automake condition variable that is true if both the zip archive
	and c++11 features are enabled.  This is important to know if the
	test runtestdot is going to be compiled.  That test needs both
	c++11 and the zip archive features.
	* tests/Makefile.am: Do not nest automake conditional statements.
	It does not work.  Rather, use the new
	ENABLE_ZIP_ARCHIVE_AND_CXX11 condition variable.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-19 10:23:41 +01:00
Dodji Seketeli
7fbe6a96ed Generate the manual html documentation in the proper build directory
* doc/manuals/Makefile.am: Renamed doc/manuals/Makefile into this.
	(BUILDDIR): Make this variable point to $(builddir)/_build as
	opposed to just _build previously.
	(SOURCEDIR): New variable that points to the source dir as known
	by the autotools magic.
	(ALLSPHINXOPTS): Make the source dir refer to the new
	$(SOURCEDIR), rather than just '.' as previously.
	* configure.ac (doc/manuals/Makefile): Generate this now.
	* doc/Makefile.am: Link the sub-directory doc/manuals.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-18 23:32:50 +01:00
Dodji Seketeli
1082520383 Make the use of a C++-11 compiler optional
* configure.ac: Define a new --enable-cxx11 switch to control the
	use of the C++-11 compiler.  Define a WITH_CXX11 C macro and an
	automake ENABLE_CXX11 variable.
	* config.h.in: Initialize the new WITH_CXX11 C macro.
	* src/Makefile.am: Include the files coded in C++-11 only if the
	ENABLE_CXX11 automake variable is defined.
	* tests/Makefile.am: Likewise, build the runtestsvg test program
	only if C++-11 usage is enabled.
	* include/abg-diff-utils.h (class d_path_vec): Remove useless
	usage of the 'typename' keyword.
	* include/abg-fwd.h (is_enum_type): Renamed is_enum into this,
	because of a name clash with a tr1 function when not using C++-11.
	(is_pointer_type): Likewise, renamed is_pointer into this because
	of a name clash with a tr1 function when not using C++-11.
	* src/abg-comp-filter.cc (has_harmless_name_change): Adjust for
	the is_enum -> is_enum_type change.
	* src/abg-comparison.cc (type_suppression::suppresses_diff):
	Likewise.
	(class function_suppression::priv): Add a missing "class" keyword
	in friend declaration.
	(diff_context::diff_has_been_traversed)
	(diff_context::mark_diff_as_traversed): Do not use the C++-11
	specific type uintptr_t.
	* src/abg-dwarf-reader.cc (create_default_dwfl): Do not use
	designated initializers.  Sigh.  This is handy though.
	(expr_result::abs): Cast the argument of std::abs to avoid
	ambiguous call.
	(finish_member_function_reading): Adjust for the is_pointer ->
	is_pointer_type renaming.
	* src/abg-hash.cc (scope_decl:#️⃣:operator)
	(class_decl::base_spec:#️⃣:operator)
	(type_composition:#️⃣:operator): Use std::tr1::hash string,
	rather than the C++-11 specific std::hash function.
	* src/abg-ini.cc (read_sections, write_sections): Make
	std::ifstream constructor take a const char* rather than a string.
	* src/abg-ir.cc (is_enum_type, is_pointer_type): Renamed is_enum
	into is_enum_type and is_pointer into is_pointer_type.
	* src/abg-writer.cc (write_translation_unit): Remove useless
	typename keyword.  Make ofstream take a const char* rather than a
	string.
	(write_namespace_decl): Remove useless typename keyword.
	(write_corpus_to_native_xml_file): Make ofstream take a const
	char* rather than a string.
	* tests/test-abidiff.cc (main): Make ofstream take a const char*
	rather than a string.
	* tests/test-diff-dwarf.cc (main): Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-05 10:45:07 +01:00
Jan Engelhardt
f505d05b3c Add libelf to libabigail.la's linker line
* configure.ac: Check for the existence of libelf at configure
	time by looking at the presence of the elf_end symbol.  Add the
	libelf to the link command line.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2014-09-12 11:04:57 +02:00
Jan Engelhardt
1708e39fe7 Replace indirect variable assignments
* configure.ac(DEVEL_CFLAGS, DEVEL_CXXFLAGS):  Remove these
	useless variables.
	(CFLAGS, CXXFLAGS): Set these variables directly.
	* include/Makefile.am (pkginclude_HEADERS): Use this predefined
	variable.
	(publicheaders_DATA, publicheadersdir): Remove these.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2014-09-12 11:04:54 +02:00
Jan Engelhardt
e66eda9fe7 Remove empty and autogenerated files from git repository
* ChangeLog: Remove this empty file for now.  It'll be added back
	right before the first release by automatic generation from the
	commit logs.
	* INSTALL: Remove this empty file for now.
	* NEWS: Remove this empty file for now.  It'll be added back right
	before the first release.
	* configure.ac (AM_INIT_AUTOMAKE): As the mandatory but empty
	files above are being removed for now, let's put in the 'foreign'
	mode of automake for the moment.  We'll likely remove it at
	release time.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2014-09-12 11:04:48 +02:00
Jan Engelhardt
aa7fc67119 Set automake options globally
* configure.ac(AM_INIT_AUTOMAKE): Set the subdir-object option
	here ..
	* src/Makefile.am: ... not here.
	* tests/Makefile.am: Likewise.
	* tools/Makefile.am: Likewise.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2014-09-12 11:04:45 +02:00
Jan Engelhardt
0b1224faf1 Stash some autogenerated tools in build-aux/
* configure.ac: Reduce the pollution in the top-level directory a
	bit.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2014-09-12 11:04:42 +02:00
Dodji Seketeli
e6e7680113 Display package configuration at the end of configure
* configure.ac: Display the configure of the package at the end of
	the configure script.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-08-31 11:28:42 +02:00
Dodji Seketeli
36ed6e0583 Make zip archive support optional
* configure.ac: Support a new --enable-zip-archive option.  By
	default its value is set to the 'auto', meaning that if libzip is
	installed, that turns the option on -- just like if
	--enable-zip-archive was called with the value 'yes'; if libzip is
	not installed, that turns the option off -- just like if
	--enable-zip-archive was called with the value 'no'.  If libzip is
	detected, the pre-processor macro HAVE_LIBZIP is set to 1.  If
	--enable-zip-archive is turned on, the pre-processor macro
	WITH_ZIP_ARCHIVE is set to 1.
	* config.h.in (HAVE_LIBZIP, WITH_ZIP): New define.
	* src/abg-corpus.cc: Include config.h.  Guard the inclusion of
	abg-libzip-utils.h with the WITH_ZIP_ARCHIVE macro.  Likewise for
	the use of declarations coming from abg-libzip-utils.h.
	* src/abg-libzip-utils.cc: Include config.h.  Guard the file's
	content with the WITH_ZIP_ARCHIVE macro.
	* src/abg-reader.cc: Include config.h.  Guard the inclusion of
	abg-libzip-utils.h with the WITH_ZIP_ARCHIVE.  Likewise for the
	use of declarations coming from abg-libzip-utils.h.
	* src/abg-writer.cc: Likewise.
	* tests/Makefile.am: Build runtestwritereadarchive and runtestdot
	only if zip archives are supported.
	* tools/Makefile.am: The biar program is built only if
	zip archives are supported.
	* tools/bidiff.cc: Handle zip archives only if the
	WITH_ZIP_ARCHIVE macros is defined.
	* tools/bilint.cc: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-08-31 11:28:42 +02:00
Dodji Seketeli
bd1af4cd52 Initial support of reading an ABI Corpus from DWARF
* configure.ac: Check the presence of libdw.so and
	elfutils/libdwfl.h headers from elfutils and define the necessary
	linking flags.
	* include/abg-dwarf-reader.h: New header file
	* include/Makefile.am: Add the new header file to the source
	distribution.
	* src/abg-dwarf-reader.cc:: New file.
	* src/Makefile.am: Add the new file to the source distribution.
	* include/abg-fwd.h (dump): Add declarations for several overloads
	to allow dumping to a given output stream.
	* include/abg-ir.h (class translation_unit): Use a pimpl idiom for
	this now.
	(translation_unit::canonicalize_type): Declare new method.
	* src/abg-ir.cc (struct translation_unit::priv): New private type
	for the pimpl idiom for translation_unit.
	(translation_unit::{translation_unit, get_global_scope, get_path,
	set_path, get_loc_mgr}): Adjust for pimpl idiom.
	(translation_unit::canonicalize_type): Define this new method and
	one overload.
	* src/abg-writer.cc (dump): Define several overloads to dump IR
	nodes to given output streams.
	* tools/bidw.cc: New file for the new bidw tool.
	* tools/Makefile.am: Define rules to build the new bidw tools.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-12-07 08:07:54 +01:00
Dodji Seketeli
0d738e2b95 Initial version of an archive manipulation program: biar
* tests/test-utils.h (is_dir, ensure_dir_path_created)
	(ensure_parent_dir_created): Move these directories manipulation
	utilities from here to ...
	* tools/abg-tools-utils.h (is_dir, ensure_dir_path_created)
	(ensure_parent_dir_created): ... here in this new file.
	(dir_name, base_name): Declare these new functions.
	* tests/test-utils.cc (is_dir, ensure_dir_path_created)
	(ensure_parent_dir_created): Likewise, move these to ...
	* tools/abg-tools-utils.cc (is_dir, ensure_dir_path_created)
	(ensure_parent_dir_created): ... here in this new file.
	(dir_name, base_name): Define these.
	* tools/Makefile.am: New file.  Create a new libtoolsutils.la
	static library with stuff from tools/abg-tools-utils.cc in it.
	Also create a new 'biar' program with the stuff from the new
	tools/biar.cc in it.
	* tools/biar.cc: New file.  Contains the code for the new "biar"
	archive manipulation command line utility.
	* tests/test-read-write.cc (main): Adjust for the change about
	ensure_parent_dir_created above.
	* tests/test-write-read-archive.cc (main): Likewise.
	* Makefile.am (SUBDIRS): Add the new tools/ sub-directory to the
	build system.
	* configure.ac (AC_CONFIG_FILES): Generate tools/Makefile.
	* tests/Makefile.am: Make libtestutils.la link with the new
	libtoolsutils.la.  Make sure to express the dependencies between
	libtestutils.la and the binaries that depend on it.  Otherwise
	parallel builds can go awry.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-08-29 17:08:47 +02:00
Dodji Seketeli
c57e950ec7 Initial writing/reading of an ABI corpus to an archive
* configure.ac: Support detection of libzip dependency. Define
        new DEPS_CFLAGS and DEPS_LIBS variables for use in
        Makefile.am to refer to the dependency headers and
        libraries.
	* doc/website/mainpage.txt: Update this to talk about the new
	libzip dependency.
	* include/Makefile.am: Add abg-libzip-utils.h to the build system.
	* include/abg-corpus.h (corps): Hide abigail::corpus's private behind a
	pimpl idiom.
	(corpus::{drop_translation_units, get_file_path, set_file_path,
	write, read}): New methods.
	* include/abg-libxml-utils.h (new_reader_from_buffer): Declare new
	function.
	* include/abg-libzip-utils.h: New file.
	* src/Makefile.am: Add abg-corpus.cc and abg-libzip-utils.cc to
	the build system.  Refer to the library and headers dependencies
	via the new DEPS_LIBS and DEPS_CFLAGS variables.
	* src/abg-corpus.cc: New file.
	* src/abg-ir.cc (translation::set_path): New method.
	* src/abg-libxml-utils.cc (new_reader_from_buffer): Define new
	function.
	* src/abg-libzip-utils.cc: New file.
	* src/abg-reader.cc (translation_unit::read): New overload.
	* src/abg-writer.cc: Inject the names from the std namespace into
	the abigail namespace, rather than into abigail::writer.
	(abigail::translation_unit::write): New overload.  This can now
	use ofstream and the other stuff from std that are injected in the
	abigail:: namespace.
	* tests/Makefile.am: Add tests/test-write-read-archive.cc to the
	build system; use that to build runtestwritereadarchive.  Also add
	the input test data from
	tests/data/test-write-read-archive/test[0-4].xml.
	* /tests/data/test-write-read-archive/test[0-4].xml: New test
	input data files.
	* tests/test-write-read-archive.cc: New test for this archive
	write/read support.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-08-27 16:20:41 +02:00
Dodji Seketeli
fb481b3693 Add abg-version.h.in to the source distribution & cleanup
* include/Makefile.am:  Add abg-version.h.in to the source
	distribution.
	* configure.ac: Generate abg-version.h in using the existing
	AC_CONFIG_FILES macro call.
2013-08-22 17:07:07 +02:00
Dodji Seketeli
849b598cf5 Support pkgconfig through a new libabigail.pc file
* libabigail.pc.in: New pkgconfig file.
	* configure.ac: Define the LIBXML2_VERSION variable that is used
	in the libabigail.pc.in file.  Generate the libabigail.pc file
	from its libabigail.pc.in template.
	* Makefile.am: Add libabigail.pc.in to the source distribution.
	Install the generated libabigail.pc to the right destination.
2013-08-22 17:06:56 +02:00
Benjamin Kosnik
d23c4e9b96 Collapse subdir of include to include.
* include/libabigail/abg-*.h: Move to...
	* include/abg-*.h
	* include/libabigail: Remove.

	* configure.ac: Adjust include location from libabigail/include to
	include.
	* Makefile.in: Same.
	* aclocal.m4: Same.
	* configure: Same.
	* doc/Makefile.in: Same.
	* include/Makefile.am: Same.
	* src/Makefile.am: Same.
	* src/Makefile.in: Same.
	* tests/Makefile.am: Same.
	* tests/Makefile.in: Same.
2013-08-14 15:07:18 +02:00
Dodji Seketeli
f9d66af03c Put headers in include/libabigail
* include/libabigail: New directory.
	* include/Makefile.am:  New file.
	* include/libabigail/Makefile.am: New file.
	* src/abg-*.h: Move these in include/libabigail/*.h
	* src/Makefile.am: Set -I option to look for headers in include/libabigail
	* doc/api/libabigail.doxy: Look for headers in include/libabigail
	* tests/Makefile.am: Set -I option to look for headers in include/libabigail
	* abigail.m4: Set includedir to $prefix/include/libabigail for
	library used as a dep, or to srcdir/libabigail/include/libabigail
	in GCC source tree.
	* configure.ac: Add Makefile.am in include and include/libabigail
	* abigail.m4: Look for headers in include/libabigail when the
	libabigail is in in the source tree and in $incdir/libabigail when
	it is installed as a dependency.
2013-07-23 23:13:56 +02:00
Benjamin Kosnik
6fb9db6505 Fixup abg-version.h merge duplicate.
2013-05-21  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.ac: Remove src/abg-version.h merge duplicate.
2013-07-23 23:13:54 +02:00
Benjamin Kosnik
73dec4acda Generate abg-version.h at configure time.
2013-05-20  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.ac: Add src/abg-version.h to AC_CONFIG_FILES.
	* src/Makefile.am: Remove abg-version.h generation rules.
	* src/abg-version.h.in: New.
2013-07-23 23:13:54 +02:00
Benjamin Kosnik
cdf03dd644 Generate abg-version at configure time in builddir
* configure.ac: Add src/abg-version.h to AC_CONFIG_FILES.
	* src/Makefile.am: Remote ad-hoc generation of abg-version.h from
	here.
	* src/abg-version.h.in: New file.
	* configure: Re-generate.
	* src/Makefile.in: Likewise.
2013-07-23 23:13:52 +02:00
Dodji Seketeli
e4fefbdbe4 Allow autoconf-based clients to detect the library
* configure.ac: Define the components of the version number as
	autoconf variables.  Set the version number to 0.1.0
	* abigail.m4: New file
	* Makefile.am: Add abigail.m4 to the build system.  Install it in
	  $(datadir)/aclocal.
	* src/Makefile.am: Generate and add abg-version.h from the version
	number autoconf variable defined in configure.ac.  Re-generate
	abg-version.h each time configure.ac changes.
	* src/abg-config.h (abigail_get_library_version): Declare ...
	* src/abg-config.cc (abigail_get_library_version): ... and define
	this wirth C linkage.  This is useful for autoconf tests to test
	for the presence of the library.
	* configure: Re-generate.
	* Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* tests/Makefile.in: Likewise.
2013-07-23 23:13:51 +02:00
Benjamin Kosnik
43a83cf453 Add doc dir. Add Doxgen api generation rules.
2013-04-02  Benjamin Kosnik  <bkoz@redhat.com>

	* doc: Add.
	* doc/Makefile.am (html, install-html): Add.
	* doc/Makefile.in: Add.
	* doc/api/libabigail.doxy: Add doxygen config.
	* src/abg-*: Add @file markup.
2013-04-03 15:21:33 +02:00
Benjamin Kosnik
342b932d54 Various autotool adjustments
* configure: Add.
	* configure.ac (AM_INIT_AUTOMAKE): Use gcc versions.
        (PKG_CHECK_MODULES): Re-use libjava/classpath solution, naming.
	* m4/pkg.m4: Add, take from classpath.
	* src/Makefile.am: Adjust names.
2013-03-27 21:01:54 +01:00
Dodji Seketeli
fc27d10cee Debugged type-decl de-serialization
* src/abg-ir.cc (namespace_decl::~namespace_decl): Add this
	missing virtual constructor definition.
	* src/abg-reader.cc (read_context::{get_cur_decl,pop_decl}):
	Return a null pointer when the decls stack is empty.
	(update_read_context): Don't try to de-reference a NULL cur_decl.
	(read_input): Don't try to poke at file validity here.  What was I
	thinking.  Really test for advance_cursor to return 1, expressing
	success.
	* src/abg-reader.h (read_file):  Fix style.
	* Makefile.am: Add tests sub-directory.
	* configure.ac: Build with debugging-friendly options if the
	ABIGAIL_DEBUG env variable is set.  Generate tests/Makefile.
	* tests/Makefile.am: New file.
	* tests/test-read-write.cc: Likewise.
	* tests/test-utils.{h,cc}: Likewise.
	* tests/data/test-read-write/input0.xml: Likewise.
2013-03-21 23:57:22 +01:00
Dodji Seketeli
8e225db39a Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
	* src/abg-corpus.{h,cc}: New files.
	* src/abg-hash.{h,cc}: Likewise.
	* src/abg-libxml-utils.{h,cc}: Likewise.
	* src/abg-reader.{h,cc}: Likewise.
	* src/abg-serialize.{h,cc}: Likewise.
	* src/abg-writer.h: Likewise.
	* src/Makefile.am: Build the new files above.
	* src/abg-ir.h (class location): Add public accessors for the value, and
	a truth operator.  Make the methods be inline.
	(class decl_base): Renamed decl into this.  Renamed what_decl_kind
	into what_kind. Renamed get_context into get_scope.  Add virtual
	destructor, accessors for location and name.
	(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
	Re-style.
	(struct {decl_base_hash, type_decl_hash}): New hashing functors.
	(class {scope_type_decl, namespace_decl}): Add virtual dtor.
	* src/abg-ir.cc (location::*): Remove location definitions.  There
	are now inline in the header.
	(class decl_base): Renamed decl into this.  Remove most of the
	definitions from here as their are now inline in the header.
	(scope_decl::~scope_decl, type_base::~type_base)
	(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
	definitions.
2013-03-08 14:31:37 +01:00
Dodji Seketeli
d7d371a742 Initial import Abigail
This is the initial Import of the

    ABI Generic Analysis and Instrumentation Library
2013-02-28 11:42:57 +01:00