2013-12-22 04:41:30 +04:00
# Copyright (C) 2013 Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
2020-12-21 17:15:28 +03:00
noinst_LTLIBRARIES += librpmostreeinternals.la
librpmostreeinternals_la_SOURCES = \
src/app/libmain.cxx \
2015-04-07 03:18:50 +03:00
src/app/rpmostree-builtins.h \
src/app/rpmostree-db-builtins.h \
src/app/rpmostree-compose-builtins.h \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-upgrade.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-rollback.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-deploy.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-reload.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-rebase.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-cancel.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-cleanup.cxx \
2020-10-13 18:46:00 +03:00
src/app/rpmostree-builtin-cliwrap.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-initramfs.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-initramfs-etc.cxx \
2021-02-13 00:06:13 +03:00
src/app/rpmostree-builtin-applylive.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-usroverlay.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-override.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-refresh-md.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-reset.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-pkg-builtins.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-status.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-ex.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-testutils.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-shlib-backend.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-db.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-start-daemon.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-finalize-deployment.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-db-builtin-diff.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-db-builtin-list.cxx \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-db-builtin-version.cxx \
2021-02-27 22:21:15 +03:00
src/app/rpmostree-clientlib.cxx \
src/app/rpmostree-clientlib.h \
2017-06-05 19:37:56 +03:00
src/app/rpmostree-override-builtins.h \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-override-builtins.cxx \
2020-12-19 21:14:18 +03:00
src/app/rpmostree-libbuiltin.cxx \
2015-04-19 16:36:53 +03:00
src/app/rpmostree-libbuiltin.h \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-polkit-agent.cxx \
2017-07-25 19:59:56 +03:00
src/app/rpmostree-polkit-agent.h \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-kargs.cxx \
2020-11-22 22:55:06 +03:00
src/app/rpmostree-compose-builtin-tree.cxx \
2020-12-19 00:42:28 +03:00
src/app/rpmostree-composeutil.cxx \
2018-09-19 16:48:04 +03:00
src/app/rpmostree-composeutil.h \
2020-12-21 19:08:51 +03:00
src/app/rpmostree-builtin-compose.cxx \
2020-12-17 01:17:49 +03:00
$(librpmostreed_sources) \
2020-12-17 01:04:40 +03:00
$(librpmostreepriv_sources) \
2021-02-09 04:00:33 +03:00
$(librpmostree_1_la_SOURCES) \
2014-01-29 23:37:44 +04:00
$(NULL)
2014-09-17 05:45:30 +04:00
2020-10-22 20:33:45 +03:00
if BUILDOPT_ROJIG
2020-12-21 17:15:28 +03:00
librpmostreeinternals_la_SOURCES += \
2020-12-19 18:29:13 +03:00
src/app/rpmostree-ex-builtin-commit2rojig.cxx \
2020-12-19 18:48:44 +03:00
src/app/rpmostree-ex-builtin-rojig2commit.cxx \
2020-12-19 19:03:32 +03:00
src/app/rpmostree-compose-builtin-rojig.cxx \
2020-10-22 20:33:45 +03:00
$(NULL)
endif
2020-12-21 17:15:28 +03:00
nodist_librpmostreeinternals_la_SOURCES = $(dbus_built_sources) $(nodist_librpmostreepriv_sources)
2020-12-17 01:17:49 +03:00
2020-11-22 22:55:06 +03:00
rpmostree_common_cflags = -I$(srcdir)/src/app -I$(srcdir)/src/daemon \
2016-05-27 21:46:46 +03:00
-I$(srcdir)/src/lib -I$(srcdir)/src/libpriv -I$(libglnx_srcpath) \
2020-12-17 01:17:49 +03:00
-DG_LOG_DOMAIN=\"rpm-ostreed\" \
-DLIBDIR=\"$(libdir)\" -DPKGLIBDIR=\"$(pkglibdir)\" \
2021-01-29 22:47:48 +03:00
-I $(top_srcdir)/libdnf \
2021-02-09 04:00:33 +03:00
-D_RPMOSTREE_EXTERN= \
2021-01-30 00:56:02 +03:00
$(PKGDEP_LIBRPMOSTREE_CFLAGS) $(PKGDEP_RPMOSTREE_CFLAGS)
2020-12-21 17:15:28 +03:00
rpmostree_bin_common_cflags = $(rpmostree_common_cflags)
2021-02-09 04:00:33 +03:00
rpmostree_common_libs = libglnx.la librpmostreecxxrs.la
2021-01-27 21:57:44 +03:00
2021-01-26 14:34:59 +03:00
rpmostree_bin_common_libs = librpmostreeinternals.la $(rpmostree_common_libs)
2020-12-21 17:15:28 +03:00
librpmostreeinternals_la_CFLAGS = $(AM_CFLAGS) $(rpmostree_common_cflags)
Add --enable-sanitizers (not on by default yet)
This way we at least get unit test coverage (which...
our unit test coverage doesn't do much because our
main code paths require privileges or virt).
One main blocker to this is that rustc doesn't expose
first-class support for this yet:
https://github.com/rust-lang/rust/issues/39699
At a practical level this works when building in release
mode but fails with `cargo test` for some reason; linker
arguments being pruned? Not sure.
So I was able to use this when composing to find a bug,
but then for some other reason the client
side apparently infinite loops inside libsolv.
So we're not enabling this yet for those reasons, but
let's land the build infrastructure now.
```
(lldb) thread backtrace
* thread #4, name = 'pool-/usr/bin/r'
* frame #0: 0x00007fd61b97200f libc.so.6`__memcpy_sse2_unaligned_erms + 623
frame #1: 0x00007fd61cbc88e6 libasan.so.6`__asan::asan_realloc(void*, unsigned long, __sanitizer::BufferedStackTrace*) + 214
frame #2: 0x00007fd61cc4b725 libasan.so.6`__interceptor_realloc + 245
frame #3: 0x00007fd61baec43e libsolv.so.1`solv_realloc + 30
frame #4: 0x00007fd61baf0414 libsolv.so.1`repodata_add_dirstr + 276
frame #5: 0x00007fd61bb6f755 libsolvext.so.1`end_element + 53
frame #6: 0x00007fd61b05855d libxml2.so.2`xmlParseEndTag1.constprop.0 + 317
frame #7: 0x00007fd61b063548 libxml2.so.2`xmlParseTryOrFinish.isra.0 + 888
frame #8: 0x00007fd61af7ed20 libxml2.so.2`xmlParseChunk + 560
frame #9: 0x00007fd61bb727e7 libsolvext.so.1`solv_xmlparser_parse + 183
frame #10: 0x00007fd61bb5ea0e libsolvext.so.1`repo_add_rpmmd + 254
frame #11: 0x000055a4fce7a5f5 rpm-ostree`::load_filelists_cb(repo=<unavailable>, fp=<unavailable>) at dnf-sack.cpp:444:23
frame #12: 0x000055a4fce7cad6 rpm-ostree`load_ext(_DnfSack*, libdnf::Repo*, _hy_repo_repodata, char const*, char const*, int (*)(s_Repo*, _IO_FILE*), _GError**) at dnf-sack.cpp:430:13
frame #13: 0x000055a4fce7df60 rpm-ostree`dnf_sack_load_repo at dnf-sack.cpp:1789:26
frame #14: 0x000055a4fce7eee9 rpm-ostree`dnf_sack_add_repo at dnf-sack.cpp:2217:28
frame #15: 0x000055a4fce7f0fb rpm-ostree`dnf_sack_add_repos at dnf-sack.cpp:2271:32
frame #16: 0x000055a4fce870ee rpm-ostree`dnf_context_setup_sack_with_flags at dnf-context.cpp:1796:29
frame #17: 0x000055a4fcdf757f rpm-ostree`rpmostree_context_download_metadata at rpmostree-core.cxx:1206:44
frame #18: 0x000055a4fcdf95c3 rpm-ostree`rpmostree_context_prepare at rpmostree-core.cxx:2001:48
frame #19: 0x000055a4fce54ab7 rpm-ostree`rpmostree_sysroot_upgrader_prep_layering at rpmostree-sysroot-upgrader.cxx:1018:38
frame #20: 0x000055a4fcdcb143 rpm-ostree`deploy_transaction_execute(_RpmostreedTransaction*, _GCancellable*, _GError**) at rpmostreed-transaction-types.cxx:1445:49
frame #21: 0x000055a4fcdba4cd rpm-ostree`transaction_execute_thread(_GTask*, void*, void*, _GCancellable*) at rpmostreed-transaction.cxx:340:34
frame #22: 0x00007fd61c58f7e2 libgio-2.0.so.0`g_task_thread_pool_thread + 114
frame #23: 0x00007fd61c3d7e54 libglib-2.0.so.0`g_thread_pool_thread_proxy.lto_priv.0 + 116
frame #24: 0x00007fd61c3d52b2 libglib-2.0.so.0`g_thread_proxy + 82
frame #25: 0x00007fd61b8af3f9 libpthread.so.0`start_thread + 233
frame #26: 0x00007fd61b9c9903 libc.so.6`__clone + 67
(lldb)
```
2021-02-03 00:54:38 +03:00
# Note for now we only inject the sanitizer flags into our static library,
# because doing ASAN for a shared library is trickier.
librpmostreeinternals_la_CXXFLAGS = $(AM_CXXFLAGS) $(sanitizer_flags) $(rpmostree_common_cflags)
2021-01-23 18:32:05 +03:00
librpmostreeinternals_la_LIBADD = $(rpmostree_common_libs)
2014-01-16 16:26:54 +04:00
2013-12-22 04:41:30 +04:00
privdatadir=$(pkglibdir)
2016-06-15 23:30:11 +03:00
privdata_DATA = src/app/rpm-ostree-0-integration.conf
2016-10-19 21:24:40 +03:00
2018-09-26 17:23:48 +03:00
# Propagate automake verbose mode
cargo_build = $(cargo) build $(if $(subst 0,,$(V)),--verbose,)
2021-01-11 21:25:51 +03:00
if BUILDOPT_PREBUILT_BINDINGS
cargo_build += "--offline"
endif
2018-09-26 17:23:48 +03:00
2020-12-22 01:27:52 +03:00
if BUILDOPT_ENABLE_SQLITE_RPMDB_DEFAULT
cargo_build += --features sqlite-rpmdb-default
endif
Add --enable-sanitizers (not on by default yet)
This way we at least get unit test coverage (which...
our unit test coverage doesn't do much because our
main code paths require privileges or virt).
One main blocker to this is that rustc doesn't expose
first-class support for this yet:
https://github.com/rust-lang/rust/issues/39699
At a practical level this works when building in release
mode but fails with `cargo test` for some reason; linker
arguments being pruned? Not sure.
So I was able to use this when composing to find a bug,
but then for some other reason the client
side apparently infinite loops inside libsolv.
So we're not enabling this yet for those reasons, but
let's land the build infrastructure now.
```
(lldb) thread backtrace
* thread #4, name = 'pool-/usr/bin/r'
* frame #0: 0x00007fd61b97200f libc.so.6`__memcpy_sse2_unaligned_erms + 623
frame #1: 0x00007fd61cbc88e6 libasan.so.6`__asan::asan_realloc(void*, unsigned long, __sanitizer::BufferedStackTrace*) + 214
frame #2: 0x00007fd61cc4b725 libasan.so.6`__interceptor_realloc + 245
frame #3: 0x00007fd61baec43e libsolv.so.1`solv_realloc + 30
frame #4: 0x00007fd61baf0414 libsolv.so.1`repodata_add_dirstr + 276
frame #5: 0x00007fd61bb6f755 libsolvext.so.1`end_element + 53
frame #6: 0x00007fd61b05855d libxml2.so.2`xmlParseEndTag1.constprop.0 + 317
frame #7: 0x00007fd61b063548 libxml2.so.2`xmlParseTryOrFinish.isra.0 + 888
frame #8: 0x00007fd61af7ed20 libxml2.so.2`xmlParseChunk + 560
frame #9: 0x00007fd61bb727e7 libsolvext.so.1`solv_xmlparser_parse + 183
frame #10: 0x00007fd61bb5ea0e libsolvext.so.1`repo_add_rpmmd + 254
frame #11: 0x000055a4fce7a5f5 rpm-ostree`::load_filelists_cb(repo=<unavailable>, fp=<unavailable>) at dnf-sack.cpp:444:23
frame #12: 0x000055a4fce7cad6 rpm-ostree`load_ext(_DnfSack*, libdnf::Repo*, _hy_repo_repodata, char const*, char const*, int (*)(s_Repo*, _IO_FILE*), _GError**) at dnf-sack.cpp:430:13
frame #13: 0x000055a4fce7df60 rpm-ostree`dnf_sack_load_repo at dnf-sack.cpp:1789:26
frame #14: 0x000055a4fce7eee9 rpm-ostree`dnf_sack_add_repo at dnf-sack.cpp:2217:28
frame #15: 0x000055a4fce7f0fb rpm-ostree`dnf_sack_add_repos at dnf-sack.cpp:2271:32
frame #16: 0x000055a4fce870ee rpm-ostree`dnf_context_setup_sack_with_flags at dnf-context.cpp:1796:29
frame #17: 0x000055a4fcdf757f rpm-ostree`rpmostree_context_download_metadata at rpmostree-core.cxx:1206:44
frame #18: 0x000055a4fcdf95c3 rpm-ostree`rpmostree_context_prepare at rpmostree-core.cxx:2001:48
frame #19: 0x000055a4fce54ab7 rpm-ostree`rpmostree_sysroot_upgrader_prep_layering at rpmostree-sysroot-upgrader.cxx:1018:38
frame #20: 0x000055a4fcdcb143 rpm-ostree`deploy_transaction_execute(_RpmostreedTransaction*, _GCancellable*, _GError**) at rpmostreed-transaction-types.cxx:1445:49
frame #21: 0x000055a4fcdba4cd rpm-ostree`transaction_execute_thread(_GTask*, void*, void*, _GCancellable*) at rpmostreed-transaction.cxx:340:34
frame #22: 0x00007fd61c58f7e2 libgio-2.0.so.0`g_task_thread_pool_thread + 114
frame #23: 0x00007fd61c3d7e54 libglib-2.0.so.0`g_thread_pool_thread_proxy.lto_priv.0 + 116
frame #24: 0x00007fd61c3d52b2 libglib-2.0.so.0`g_thread_proxy + 82
frame #25: 0x00007fd61b8af3f9 libpthread.so.0`start_thread + 233
frame #26: 0x00007fd61b9c9903 libc.so.6`__clone + 67
(lldb)
```
2021-02-03 00:54:38 +03:00
if BUILDOPT_ASAN
cargo_build += --features sanitizers
endif
2020-12-22 01:27:52 +03:00
2021-01-26 14:34:59 +03:00
if RUST_DEBUG
2021-02-04 23:08:50 +03:00
cargo_target_dir=debug
2021-01-26 14:34:59 +03:00
else
2021-02-04 23:08:50 +03:00
cargo_target_dir=release
2021-01-26 14:34:59 +03:00
endif
2021-01-23 18:32:05 +03:00
# FIXME - build all this code in a rpmostree-sys crate, or just move all the C/C++ build
# to Rust. Currently this forces build system serialization
2021-02-12 22:10:44 +03:00
cargo-build: librpmostreeinternals.la
2020-12-08 21:29:05 +03:00
$(cargo_build) $(CARGO_RELEASE_ARGS)
2021-02-12 22:10:44 +03:00
ln -sfr target/$(cargo_target_dir)/rpm-ostree rpm-ostree
2021-01-26 14:34:59 +03:00
CLEANFILES += rpm-ostree
2021-02-12 22:10:44 +03:00
.PHONY: cargo-build
ALL_LOCAL_HOOKS += cargo-build
2018-05-31 23:31:22 +03:00
2021-03-03 04:12:00 +03:00
# cxx.rs
binding_generated_sources = rpmostree-cxxrs.h rpmostree-cxxrs.cxx rust/cxx.h
2020-12-11 18:09:57 +03:00
if BUILDOPT_PREBUILT_BINDINGS
2020-12-31 19:55:19 +03:00
# In this case we shipped prebuilt versions in the source tarball
rpmostree-cxxrs.h:
ln -sfr rpmostree-cxxrs-prebuilt.h $@
rpmostree-cxxrs.cxx:
ln -sfr rpmostree-cxxrs-prebuilt.cxx $@
2021-01-27 04:35:37 +03:00
rust/cxx.h:
ln -sfr rust/cxx-prebuilt.h $@
2020-12-11 18:09:57 +03:00
else
2020-12-31 19:55:19 +03:00
include Makefile.bindings
2020-12-11 18:09:57 +03:00
endif
2020-12-22 17:56:15 +03:00
noinst_LTLIBRARIES += librpmostreecxxrs.la
librpmostreecxxrs_la_SOURCES = rpmostree-cxxrs.h rpmostree-cxxrs.cxx
# Suppress missing-declarations because https://github.com/dtolnay/cxx/issues/590
Add --enable-sanitizers (not on by default yet)
This way we at least get unit test coverage (which...
our unit test coverage doesn't do much because our
main code paths require privileges or virt).
One main blocker to this is that rustc doesn't expose
first-class support for this yet:
https://github.com/rust-lang/rust/issues/39699
At a practical level this works when building in release
mode but fails with `cargo test` for some reason; linker
arguments being pruned? Not sure.
So I was able to use this when composing to find a bug,
but then for some other reason the client
side apparently infinite loops inside libsolv.
So we're not enabling this yet for those reasons, but
let's land the build infrastructure now.
```
(lldb) thread backtrace
* thread #4, name = 'pool-/usr/bin/r'
* frame #0: 0x00007fd61b97200f libc.so.6`__memcpy_sse2_unaligned_erms + 623
frame #1: 0x00007fd61cbc88e6 libasan.so.6`__asan::asan_realloc(void*, unsigned long, __sanitizer::BufferedStackTrace*) + 214
frame #2: 0x00007fd61cc4b725 libasan.so.6`__interceptor_realloc + 245
frame #3: 0x00007fd61baec43e libsolv.so.1`solv_realloc + 30
frame #4: 0x00007fd61baf0414 libsolv.so.1`repodata_add_dirstr + 276
frame #5: 0x00007fd61bb6f755 libsolvext.so.1`end_element + 53
frame #6: 0x00007fd61b05855d libxml2.so.2`xmlParseEndTag1.constprop.0 + 317
frame #7: 0x00007fd61b063548 libxml2.so.2`xmlParseTryOrFinish.isra.0 + 888
frame #8: 0x00007fd61af7ed20 libxml2.so.2`xmlParseChunk + 560
frame #9: 0x00007fd61bb727e7 libsolvext.so.1`solv_xmlparser_parse + 183
frame #10: 0x00007fd61bb5ea0e libsolvext.so.1`repo_add_rpmmd + 254
frame #11: 0x000055a4fce7a5f5 rpm-ostree`::load_filelists_cb(repo=<unavailable>, fp=<unavailable>) at dnf-sack.cpp:444:23
frame #12: 0x000055a4fce7cad6 rpm-ostree`load_ext(_DnfSack*, libdnf::Repo*, _hy_repo_repodata, char const*, char const*, int (*)(s_Repo*, _IO_FILE*), _GError**) at dnf-sack.cpp:430:13
frame #13: 0x000055a4fce7df60 rpm-ostree`dnf_sack_load_repo at dnf-sack.cpp:1789:26
frame #14: 0x000055a4fce7eee9 rpm-ostree`dnf_sack_add_repo at dnf-sack.cpp:2217:28
frame #15: 0x000055a4fce7f0fb rpm-ostree`dnf_sack_add_repos at dnf-sack.cpp:2271:32
frame #16: 0x000055a4fce870ee rpm-ostree`dnf_context_setup_sack_with_flags at dnf-context.cpp:1796:29
frame #17: 0x000055a4fcdf757f rpm-ostree`rpmostree_context_download_metadata at rpmostree-core.cxx:1206:44
frame #18: 0x000055a4fcdf95c3 rpm-ostree`rpmostree_context_prepare at rpmostree-core.cxx:2001:48
frame #19: 0x000055a4fce54ab7 rpm-ostree`rpmostree_sysroot_upgrader_prep_layering at rpmostree-sysroot-upgrader.cxx:1018:38
frame #20: 0x000055a4fcdcb143 rpm-ostree`deploy_transaction_execute(_RpmostreedTransaction*, _GCancellable*, _GError**) at rpmostreed-transaction-types.cxx:1445:49
frame #21: 0x000055a4fcdba4cd rpm-ostree`transaction_execute_thread(_GTask*, void*, void*, _GCancellable*) at rpmostreed-transaction.cxx:340:34
frame #22: 0x00007fd61c58f7e2 libgio-2.0.so.0`g_task_thread_pool_thread + 114
frame #23: 0x00007fd61c3d7e54 libglib-2.0.so.0`g_thread_pool_thread_proxy.lto_priv.0 + 116
frame #24: 0x00007fd61c3d52b2 libglib-2.0.so.0`g_thread_proxy + 82
frame #25: 0x00007fd61b8af3f9 libpthread.so.0`start_thread + 233
frame #26: 0x00007fd61b9c9903 libc.so.6`__clone + 67
(lldb)
```
2021-02-03 00:54:38 +03:00
librpmostreecxxrs_la_CXXFLAGS = $(AM_CXXFLAGS) $(SANITIZER_FLAGS) $(rpmostree_common_cflags) -Wno-missing-declarations
2020-12-22 17:56:15 +03:00
librpmostreecxxrs_la_LIBADD = -lstdc++
2020-12-31 19:55:19 +03:00
BUILT_SOURCES += $(binding_generated_sources)
2018-08-24 17:42:31 +03:00
2021-01-26 14:34:59 +03:00
# And install our binary
install-rpmostree-hook:
install -d -m 0755 $(DESTDIR)$(bindir)
2021-02-04 23:01:43 +03:00
install -m 0755 -t $(DESTDIR)$(bindir) rpm-ostree
2021-01-26 14:34:59 +03:00
INSTALL_EXEC_HOOKS += install-rpmostree-hook
2018-09-26 17:43:18 +03:00
# Wraps `cargo test`. This is always a debug non-release build;
# the main thing here is we still drop the `target` dir in our build
# directory, since we nominally support srcdir != builddir.
2021-01-28 13:13:57 +03:00
rust-test: $(binding_generated_sources) $(dbus_built_sources) $(librpmostree_rust_path) librpmostreecxxrs.la librpmostreeinternals.la
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@abs_top_builddir@/.libs/" cargo test
rust-test-%: $(binding_generated_sources) $(dbus_built_sources) $(librpmostree_rust_path) librpmostreecxxrs.la librpmostreeinternals.la
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@abs_top_builddir@/.libs/" cargo test -- $*
.PHONY: rust-test rust-test-%