* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.