aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/vdb/Makefile.am
blob: e01432f8e349027cef367053f13056945dd4a869 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda
DISTCLEANFILES = vdb_repository-sr.hh vdb_repository-sr.cc
MAINTAINERCLEANFILES = Makefile.in

AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@
DEFS= \
	-DSYSCONFDIR=\"$(sysconfdir)\" \
	-DLIBEXECDIR=\"$(libexecdir)\" \
	-DDATADIR=\"$(datadir)\"

paludis_repositories_libdir = $(libdir)/paludis/repositories

if MONOLITHIC

noinst_LTLIBRARIES = libpaludisvdbrepository.la

else

paludis_repositories_lib_LTLIBRARIES = libpaludisvdbrepository.la

endif

libpaludisvdbrepository_la_SOURCES = \
	vdb_repository.cc \
	vdb_repository.hh \
	vdb_version_metadata.hh \
	vdb_version_metadata.cc \
	registration.cc

libpaludisvdbrepository_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
paludis_repositories_vdb_includedir = $(includedir)/paludis/repositories/vdb/
paludis_repositories_vdb_include_HEADERS = \
	vdb_repository.hh \
	vdb_version_metadata.hh \
	vdb_repository-sr.hh

if ! MONOLITHIC

libpaludisvdbrepository_la_LIBADD = \
	$(top_builddir)/paludis/libpaludis.la \
	$(top_builddir)/paludis/util/libpaludisutil.la \
	$(DYNAMIC_LD_LIBS)

endif

TESTS = vdb_repository_TEST

vdb_repository_TEST_SOURCES = vdb_repository_TEST.cc

vdb_repository_TEST_LDADD = \
	$(top_builddir)/paludis/util/test_extras.o \
	$(top_builddir)/test/libtest.a \
	$(top_builddir)/paludis/environment/test/libpaludistestenvironment.la \
	libpaludisvdbrepository.la \
	$(top_builddir)/paludis/libpaludis.la \
	$(top_builddir)/paludis/util/libpaludisutil.la

vdb_repository_TEST_CXXFLAGS = -I$(top_srcdir)

EXTRA_DIST = \
	vdb_repository_TEST.cc \
	vdb_repository_TEST_setup.sh \
	vdb_repository_TEST_cleanup.sh \
	vdb_repository-sr.hh \
	vdb_repository-sr.cc \
	vdb_repository.sr

BUILT_SOURCES = \
	vdb_repository-sr.hh \
	vdb_repository-sr.cc

check_PROGRAMS = $(TESTS)
check_SCRIPTS = vdb_repository_TEST_setup.sh vdb_repository_TEST_cleanup.sh

TESTS_ENVIRONMENT = env \
	PALUDIS_EBUILD_DIR="$(top_srcdir)/ebuild/" \
	PALUDIS_SKIP_CONFIG="yes" \
	PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \
	TEST_SCRIPT_DIR="$(srcdir)/" \
	bash $(top_srcdir)/test/run_test.sh

vdb_repository-sr.hh : vdb_repository.sr $(top_srcdir)/misc/make_sr.bash
	$(top_srcdir)/misc/make_sr.bash --header $(srcdir)/vdb_repository.sr > $@

vdb_repository-sr.cc : vdb_repository.sr $(top_srcdir)/misc/make_sr.bash
	$(top_srcdir)/misc/make_sr.bash --source $(srcdir)/vdb_repository.sr > $@

built-sources : $(BUILT_SOURCES)
	for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done