Skip to content

Commit

Permalink
Move library into a separate directory
Browse files Browse the repository at this point in the history
Since subdirectories are processed first, make attempted to build the
examples before the library was built. This failed, obviously.

Signed-off-by: Petr Tesarik <[email protected]>
  • Loading branch information
ptesarik committed Dec 8, 2015
1 parent b90a4fa commit 1e6e4ba
Show file tree
Hide file tree
Showing 24 changed files with 39 additions and 37 deletions.
37 changes: 2 additions & 35 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,13 @@

ACLOCAL_AMFLAGS = -I m4

SUBDIRS = doc examples

lib_LTLIBRARIES = libkdumpfile.la
libkdumpfile_la_SOURCES = \
attr.c \
context.c \
devmem.c \
diskdump.c \
elfdump.c \
ia32.c \
lkcd.c \
notes.c \
open.c \
read.c \
s390x.c \
s390dump.c \
todo.c \
util.c \
vtop.c \
x86_64.c

EXTRA_libkdumpfile_la_DEPENDENCIES = libkdumpfile.map

libkdumpfile_la_LDFLAGS = -version-info 5:0:5
libkdumpfile_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libkdumpfile.map

include_HEADERS = \
kdumpfile.h

noinst_HEADERS = \
kdumpfile-priv.h \
global-attr.def \
static-attr.def
SUBDIRS = doc src examples

dist_noinst_DATA = \
COPYING.GPLv2 \
COPYING.GPLv3 \
COPYING.LGPLv3 \
README.md \
libkdumpfile.map
README.md

pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA=libkdumpfile.pc
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([Library for reading kernel core dumps],
[0.1.6],[[email protected]],[libkdumpfile])

AC_CONFIG_SRCDIR([diskdump.c])
AC_CONFIG_SRCDIR([src/diskdump.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER([config.h])

Expand All @@ -46,6 +46,7 @@ AC_CONFIG_FILES([
Makefile
doc/Makefile
examples/Makefile
src/Makefile
libkdumpfile.pc
])

Expand Down
4 changes: 3 additions & 1 deletion examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##

AM_CPPFLAGS = -I$(top_srcdir)/src
LIBS = $(top_srcdir)/src/libkdumpfile.la

dumpattr_SOURCES = \
dumpattr.c
dumpattr_LDADD = ../libkdumpfile.la

bin_PROGRAMS = dumpattr
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions src/global-attr.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Definitions for global (but not static) attributes
*
* To use this file, provide a definition for the ATTR() macro:
*
* ATTR(dir, key, id, type, ctype)
*
* @param dir Directory identifier (without the dir_ prefix).
* @param key Key name (a constant C string).
* @param id C identifier.
* @param type Attribute type (kdump_attr_type).
* @param ctype Suggested C type for the attribute.
*
* A typical stanza is:
* #define ATTR(dir, key, field, type, ctype) \
* // use macro arguments to construct whatever you need
* #include "global-attr.def"
* #undef ATTR
*/

/* utsname */
ATTR(linux_uts, "sysname", linux_uts_sysname, string, const char *)
ATTR(linux_uts, "nodename", linux_uts_nodename, string, const char *)
ATTR(linux_uts, "release", linux_uts_release, string, const char *)
ATTR(linux_uts, "version", linux_uts_version, string, const char *)
ATTR(linux_uts, "machine", linux_uts_machine, string, const char *)
ATTR(linux_uts, "domainname", linux_uts_domainname, string, const char *)

/* Xen */
ATTR(xen_version, "major", xen_ver_major, number, unsigned long)
ATTR(xen_version, "minor", xen_ver_minor, number, unsigned long)
ATTR(xen_version, "extra", xen_ver_extra, string, const char *)
ATTR(xen_version, "extra_addr", xen_ver_extra_addr, address, kdump_vaddr_t)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1e6e4ba

Please sign in to comment.