librazor/Makefile.am
author J. Ali Harlow <ali@juiblex.co.uk>
Fri Oct 17 09:57:19 2014 +0100 (2014-10-17)
changeset 456 bae5adee8c8c
parent 454 56ff755c268c
child 457 51a084acef49
permissions -rw-r--r--
Add facility to specify razor command when running tests.

This makes it easy to run under eg., valgrind as:

./details "libtool --mode=execute valgrind --leak-check=yes ../src/razor"
     1 ## Process this file with automake to produce Makefile.in
     2 
     3 SUBDIRS = types
     4 
     5 INCLUDES = \
     6 	-I$(top_builddir)/gl -I$(top_srcdir)/gl \
     7 	-I$(top_builddir)/src -I$(top_srcdir)/src \
     8 	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
     9 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
    10 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
    11 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
    12 	-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" \
    13 	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
    14 	-DPACKAGE_LIB_DIR=\""$(libdir)"\"
    15 
    16 lib_LTLIBRARIES = librazor.la
    17 check_PROGRAMS = test-pfu
    18 if HAVE_LUA
    19   check_PROGRAMS += test-lua
    20 endif
    21 
    22 if INSTALL_TEST_PROGRAMS
    23   bin_PROGRAMS = $(check_PROGRAMS)
    24 endif
    25 
    26 librazorincludedir = $(includedir)/razor
    27 
    28 librazorinclude_HEADERS =              			\
    29 	razor.h
    30 
    31 librazor_la_SOURCES =                                	\
    32 	razor-internal.h				\
    33 	razor.h						\
    34 	razor.c						\
    35 	root.c						\
    36 	util.c						\
    37 	path.c						\
    38 	rpm.c						\
    39 	iterator.c					\
    40 	importer.c					\
    41 	merger.c					\
    42 	error.c						\
    43 	atomic.c					\
    44 	atomic-ktm.c					\
    45 	atomic-none.c					\
    46 	atomic-emulate.c				\
    47 	atomic-actions.c				\
    48 	transaction.c
    49 
    50 if HAVE_LUA
    51   librazor_la_SOURCES += lua.c
    52 endif
    53 
    54 librazor_la_LIBADD = $(ZLIB_LIBS) types/libtypes.la $(LUA_LIBS) \
    55 	../gl/libgnu.la $(INTLLIBS) $(EXTRA_LIBS)
    56 librazor_la_LDFLAGS = -no-undefined -export-symbols-regex '^razor_' \
    57 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    58 
    59 test_pfu_SOURCES = test-pfu.c
    60 test_pfu_LDADD = path.lo util.lo error.lo types/libtypes.la \
    61 	../gl/libgnu.la $(INTLLIBS) $(EXTRA_LIBS)
    62 
    63 TESTS = test-pfu
    64 
    65 if HAVE_LUA
    66   test_lua_SOURCES = test-lua.c
    67   test_lua_LDADD = lua.lo util.lo error.lo types/libtypes.la $(LUA_LIBS) \
    68 	../gl/libgnu.la $(INTLLIBS) $(EXTRA_LIBS)
    69 
    70   TESTS += test-lua
    71 endif
    72 
    73 EXTRA_DIST = 			\
    74 	test.lua
    75 
    76 clean-local :
    77 	rm -f *~
    78