Colin Walters | 8631552 | 2012-07-30 12:27:10 -0400 | [diff] [blame] | 1 | SUBDIRS = . libkmod/docs |
| 2 | |
| 3 | if BUILD_MANPAGES |
| 4 | SUBDIRS += man |
| 5 | endif |
Lucas De Marchi | 646b83b | 2012-01-09 04:20:55 -0200 | [diff] [blame] | 6 | |
Lucas De Marchi | 6afc9cd | 2012-01-25 02:44:45 -0200 | [diff] [blame] | 7 | DISTCLEAN_LOCAL_HOOKS = |
Lucas De Marchi | 85ece20 | 2011-12-02 17:53:54 -0200 | [diff] [blame] | 8 | EXTRA_DIST = |
Lucas De Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 9 | CLEANFILES = $(BUILT_FILES) |
| 10 | BUILT_FILES = |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 11 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} |
| 12 | AM_MAKEFLAGS = --no-print-directory |
| 13 | |
| 14 | AM_CPPFLAGS = \ |
| 15 | -include $(top_builddir)/config.h \ |
Lucas De Marchi | 586fc30 | 2011-11-21 14:35:35 -0200 | [diff] [blame] | 16 | -I$(top_srcdir)/libkmod \ |
Lucas De Marchi | 576dd43 | 2014-10-02 22:03:19 -0300 | [diff] [blame] | 17 | -I$(top_srcdir) \ |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 18 | -DSYSCONFDIR=\""$(sysconfdir)"\" \ |
Jan Engelhardt | 7b3a74f | 2011-12-24 04:45:22 +0100 | [diff] [blame] | 19 | -DLIBEXECDIR=\""$(libexecdir)"\" \ |
| 20 | ${zlib_CFLAGS} |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 21 | |
Lucas De Marchi | e48f376 | 2012-03-17 15:12:44 -0300 | [diff] [blame] | 22 | AM_CFLAGS = $(WARNINGFLAGS) |
| 23 | AM_LDFLAGS = $(GCLDFLAGS) |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 24 | |
Kay Sievers | 9faa7b3 | 2011-12-21 11:48:07 -0200 | [diff] [blame] | 25 | SED_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 Engelhardt | b182f8f | 2011-12-24 14:58:30 +0100 | [diff] [blame] | 32 | -e 's,@liblzma_CFLAGS\@,${liblzma_CFLAGS},g' \ |
| 33 | -e 's,@liblzma_LIBS\@,${liblzma_LIBS},g' \ |
Jan Engelhardt | 7b3a74f | 2011-12-24 04:45:22 +0100 | [diff] [blame] | 34 | -e 's,@zlib_CFLAGS\@,${zlib_CFLAGS},g' \ |
| 35 | -e 's,@zlib_LIBS\@,${zlib_LIBS},g' \ |
Kay Sievers | 9faa7b3 | 2011-12-21 11:48:07 -0200 | [diff] [blame] | 36 | < $< > $@ || rm $@ |
| 37 | |
| 38 | %.pc: %.pc.in Makefile |
| 39 | $(SED_PROCESS) |
| 40 | |
Lucas De Marchi | 4075860 | 2012-09-06 16:26:53 -0300 | [diff] [blame] | 41 | LIBKMOD_CURRENT=4 |
Lucas De Marchi | ae58de0 | 2014-06-14 12:46:38 -0300 | [diff] [blame] | 42 | LIBKMOD_REVISION=8 |
Lucas De Marchi | 4075860 | 2012-09-06 16:26:53 -0300 | [diff] [blame] | 43 | LIBKMOD_AGE=2 |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 44 | |
Lucas De Marchi | 529148e | 2011-12-27 12:26:51 -0200 | [diff] [blame] | 45 | noinst_LTLIBRARIES = libkmod/libkmod-util.la |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 46 | libkmod_libkmod_util_la_SOURCES = \ |
| 47 | shared/macro.h \ |
Lucas De Marchi | 74d1df6 | 2014-10-03 00:22:36 -0300 | [diff] [blame] | 48 | shared/missing.h \ |
| 49 | shared/array.c \ |
| 50 | shared/array.h \ |
Lucas De Marchi | 0db718e | 2014-10-03 00:29:18 -0300 | [diff] [blame^] | 51 | shared/hash.c \ |
| 52 | shared/hash.h \ |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 53 | shared/util.c \ |
| 54 | shared/util.h \ |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 55 | libkmod/libkmod-util.c \ |
| 56 | libkmod/libkmod-util.h |
Lucas De Marchi | 529148e | 2011-12-27 12:26:51 -0200 | [diff] [blame] | 57 | |
Lucas De Marchi | 586fc30 | 2011-11-21 14:35:35 -0200 | [diff] [blame] | 58 | include_HEADERS = libkmod/libkmod.h |
| 59 | lib_LTLIBRARIES = libkmod/libkmod.la |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 60 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 61 | libkmod_libkmod_la_SOURCES = \ |
Lucas De Marchi | 576dd43 | 2014-10-02 22:03:19 -0300 | [diff] [blame] | 62 | shared/macro.h \ |
Lucas De Marchi | 8b7189b | 2014-10-02 22:08:47 -0300 | [diff] [blame] | 63 | shared/missing.h \ |
Lucas De Marchi | 586fc30 | 2011-11-21 14:35:35 -0200 | [diff] [blame] | 64 | libkmod/libkmod.h \ |
Lucas De Marchi | 83b855a | 2013-07-04 16:13:11 -0300 | [diff] [blame] | 65 | libkmod/libkmod-internal.h \ |
Lucas De Marchi | 6924e47 | 2011-11-22 05:38:28 -0200 | [diff] [blame] | 66 | libkmod/libkmod.c \ |
Lucas De Marchi | 5369797 | 2011-11-22 05:42:09 -0200 | [diff] [blame] | 67 | libkmod/libkmod-list.c \ |
Lucas De Marchi | 7c2ab35 | 2011-11-29 18:07:43 -0200 | [diff] [blame] | 68 | libkmod/libkmod-config.c \ |
Lucas De Marchi | e8847fd | 2011-11-30 15:23:28 -0200 | [diff] [blame] | 69 | libkmod/libkmod-index.c \ |
| 70 | libkmod/libkmod-index.h \ |
Gustavo Sverzut Barbieri | 3d8226e | 2011-12-16 16:08:53 -0200 | [diff] [blame] | 71 | libkmod/libkmod-module.c \ |
Gustavo Sverzut Barbieri | 708624a | 2011-12-18 01:25:06 -0200 | [diff] [blame] | 72 | libkmod/libkmod-file.c \ |
Michal Marek | 8fe1681 | 2013-01-16 09:52:01 +0100 | [diff] [blame] | 73 | libkmod/libkmod-elf.c \ |
| 74 | libkmod/libkmod-signature.c |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 75 | |
Lucas De Marchi | 586fc30 | 2011-11-21 14:35:35 -0200 | [diff] [blame] | 76 | EXTRA_DIST += libkmod/libkmod.sym |
Lucas De Marchi | e1b1ab2 | 2012-07-10 09:42:24 -0300 | [diff] [blame] | 77 | EXTRA_DIST += libkmod/README libkmod/COPYING testsuite/COPYING COPYING |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 78 | |
Lucas De Marchi | 586fc30 | 2011-11-21 14:35:35 -0200 | [diff] [blame] | 79 | libkmod_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 Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 82 | libkmod_libkmod_la_DEPENDENCIES = \ |
| 83 | libkmod/libkmod-util.la \ |
| 84 | ${top_srcdir}/libkmod/libkmod.sym |
| 85 | libkmod_libkmod_la_LIBADD = \ |
| 86 | libkmod/libkmod-util.la \ |
| 87 | ${liblzma_LIBS} ${zlib_LIBS} |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 88 | |
Lucas De Marchi | 83b855a | 2013-07-04 16:13:11 -0300 | [diff] [blame] | 89 | noinst_LTLIBRARIES += libkmod/libkmod-internal.la |
| 90 | libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES) |
| 91 | libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) \ |
Lucas De Marchi | 39baaec | 2012-01-10 16:22:59 -0200 | [diff] [blame] | 92 | -Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym |
Lucas De Marchi | 83b855a | 2013-07-04 16:13:11 -0300 | [diff] [blame] | 93 | libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES) |
| 94 | libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD) |
Lucas De Marchi | 39baaec | 2012-01-10 16:22:59 -0200 | [diff] [blame] | 95 | |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 96 | pkgconfigdir = $(libdir)/pkgconfig |
Lucas De Marchi | 586fc30 | 2011-11-21 14:35:35 -0200 | [diff] [blame] | 97 | pkgconfig_DATA = libkmod/libkmod.pc |
Kay Sievers | 9faa7b3 | 2011-12-21 11:48:07 -0200 | [diff] [blame] | 98 | EXTRA_DIST += libkmod/libkmod.pc.in |
| 99 | CLEANFILES += libkmod/libkmod.pc |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 100 | |
Lucas De Marchi | 80cf2c8 | 2013-07-30 03:47:19 -0300 | [diff] [blame] | 101 | bashcompletiondir=@bashcompletiondir@ |
| 102 | dist_bashcompletion_DATA = \ |
| 103 | shell-completion/bash/kmod |
| 104 | |
Kay Sievers | e79bf83 | 2011-12-22 15:40:24 +0100 | [diff] [blame] | 105 | install-exec-hook: |
| 106 | if test "$(libdir)" != "$(rootlibdir)"; then \ |
Lucas De Marchi | 6a4fa8d | 2011-12-23 01:59:31 -0200 | [diff] [blame] | 107 | $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \ |
Kay Sievers | e79bf83 | 2011-12-22 15:40:24 +0100 | [diff] [blame] | 108 | 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 | |
| 114 | uninstall-hook: |
| 115 | rm -f $(DESTDIR)$(rootlibdir)/libkmod.so* |
| 116 | |
Gustavo Sverzut Barbieri | 72c51a9 | 2011-12-10 22:19:41 -0200 | [diff] [blame] | 117 | if BUILD_TOOLS |
Lucas De Marchi | 8d75053 | 2012-01-04 08:58:19 -0200 | [diff] [blame] | 118 | bin_PROGRAMS = tools/kmod |
| 119 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 120 | noinst_SCRIPTS = \ |
| 121 | tools/insmod tools/rmmod tools/lsmod \ |
| 122 | tools/modprobe tools/modinfo tools/depmod |
Lucas De Marchi | 8900b91 | 2011-12-22 02:33:36 -0200 | [diff] [blame] | 123 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 124 | tools_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 |
| 130 | tools_kmod_LDADD = \ |
| 131 | libkmod/libkmod-util.la \ |
| 132 | libkmod/libkmod-internal.la |
Lucas De Marchi | 00fc926 | 2012-01-10 11:15:19 -0200 | [diff] [blame] | 133 | |
Lucas De Marchi | b6adccd | 2013-07-04 16:01:55 -0300 | [diff] [blame] | 134 | ${noinst_SCRIPTS}: tools/kmod |
Lucas De Marchi | 00fc926 | 2012-01-10 11:15:19 -0200 | [diff] [blame] | 135 | $(AM_V_GEN) ($(RM) $@; \ |
| 136 | $(LN_S) $(notdir $<) $@) |
Gustavo Sverzut Barbieri | 72c51a9 | 2011-12-10 22:19:41 -0200 | [diff] [blame] | 137 | endif |
| 138 | |
Lucas De Marchi | 6afc9cd | 2012-01-25 02:44:45 -0200 | [diff] [blame] | 139 | # ------------------------------------------------------------------------------ |
Lucas De Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 140 | # PYTHON BINDINGS |
| 141 | # ------------------------------------------------------------------------------ |
| 142 | |
| 143 | CYTHON_FLAGS_VERBOSE_ = |
| 144 | CYTHON_FLAGS_VERBOSE_0 = |
| 145 | CYTHON_FLAGS_VERBOSE_1 = -v |
| 146 | CYTHON_FLAGS = $(CYTHON_FLAGS_VERBOSE_$(V)) |
| 147 | AM_V_CYTHON = $(am__v_CYTHON_$(V)) |
| 148 | am__v_CYTHON_ = $(am__v_CYTHON_$(AM_DEFAULT_VERBOSITY)) |
| 149 | am__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 |
| 158 | PYTHON_NOWARN = -Wno-redundant-decls -Wno-shadow -Wno-strict-aliasing |
| 159 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 160 | CPYTHON_MODULE_CFLAGS = \ |
| 161 | $(AM_CFLAGS) -DCPYTHON_COMPILING_IN_PYPY=0 \ |
| 162 | $(PYTHON_NOWARN) $(PYTHON_CFLAGS) \ |
| 163 | -fvisibility=default |
Lucas De Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 164 | CPYTHON_MODULE_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared |
| 165 | |
| 166 | if BUILD_PYTHON |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 167 | pkgpyexec_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 Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 172 | |
| 173 | libkmod_python_kmod_kmod_la_SOURCES = libkmod/python/kmod/kmod.c |
| 174 | libkmod_python_kmod_kmod_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS) |
| 175 | libkmod_python_kmod_kmod_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS) |
| 176 | libkmod_python_kmod_kmod_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la |
| 177 | |
| 178 | libkmod_python_kmod_list_la_SOURCES = libkmod/python/kmod/list.c |
| 179 | libkmod_python_kmod_list_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS) |
| 180 | libkmod_python_kmod_list_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS) |
| 181 | libkmod_python_kmod_list_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la |
| 182 | |
| 183 | libkmod_python_kmod_module_la_SOURCES = libkmod/python/kmod/module.c |
| 184 | libkmod_python_kmod_module_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS) |
| 185 | libkmod_python_kmod_module_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS) |
| 186 | libkmod_python_kmod_module_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la |
| 187 | |
| 188 | libkmod_python_kmod__util_la_SOURCES = libkmod/python/kmod/_util.c |
| 189 | libkmod_python_kmod__util_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS) |
| 190 | libkmod_python_kmod__util_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS) |
| 191 | libkmod_python_kmod__util_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la |
| 192 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 193 | BUILT_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 Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 198 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 199 | dist_pkgpyexec_PYTHON = \ |
| 200 | libkmod/python/kmod/error.py \ |
| 201 | libkmod/python/kmod/__init__.py \ |
| 202 | libkmod/python/kmod/version.py |
Lucas De Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 203 | |
| 204 | BUILT_FILES += libkmod/python/kmod/version.py |
| 205 | |
| 206 | endif |
| 207 | # ------------------------------------------------------------------------------ |
Lucas De Marchi | 6afc9cd | 2012-01-25 02:44:45 -0200 | [diff] [blame] | 208 | # TESTSUITE |
| 209 | # ------------------------------------------------------------------------------ |
| 210 | |
Lucas De Marchi | e2ee7d9 | 2012-05-23 23:04:44 -0300 | [diff] [blame] | 211 | ROOTFS = testsuite/rootfs |
Lucas De Marchi | 0de690c | 2012-05-24 01:31:36 -0300 | [diff] [blame] | 212 | ROOTFS_PRISTINE = $(top_srcdir)/testsuite/rootfs-pristine |
Saul Wold | 518daf4 | 2013-10-09 23:49:48 -0700 | [diff] [blame] | 213 | CREATE_ROOTFS = $(AM_V_GEN) ( $(RM) -rf $(ROOTFS) && mkdir -p $(dir $(ROOTFS)) && \ |
Lucas De Marchi | 0de690c | 2012-05-24 01:31:36 -0300 | [diff] [blame] | 214 | cp -r $(ROOTFS_PRISTINE) $(ROOTFS) && \ |
Lucas De Marchi | 33202e8 | 2012-06-19 13:09:23 -0300 | [diff] [blame] | 215 | touch testsuite/stamp-rootfs && \ |
| 216 | find $(ROOTFS) -type d -exec chmod +w {} \; ) |
Lucas De Marchi | e2ee7d9 | 2012-05-23 23:04:44 -0300 | [diff] [blame] | 217 | |
Dave Reisner | 84afccb | 2012-09-08 11:50:56 -0400 | [diff] [blame] | 218 | rootfs: |
Lucas De Marchi | 0de690c | 2012-05-24 01:31:36 -0300 | [diff] [blame] | 219 | $(CREATE_ROOTFS) |
Dave Reisner | 2588e3d | 2012-06-28 11:16:36 -0400 | [diff] [blame] | 220 | .PHONY: rootfs |
Lucas De Marchi | 0de690c | 2012-05-24 01:31:36 -0300 | [diff] [blame] | 221 | |
| 222 | $(ROOTFS): $(ROOTFS_PRISTINE) |
| 223 | $(CREATE_ROOTFS) |
Lucas De Marchi | 452c1dd | 2012-05-11 00:04:59 -0300 | [diff] [blame] | 224 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 225 | TESTSUITE_OVERRIDE_LIBS = \ |
| 226 | testsuite/uname.la testsuite/path.la \ |
| 227 | testsuite/init_module.la \ |
| 228 | testsuite/delete_module.la |
| 229 | TESTSUITE_OVERRIDE_LIBS_LDFLAGS = \ |
| 230 | avoid-version -module -shared -export-dynamic -rpath /nowhere -ldl |
Lucas De Marchi | 68cc449 | 2012-01-24 22:04:46 -0200 | [diff] [blame] | 231 | |
Michal Marek | 9324bb5 | 2014-04-04 11:30:07 +0200 | [diff] [blame] | 232 | check-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 | |
| 238 | check-am: rootfs check-sysconfdir |
| 239 | |
Dave Reisner | 2588e3d | 2012-06-28 11:16:36 -0400 | [diff] [blame] | 240 | |
Lucas De Marchi | d2c2b8b | 2012-01-26 12:18:23 -0200 | [diff] [blame] | 241 | check_LTLIBRARIES = $(TESTSUITE_OVERRIDE_LIBS) |
Lucas De Marchi | 68cc449 | 2012-01-24 22:04:46 -0200 | [diff] [blame] | 242 | |
Lucas De Marchi | d2c2b8b | 2012-01-26 12:18:23 -0200 | [diff] [blame] | 243 | testsuite_uname_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS) |
| 244 | testsuite_path_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS) |
Lucas De Marchi | 6afc9cd | 2012-01-25 02:44:45 -0200 | [diff] [blame] | 245 | |
Lucas De Marchi | f6ef5d6 | 2012-01-26 16:10:41 -0200 | [diff] [blame] | 246 | testsuite_delete_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS) |
Lucas De Marchi | d2c2b8b | 2012-01-26 12:18:23 -0200 | [diff] [blame] | 247 | testsuite_init_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS) |
| 248 | testsuite_init_module_la_SOURCES = testsuite/init_module.c \ |
Lucas De Marchi | d48b8a7 | 2012-01-29 16:09:59 -0200 | [diff] [blame] | 249 | testsuite/stripped-module.h |
Lucas De Marchi | 83b855a | 2013-07-04 16:13:11 -0300 | [diff] [blame] | 250 | testsuite_init_module_la_LIBADD = libkmod/libkmod-internal.la |
Lucas De Marchi | 6afc9cd | 2012-01-25 02:44:45 -0200 | [diff] [blame] | 251 | |
Lucas De Marchi | 6b88ef3 | 2012-01-25 15:13:45 -0200 | [diff] [blame] | 252 | TESTSUITE_CPPFLAGS = $(AM_CPPFLAGS) \ |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 253 | -DTESTSUITE_ROOTFS=\"$(abs_top_builddir)/$(ROOTFS)/\" \ |
| 254 | -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\" |
| 255 | TESTSUITE_LDADD = \ |
| 256 | testsuite/libtestsuite.la libkmod/libkmod-internal.la \ |
| 257 | libkmod/libkmod-util.la |
Lucas De Marchi | 6b88ef3 | 2012-01-25 15:13:45 -0200 | [diff] [blame] | 258 | |
Lucas De Marchi | d2c2b8b | 2012-01-26 12:18:23 -0200 | [diff] [blame] | 259 | check_LTLIBRARIES += testsuite/libtestsuite.la |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 260 | testsuite_libtestsuite_la_SOURCES = \ |
| 261 | testsuite/testsuite.c testsuite/testsuite.h |
| 262 | testsuite_libtestsuite_la_DEPENDENCIES = \ |
| 263 | $(ROOTFS) $(TESTSUITE_OVERRIDE_LIBS) |
Lucas De Marchi | 6b88ef3 | 2012-01-25 15:13:45 -0200 | [diff] [blame] | 264 | testsuite_libtestsuite_la_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Lucas De Marchi | b8e344a | 2012-06-06 01:03:15 -0300 | [diff] [blame] | 265 | testsuite_libtestsuite_la_LIBADD = -lrt |
Lucas De Marchi | 646b83b | 2012-01-09 04:20:55 -0200 | [diff] [blame] | 266 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 267 | TESTSUITE = \ |
| 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 Marchi | b0c9fc8 | 2012-10-04 01:08:13 -0300 | [diff] [blame] | 273 | |
Lucas De Marchi | eebca81 | 2012-01-24 21:53:27 -0200 | [diff] [blame] | 274 | check_PROGRAMS = $(TESTSUITE) |
| 275 | TESTS = $(TESTSUITE) |
| 276 | |
Lucas De Marchi | 8eded79 | 2014-10-03 00:13:49 -0300 | [diff] [blame] | 277 | testsuite_test_testsuite_LDADD = \ |
| 278 | testsuite/libtestsuite.la libkmod/libkmod-util.la |
Lucas De Marchi | 6b88ef3 | 2012-01-25 15:13:45 -0200 | [diff] [blame] | 279 | testsuite_test_testsuite_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Lucas De Marchi | 5963c36 | 2014-06-06 02:22:43 -0300 | [diff] [blame] | 280 | |
| 281 | testsuite_test_hash_LDADD = $(TESTSUITE_LDADD) |
| 282 | testsuite_test_hash_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
| 283 | |
Dan McGee | d35e883 | 2012-02-03 20:29:09 -0600 | [diff] [blame] | 284 | testsuite_test_init_LDADD = $(TESTSUITE_LDADD) |
| 285 | testsuite_test_init_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
| 286 | testsuite_test_loaded_LDADD = $(TESTSUITE_LDADD) |
Lucas De Marchi | 61e9433 | 2012-01-25 18:16:45 -0200 | [diff] [blame] | 287 | testsuite_test_loaded_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Dan McGee | d35e883 | 2012-02-03 20:29:09 -0600 | [diff] [blame] | 288 | testsuite_test_modinfo_LDADD = $(TESTSUITE_LDADD) |
Lucas De Marchi | 95daea0 | 2012-01-25 20:32:48 -0200 | [diff] [blame] | 289 | testsuite_test_modinfo_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Lucas De Marchi | 807c601 | 2013-11-18 04:32:45 -0200 | [diff] [blame] | 290 | testsuite_test_util_LDADD = $(TESTSUITE_LDADD) |
| 291 | testsuite_test_util_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Dan McGee | d35e883 | 2012-02-03 20:29:09 -0600 | [diff] [blame] | 292 | testsuite_test_new_module_LDADD = $(TESTSUITE_LDADD) |
Lucas De Marchi | a947430 | 2012-01-29 15:43:19 -0200 | [diff] [blame] | 293 | testsuite_test_new_module_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Lucas De Marchi | 976ea8c | 2012-02-08 01:40:00 -0200 | [diff] [blame] | 294 | testsuite_test_modprobe_LDADD = $(TESTSUITE_LDADD) |
| 295 | testsuite_test_modprobe_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Dan McGee | bcca1b9 | 2012-02-22 23:56:58 -0600 | [diff] [blame] | 296 | testsuite_test_blacklist_LDADD = $(TESTSUITE_LDADD) |
| 297 | testsuite_test_blacklist_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Dan McGee | c88aec7 | 2012-02-22 23:56:59 -0600 | [diff] [blame] | 298 | testsuite_test_dependencies_LDADD = $(TESTSUITE_LDADD) |
| 299 | testsuite_test_dependencies_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Lucas De Marchi | b0c9fc8 | 2012-10-04 01:08:13 -0300 | [diff] [blame] | 300 | testsuite_test_depmod_LDADD = $(TESTSUITE_LDADD) |
| 301 | testsuite_test_depmod_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
Lucas De Marchi | eebca81 | 2012-01-24 21:53:27 -0200 | [diff] [blame] | 302 | |
Lucas De Marchi | 452c1dd | 2012-05-11 00:04:59 -0300 | [diff] [blame] | 303 | testsuite-distclean: |
Dave Reisner | 86bbd05 | 2012-09-08 11:43:54 -0400 | [diff] [blame] | 304 | $(RM) -r $(ROOTFS) |
| 305 | $(RM) testsuite/stamp-rootfs |
Lucas De Marchi | 452c1dd | 2012-05-11 00:04:59 -0300 | [diff] [blame] | 306 | |
| 307 | DISTCLEAN_LOCAL_HOOKS += testsuite-distclean |
Lucas De Marchi | e2ee7d9 | 2012-05-23 23:04:44 -0300 | [diff] [blame] | 308 | EXTRA_DIST += testsuite/rootfs-pristine |
Lucas De Marchi | 9c41596 | 2012-05-10 23:42:41 -0300 | [diff] [blame] | 309 | |
Lucas De Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 310 | DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-python --sysconfdir=/etc \ |
| 311 | --with-zlib \ |
Lucas De Marchi | 80cf2c8 | 2013-07-30 03:47:19 -0300 | [diff] [blame] | 312 | --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) |
Lucas De Marchi | f4647b6 | 2012-01-16 00:42:28 -0200 | [diff] [blame] | 313 | |
Lucas De Marchi | 6afc9cd | 2012-01-25 02:44:45 -0200 | [diff] [blame] | 314 | distclean-local: $(DISTCLEAN_LOCAL_HOOKS) |
Lucas De Marchi | f4647b6 | 2012-01-16 00:42:28 -0200 | [diff] [blame] | 315 | |
Saul Wold | 16535ab | 2013-10-09 18:09:52 -0700 | [diff] [blame] | 316 | buildtest-TESTS: |
| 317 | $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS) |
| 318 | |
Lucas De Marchi | f4647b6 | 2012-01-16 00:42:28 -0200 | [diff] [blame] | 319 | # ------------------------------------------------------------------------------ |
| 320 | # custom release helpers |
| 321 | # ------------------------------------------------------------------------------ |
| 322 | |
| 323 | git-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 | |
| 329 | kmod-$(VERSION).tar.xz: |
| 330 | make distcheck |
| 331 | |
| 332 | kmod-$(VERSION).tar.sign: |
| 333 | xz -d -c kmod-$(VERSION).tar.xz | gpg --armor --detach-sign --output kmod-$(VERSION).tar.sign |
| 334 | |
| 335 | tar: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign |
| 336 | |
| 337 | tar-sync: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign |
Lucas De Marchi | bb05bc8 | 2012-02-24 01:58:20 -0200 | [diff] [blame] | 338 | kup put kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign /pub/linux/utils/kernel/kmod/ |