blob: 4971be4a4d06652f22093bad9a3445b852fb28a1 [file] [log] [blame]
Colin Walters86315522012-07-30 12:27:10 -04001SUBDIRS = . libkmod/docs
2
3if BUILD_MANPAGES
4SUBDIRS += man
5endif
Lucas De Marchi646b83b2012-01-09 04:20:55 -02006
Lucas De Marchi6afc9cd2012-01-25 02:44:45 -02007DISTCLEAN_LOCAL_HOOKS =
Lucas De Marchi85ece202011-12-02 17:53:54 -02008EXTRA_DIST =
Lucas De Marchi3a33a7a2014-03-24 08:27:19 -03009CLEANFILES = $(BUILT_FILES)
10BUILT_FILES =
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020011ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
12AM_MAKEFLAGS = --no-print-directory
13
14AM_CPPFLAGS = \
15 -include $(top_builddir)/config.h \
Lucas De Marchi586fc302011-11-21 14:35:35 -020016 -I$(top_srcdir)/libkmod \
Lucas De Marchi576dd432014-10-02 22:03:19 -030017 -I$(top_srcdir) \
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020018 -DSYSCONFDIR=\""$(sysconfdir)"\" \
Jan Engelhardt7b3a74f2011-12-24 04:45:22 +010019 -DLIBEXECDIR=\""$(libexecdir)"\" \
20 ${zlib_CFLAGS}
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020021
Lucas De Marchie48f3762012-03-17 15:12:44 -030022AM_CFLAGS = $(WARNINGFLAGS)
23AM_LDFLAGS = $(GCLDFLAGS)
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020024
Kay Sievers9faa7b32011-12-21 11:48:07 -020025SED_PROCESS = \
26 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
27 -e 's,@VERSION\@,$(VERSION),g' \
28 -e 's,@prefix\@,$(prefix),g' \
29 -e 's,@exec_prefix\@,$(exec_prefix),g' \
30 -e 's,@libdir\@,$(libdir),g' \
31 -e 's,@includedir\@,$(includedir),g' \
Jan Engelhardtb182f8f2011-12-24 14:58:30 +010032 -e 's,@liblzma_CFLAGS\@,${liblzma_CFLAGS},g' \
33 -e 's,@liblzma_LIBS\@,${liblzma_LIBS},g' \
Jan Engelhardt7b3a74f2011-12-24 04:45:22 +010034 -e 's,@zlib_CFLAGS\@,${zlib_CFLAGS},g' \
35 -e 's,@zlib_LIBS\@,${zlib_LIBS},g' \
Kay Sievers9faa7b32011-12-21 11:48:07 -020036 < $< > $@ || rm $@
37
38%.pc: %.pc.in Makefile
39 $(SED_PROCESS)
40
Lucas De Marchi40758602012-09-06 16:26:53 -030041LIBKMOD_CURRENT=4
Lucas De Marchiae58de02014-06-14 12:46:38 -030042LIBKMOD_REVISION=8
Lucas De Marchi40758602012-09-06 16:26:53 -030043LIBKMOD_AGE=2
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020044
Lucas De Marchi529148e2011-12-27 12:26:51 -020045noinst_LTLIBRARIES = libkmod/libkmod-util.la
Lucas De Marchi8eded792014-10-03 00:13:49 -030046libkmod_libkmod_util_la_SOURCES = \
47 shared/macro.h \
Lucas De Marchi74d1df62014-10-03 00:22:36 -030048 shared/missing.h \
49 shared/array.c \
50 shared/array.h \
Lucas De Marchi0db718e2014-10-03 00:29:18 -030051 shared/hash.c \
52 shared/hash.h \
Lucas De Marchi8eded792014-10-03 00:13:49 -030053 shared/util.c \
54 shared/util.h \
Lucas De Marchi8eded792014-10-03 00:13:49 -030055 libkmod/libkmod-util.c \
56 libkmod/libkmod-util.h
Lucas De Marchi529148e2011-12-27 12:26:51 -020057
Lucas De Marchi586fc302011-11-21 14:35:35 -020058include_HEADERS = libkmod/libkmod.h
59lib_LTLIBRARIES = libkmod/libkmod.la
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020060
Lucas De Marchi8eded792014-10-03 00:13:49 -030061libkmod_libkmod_la_SOURCES = \
Lucas De Marchi576dd432014-10-02 22:03:19 -030062 shared/macro.h \
Lucas De Marchi8b7189b2014-10-02 22:08:47 -030063 shared/missing.h \
Lucas De Marchi586fc302011-11-21 14:35:35 -020064 libkmod/libkmod.h \
Lucas De Marchi83b855a2013-07-04 16:13:11 -030065 libkmod/libkmod-internal.h \
Lucas De Marchi6924e472011-11-22 05:38:28 -020066 libkmod/libkmod.c \
Lucas De Marchi53697972011-11-22 05:42:09 -020067 libkmod/libkmod-list.c \
Lucas De Marchi7c2ab352011-11-29 18:07:43 -020068 libkmod/libkmod-config.c \
Lucas De Marchie8847fd2011-11-30 15:23:28 -020069 libkmod/libkmod-index.c \
70 libkmod/libkmod-index.h \
Gustavo Sverzut Barbieri3d8226e2011-12-16 16:08:53 -020071 libkmod/libkmod-module.c \
Gustavo Sverzut Barbieri708624a2011-12-18 01:25:06 -020072 libkmod/libkmod-file.c \
Michal Marek8fe16812013-01-16 09:52:01 +010073 libkmod/libkmod-elf.c \
74 libkmod/libkmod-signature.c
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020075
Lucas De Marchi586fc302011-11-21 14:35:35 -020076EXTRA_DIST += libkmod/libkmod.sym
Lucas De Marchie1b1ab22012-07-10 09:42:24 -030077EXTRA_DIST += libkmod/README libkmod/COPYING testsuite/COPYING COPYING
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020078
Lucas De Marchi586fc302011-11-21 14:35:35 -020079libkmod_libkmod_la_LDFLAGS = $(AM_LDFLAGS) \
80 -version-info $(LIBKMOD_CURRENT):$(LIBKMOD_REVISION):$(LIBKMOD_AGE) \
81 -Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym
Lucas De Marchi8eded792014-10-03 00:13:49 -030082libkmod_libkmod_la_DEPENDENCIES = \
83 libkmod/libkmod-util.la \
84 ${top_srcdir}/libkmod/libkmod.sym
85libkmod_libkmod_la_LIBADD = \
86 libkmod/libkmod-util.la \
87 ${liblzma_LIBS} ${zlib_LIBS}
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020088
Lucas De Marchi83b855a2013-07-04 16:13:11 -030089noinst_LTLIBRARIES += libkmod/libkmod-internal.la
90libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
91libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) \
Lucas De Marchi39baaec2012-01-10 16:22:59 -020092 -Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym
Lucas De Marchi83b855a2013-07-04 16:13:11 -030093libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES)
94libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD)
Lucas De Marchi39baaec2012-01-10 16:22:59 -020095
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020096pkgconfigdir = $(libdir)/pkgconfig
Lucas De Marchi586fc302011-11-21 14:35:35 -020097pkgconfig_DATA = libkmod/libkmod.pc
Kay Sievers9faa7b32011-12-21 11:48:07 -020098EXTRA_DIST += libkmod/libkmod.pc.in
99CLEANFILES += libkmod/libkmod.pc
Lucas De Marchiecd40ee2011-11-21 12:35:15 -0200100
Lucas De Marchi80cf2c82013-07-30 03:47:19 -0300101bashcompletiondir=@bashcompletiondir@
102dist_bashcompletion_DATA = \
103 shell-completion/bash/kmod
104
Kay Sieverse79bf832011-12-22 15:40:24 +0100105install-exec-hook:
106 if test "$(libdir)" != "$(rootlibdir)"; then \
Lucas De Marchi6a4fa8d2011-12-23 01:59:31 -0200107 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
Kay Sieverse79bf832011-12-22 15:40:24 +0100108 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libkmod.so) && \
109 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
110 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libkmod.so && \
111 mv $(DESTDIR)$(libdir)/libkmod.so.* $(DESTDIR)$(rootlibdir); \
112 fi
113
114uninstall-hook:
115 rm -f $(DESTDIR)$(rootlibdir)/libkmod.so*
116
Gustavo Sverzut Barbieri72c51a92011-12-10 22:19:41 -0200117if BUILD_TOOLS
Lucas De Marchi8d750532012-01-04 08:58:19 -0200118bin_PROGRAMS = tools/kmod
119
Lucas De Marchi8eded792014-10-03 00:13:49 -0300120noinst_SCRIPTS = \
121 tools/insmod tools/rmmod tools/lsmod \
122 tools/modprobe tools/modinfo tools/depmod
Lucas De Marchi8900b912011-12-22 02:33:36 -0200123
Lucas De Marchi8eded792014-10-03 00:13:49 -0300124tools_kmod_SOURCES = \
125 tools/kmod.c tools/kmod.h tools/lsmod.c \
126 tools/rmmod.c tools/insmod.c \
127 tools/modinfo.c tools/modprobe.c \
128 tools/depmod.c tools/log.h tools/log.c \
129 tools/static-nodes.c
130tools_kmod_LDADD = \
131 libkmod/libkmod-util.la \
132 libkmod/libkmod-internal.la
Lucas De Marchi00fc9262012-01-10 11:15:19 -0200133
Lucas De Marchib6adccd2013-07-04 16:01:55 -0300134${noinst_SCRIPTS}: tools/kmod
Lucas De Marchi00fc9262012-01-10 11:15:19 -0200135 $(AM_V_GEN) ($(RM) $@; \
136 $(LN_S) $(notdir $<) $@)
Gustavo Sverzut Barbieri72c51a92011-12-10 22:19:41 -0200137endif
138
Lucas De Marchi6afc9cd2012-01-25 02:44:45 -0200139# ------------------------------------------------------------------------------
Lucas De Marchi3a33a7a2014-03-24 08:27:19 -0300140# PYTHON BINDINGS
141# ------------------------------------------------------------------------------
142
143CYTHON_FLAGS_VERBOSE_ =
144CYTHON_FLAGS_VERBOSE_0 =
145CYTHON_FLAGS_VERBOSE_1 = -v
146CYTHON_FLAGS = $(CYTHON_FLAGS_VERBOSE_$(V))
147AM_V_CYTHON = $(am__v_CYTHON_$(V))
148am__v_CYTHON_ = $(am__v_CYTHON_$(AM_DEFAULT_VERBOSITY))
149am__v_CYTHON_0 = @echo " CYTHON " $@;
150
151.pyx.c:
152 $(AM_V_CYTHON)$(CYTHON) -o $@ $<
153
154%.py: %.py.in Makefile
155 $(SED_PROCESS)
156
157# Remove some warnings for generated code
158PYTHON_NOWARN = -Wno-redundant-decls -Wno-shadow -Wno-strict-aliasing
159
Lucas De Marchi8eded792014-10-03 00:13:49 -0300160CPYTHON_MODULE_CFLAGS = \
161 $(AM_CFLAGS) -DCPYTHON_COMPILING_IN_PYPY=0 \
162 $(PYTHON_NOWARN) $(PYTHON_CFLAGS) \
163 -fvisibility=default
Lucas De Marchi3a33a7a2014-03-24 08:27:19 -0300164CPYTHON_MODULE_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared
165
166if BUILD_PYTHON
Lucas De Marchi8eded792014-10-03 00:13:49 -0300167pkgpyexec_LTLIBRARIES = \
168 libkmod/python/kmod/kmod.la \
169 libkmod/python/kmod/list.la \
170 libkmod/python/kmod/module.la \
171 libkmod/python/kmod/_util.la
Lucas De Marchi3a33a7a2014-03-24 08:27:19 -0300172
173libkmod_python_kmod_kmod_la_SOURCES = libkmod/python/kmod/kmod.c
174libkmod_python_kmod_kmod_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS)
175libkmod_python_kmod_kmod_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS)
176libkmod_python_kmod_kmod_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la
177
178libkmod_python_kmod_list_la_SOURCES = libkmod/python/kmod/list.c
179libkmod_python_kmod_list_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS)
180libkmod_python_kmod_list_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS)
181libkmod_python_kmod_list_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la
182
183libkmod_python_kmod_module_la_SOURCES = libkmod/python/kmod/module.c
184libkmod_python_kmod_module_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS)
185libkmod_python_kmod_module_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS)
186libkmod_python_kmod_module_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la
187
188libkmod_python_kmod__util_la_SOURCES = libkmod/python/kmod/_util.c
189libkmod_python_kmod__util_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS)
190libkmod_python_kmod__util_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS)
191libkmod_python_kmod__util_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la
192
Lucas De Marchi8eded792014-10-03 00:13:49 -0300193BUILT_FILES += \
194 $(libkmod_python_kmod_kmod_la_SOURCES) \
195 $(libkmod_python_kmod_list_la_SOURCES) \
196 $(libkmod_python_kmod_module_la_SOURCES) \
197 $(libkmod_python_kmod__util_la_SOURCES)
Lucas De Marchi3a33a7a2014-03-24 08:27:19 -0300198
Lucas De Marchi8eded792014-10-03 00:13:49 -0300199dist_pkgpyexec_PYTHON = \
200 libkmod/python/kmod/error.py \
201 libkmod/python/kmod/__init__.py \
202 libkmod/python/kmod/version.py
Lucas De Marchi3a33a7a2014-03-24 08:27:19 -0300203
204BUILT_FILES += libkmod/python/kmod/version.py
205
206endif
207# ------------------------------------------------------------------------------
Lucas De Marchi6afc9cd2012-01-25 02:44:45 -0200208# TESTSUITE
209# ------------------------------------------------------------------------------
210
Lucas De Marchie2ee7d92012-05-23 23:04:44 -0300211ROOTFS = testsuite/rootfs
Lucas De Marchi0de690c2012-05-24 01:31:36 -0300212ROOTFS_PRISTINE = $(top_srcdir)/testsuite/rootfs-pristine
Saul Wold518daf42013-10-09 23:49:48 -0700213CREATE_ROOTFS = $(AM_V_GEN) ( $(RM) -rf $(ROOTFS) && mkdir -p $(dir $(ROOTFS)) && \
Lucas De Marchi0de690c2012-05-24 01:31:36 -0300214 cp -r $(ROOTFS_PRISTINE) $(ROOTFS) && \
Lucas De Marchi33202e82012-06-19 13:09:23 -0300215 touch testsuite/stamp-rootfs && \
216 find $(ROOTFS) -type d -exec chmod +w {} \; )
Lucas De Marchie2ee7d92012-05-23 23:04:44 -0300217
Dave Reisner84afccb2012-09-08 11:50:56 -0400218rootfs:
Lucas De Marchi0de690c2012-05-24 01:31:36 -0300219 $(CREATE_ROOTFS)
Dave Reisner2588e3d2012-06-28 11:16:36 -0400220.PHONY: rootfs
Lucas De Marchi0de690c2012-05-24 01:31:36 -0300221
222$(ROOTFS): $(ROOTFS_PRISTINE)
223 $(CREATE_ROOTFS)
Lucas De Marchi452c1dd2012-05-11 00:04:59 -0300224
Lucas De Marchi8eded792014-10-03 00:13:49 -0300225TESTSUITE_OVERRIDE_LIBS = \
226 testsuite/uname.la testsuite/path.la \
227 testsuite/init_module.la \
228 testsuite/delete_module.la
229TESTSUITE_OVERRIDE_LIBS_LDFLAGS = \
230 avoid-version -module -shared -export-dynamic -rpath /nowhere -ldl
Lucas De Marchi68cc4492012-01-24 22:04:46 -0200231
Michal Marek9324bb52014-04-04 11:30:07 +0200232check-sysconfdir:
233 $(AM_V_at)if test "$(sysconfdir)" != "/etc" -a "$(sysconfdir)" != "/etc/"; then \
234 echo "warning: Some tests will fail without --sysconfdir=/etc" >&2; \
235 fi
236.PHONY: check-sysconfdir
237
238check-am: rootfs check-sysconfdir
239
Dave Reisner2588e3d2012-06-28 11:16:36 -0400240
Lucas De Marchid2c2b8b2012-01-26 12:18:23 -0200241check_LTLIBRARIES = $(TESTSUITE_OVERRIDE_LIBS)
Lucas De Marchi68cc4492012-01-24 22:04:46 -0200242
Lucas De Marchid2c2b8b2012-01-26 12:18:23 -0200243testsuite_uname_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
244testsuite_path_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
Lucas De Marchi6afc9cd2012-01-25 02:44:45 -0200245
Lucas De Marchif6ef5d62012-01-26 16:10:41 -0200246testsuite_delete_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
Lucas De Marchid2c2b8b2012-01-26 12:18:23 -0200247testsuite_init_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
248testsuite_init_module_la_SOURCES = testsuite/init_module.c \
Lucas De Marchid48b8a72012-01-29 16:09:59 -0200249 testsuite/stripped-module.h
Lucas De Marchi83b855a2013-07-04 16:13:11 -0300250testsuite_init_module_la_LIBADD = libkmod/libkmod-internal.la
Lucas De Marchi6afc9cd2012-01-25 02:44:45 -0200251
Lucas De Marchi6b88ef32012-01-25 15:13:45 -0200252TESTSUITE_CPPFLAGS = $(AM_CPPFLAGS) \
Lucas De Marchi8eded792014-10-03 00:13:49 -0300253 -DTESTSUITE_ROOTFS=\"$(abs_top_builddir)/$(ROOTFS)/\" \
254 -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"
255TESTSUITE_LDADD = \
256 testsuite/libtestsuite.la libkmod/libkmod-internal.la \
257 libkmod/libkmod-util.la
Lucas De Marchi6b88ef32012-01-25 15:13:45 -0200258
Lucas De Marchid2c2b8b2012-01-26 12:18:23 -0200259check_LTLIBRARIES += testsuite/libtestsuite.la
Lucas De Marchi8eded792014-10-03 00:13:49 -0300260testsuite_libtestsuite_la_SOURCES = \
261 testsuite/testsuite.c testsuite/testsuite.h
262testsuite_libtestsuite_la_DEPENDENCIES = \
263 $(ROOTFS) $(TESTSUITE_OVERRIDE_LIBS)
Lucas De Marchi6b88ef32012-01-25 15:13:45 -0200264testsuite_libtestsuite_la_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Lucas De Marchib8e344a2012-06-06 01:03:15 -0300265testsuite_libtestsuite_la_LIBADD = -lrt
Lucas De Marchi646b83b2012-01-09 04:20:55 -0200266
Lucas De Marchi8eded792014-10-03 00:13:49 -0300267TESTSUITE = \
268 testsuite/test-hash \
269 testsuite/test-init testsuite/test-testsuite testsuite/test-loaded \
270 testsuite/test-modinfo testsuite/test-util testsuite/test-new-module \
271 testsuite/test-modprobe testsuite/test-blacklist \
272 testsuite/test-dependencies testsuite/test-depmod
Lucas De Marchib0c9fc82012-10-04 01:08:13 -0300273
Lucas De Marchieebca812012-01-24 21:53:27 -0200274check_PROGRAMS = $(TESTSUITE)
275TESTS = $(TESTSUITE)
276
Lucas De Marchi8eded792014-10-03 00:13:49 -0300277testsuite_test_testsuite_LDADD = \
278 testsuite/libtestsuite.la libkmod/libkmod-util.la
Lucas De Marchi6b88ef32012-01-25 15:13:45 -0200279testsuite_test_testsuite_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Lucas De Marchi5963c362014-06-06 02:22:43 -0300280
281testsuite_test_hash_LDADD = $(TESTSUITE_LDADD)
282testsuite_test_hash_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
283
Dan McGeed35e8832012-02-03 20:29:09 -0600284testsuite_test_init_LDADD = $(TESTSUITE_LDADD)
285testsuite_test_init_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
286testsuite_test_loaded_LDADD = $(TESTSUITE_LDADD)
Lucas De Marchi61e94332012-01-25 18:16:45 -0200287testsuite_test_loaded_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Dan McGeed35e8832012-02-03 20:29:09 -0600288testsuite_test_modinfo_LDADD = $(TESTSUITE_LDADD)
Lucas De Marchi95daea02012-01-25 20:32:48 -0200289testsuite_test_modinfo_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Lucas De Marchi807c6012013-11-18 04:32:45 -0200290testsuite_test_util_LDADD = $(TESTSUITE_LDADD)
291testsuite_test_util_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Dan McGeed35e8832012-02-03 20:29:09 -0600292testsuite_test_new_module_LDADD = $(TESTSUITE_LDADD)
Lucas De Marchia9474302012-01-29 15:43:19 -0200293testsuite_test_new_module_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Lucas De Marchi976ea8c2012-02-08 01:40:00 -0200294testsuite_test_modprobe_LDADD = $(TESTSUITE_LDADD)
295testsuite_test_modprobe_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Dan McGeebcca1b92012-02-22 23:56:58 -0600296testsuite_test_blacklist_LDADD = $(TESTSUITE_LDADD)
297testsuite_test_blacklist_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Dan McGeec88aec72012-02-22 23:56:59 -0600298testsuite_test_dependencies_LDADD = $(TESTSUITE_LDADD)
299testsuite_test_dependencies_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Lucas De Marchib0c9fc82012-10-04 01:08:13 -0300300testsuite_test_depmod_LDADD = $(TESTSUITE_LDADD)
301testsuite_test_depmod_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
Lucas De Marchieebca812012-01-24 21:53:27 -0200302
Lucas De Marchi452c1dd2012-05-11 00:04:59 -0300303testsuite-distclean:
Dave Reisner86bbd052012-09-08 11:43:54 -0400304 $(RM) -r $(ROOTFS)
305 $(RM) testsuite/stamp-rootfs
Lucas De Marchi452c1dd2012-05-11 00:04:59 -0300306
307DISTCLEAN_LOCAL_HOOKS += testsuite-distclean
Lucas De Marchie2ee7d92012-05-23 23:04:44 -0300308EXTRA_DIST += testsuite/rootfs-pristine
Lucas De Marchi9c415962012-05-10 23:42:41 -0300309
Lucas De Marchi3a33a7a2014-03-24 08:27:19 -0300310DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-python --sysconfdir=/etc \
311 --with-zlib \
Lucas De Marchi80cf2c82013-07-30 03:47:19 -0300312 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir)
Lucas De Marchif4647b62012-01-16 00:42:28 -0200313
Lucas De Marchi6afc9cd2012-01-25 02:44:45 -0200314distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
Lucas De Marchif4647b62012-01-16 00:42:28 -0200315
Saul Wold16535ab2013-10-09 18:09:52 -0700316buildtest-TESTS:
317 $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS)
318
Lucas De Marchif4647b62012-01-16 00:42:28 -0200319# ------------------------------------------------------------------------------
320# custom release helpers
321# ------------------------------------------------------------------------------
322
323git-release:
324 head -1 NEWS | grep -q "kmod $(VERSION)"
325 git commit -a -m "kmod $(VERSION)"
326 git tag -m "kmod $(VERSION)" -s v$(VERSION)
327 git gc --prune=0
328
329kmod-$(VERSION).tar.xz:
330 make distcheck
331
332kmod-$(VERSION).tar.sign:
333 xz -d -c kmod-$(VERSION).tar.xz | gpg --armor --detach-sign --output kmod-$(VERSION).tar.sign
334
335tar: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign
336
337tar-sync: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign
Lucas De Marchibb05bc82012-02-24 01:58:20 -0200338 kup put kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign /pub/linux/utils/kernel/kmod/