aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/cran/Makefile.am
blob: e79f8389b2ca62e493775007a4200a9e0c9eebae (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
SUBDIRS = cran .
CLEANFILES = *~ gmon.out *.gcov *.gcno  *.gcda *.loT
DISTCLEANFILES = cran_repository-sr.hh cran_repository-sr.cc
MAINTAINERCLEANFILES = Makefile.in

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

paludis_repositories_libdir = $(libdir)/paludis/repositories

if MONOLITHIC

noinst_LTLIBRARIES = libpaludiscranrepository_@PALUDIS_PC_SLOT@.la

else

paludis_repositories_lib_LTLIBRARIES = libpaludiscranrepository_@PALUDIS_PC_SLOT@.la

endif

paludis_repositories_cran_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/cran/
libpaludiscranrepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0

paludis_repositories_cran_include_HEADERS = \
	cran_package_id.hh \
	cran_dep_parser.hh \
	cran_repository.hh \
	cran_repository-sr.hh \
	cran_installed_repository.hh \
	cran_installed_repository-sr.hh \
	description_file.hh \
	masks.hh \
	keys.hh \
	normalise.hh \
	dep_spec_pretty_printer.hh \
	package_dep_spec.hh

libpaludiscranrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
	cran_package_id.cc \
	cran_dep_parser.cc \
	cran_repository.cc \
	cran_installed_repository.cc \
	description_file.cc \
	registration.cc \
	normalise.cc \
	masks.cc \
	keys.cc \
	dep_spec_pretty_printer.cc \
	package_dep_spec.cc \
	$(paludis_repositories_cran_include_HEADERS)

libpaludiscranrepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
	$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
	$(DYNAMIC_LD_LIBS)

TESTS = \
	cran_dep_parser_TEST \
	cran_repository_TEST \
	cran_installed_repository_TEST \
	description_file_TEST

cran_dep_parser_TEST_SOURCES = cran_dep_parser_TEST.cc

cran_dep_parser_TEST_LDADD= \
	$(top_builddir)/paludis/util/test_extras.o \
	$(top_builddir)/test/libtest.a \
	libpaludiscranrepository_@PALUDIS_PC_SLOT@.la

cran_installed_repository_TEST_SOURCES = cran_installed_repository_TEST.cc

cran_installed_repository_TEST_LDADD = \
	$(top_builddir)/paludis/util/test_extras.o \
	$(top_builddir)/test/libtest.a \
	libpaludiscranrepository_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
	$(DYNAMIC_LD_LIBS)

cran_repository_TEST_SOURCES = cran_repository_TEST.cc

cran_repository_TEST_LDADD = \
	$(top_builddir)/paludis/util/test_extras.o \
	$(top_builddir)/test/libtest.a \
	libpaludiscranrepository_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
	$(DYNAMIC_LD_LIBS)

description_file_TEST_SOURCES = description_file_TEST.cc

description_file_TEST_LDADD = \
	$(top_builddir)/paludis/util/test_extras.o \
	$(top_builddir)/test/libtest.a \
	libpaludiscranrepository_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
	$(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
	$(DYNAMIC_LD_LIBS)

EXTRA_DIST = \
	cran_repository_TEST.cc \
	cran_repository_TEST_setup.sh \
	cran_repository_TEST_cleanup.sh \
	cran_repository.sr \
	cran_repository-sr.hh \
	cran_repository-sr.cc \
	cran_installed_repository.sr \
	cran_installed_repository-sr.hh \
	cran_installed_repository-sr.cc \
	cran_installed_repository_TEST.cc \
	cran_installed_repository_TEST_setup.sh \
	cran_installed_repository_TEST_cleanup.sh

BUILT_SOURCES = \
	cran_repository-sr.hh \
	cran_repository-sr.cc \
	cran_installed_repository-sr.hh \
	cran_installed_repository-sr.cc

check_PROGRAMS = $(TESTS)
check_SCRIPTS = \
	cran_repository_TEST_setup.sh cran_repository_TEST_cleanup.sh \
	cran_installed_repository_TEST_setup.sh cran_installed_repository_TEST_cleanup.sh

TESTS_ENVIRONMENT = env \
	CRAN_BASH_DIR="$(top_srcdir)/paludis/repositories/cran/cran/" \
	PALUDIS_SKIP_CONFIG="yes" \
	PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \
	PALUDIS_DISTRIBUTION="gentoo" \
	TEST_SCRIPT_DIR="$(srcdir)/" \
	PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \
	bash $(top_srcdir)/test/run_test.sh

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

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

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

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

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

distcheck-deps-local : $(DISTCHECK_DEPS)

distcheck-deps : distcheck-deps-subdirs

distcheck-deps-subdirs :
	for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
	    else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done