From 40ca9f183b916cd6ec0f926007da79a665c60503 Mon Sep 17 00:00:00 2001 From: Paul Dagnelie Date: Fri, 29 Apr 2022 11:01:39 -0700 Subject: [PATCH] Update makefile to use cargo dependency information (#397) Signed-off-by: Paul Dagnelie --- cmd/zfs_object_agent/Makefile.am | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cmd/zfs_object_agent/Makefile.am b/cmd/zfs_object_agent/Makefile.am index 9b0ce9fbb2f3..fdf34f05b9e4 100644 --- a/cmd/zfs_object_agent/Makefile.am +++ b/cmd/zfs_object_agent/Makefile.am @@ -1,18 +1,16 @@ sbin_PROGRAMS = $(RUSTDIR)/zcache $(RUSTDIR)/zcachedb $(RUSTDIR)/zfs_object_agent $(RUSTDIR)/zfs_object_perf $(RUSTDIR)/zoa_test -common_sources = $(wildcard util/src/*.rs util/Cargo.toml zettacache/src/*.rs zettacache/src/*/*.rs zettacache/Cargo.toml zettaobject/src/*/*.rs zettaobject/src/*.rs zettaobject/Cargo.toml Cargo.lock Cargo.toml) +__RUSTDIR__zcache_SOURCES = $(shell sed 's/.*: //' $(RUSTDIR)/zcache.d || find . -name "*.rs" -o -name "*.toml" -o -name "*.lock") -__RUSTDIR__zcache_SOURCES = $(wildcard zcache/src/*.rs zcache/Cargo.toml) $(common_sources) +__RUSTDIR__zcachedb_SOURCES = $(shell sed 's/.*: //' $(RUSTDIR)/zcachedb.d || find . -name "*.rs" -o -name "*.toml" -o -name "*.lock") -__RUSTDIR__zcachedb_SOURCES = $(wildcard zcdb/src/*.rs zcdb/Cargo.toml) $(common_sources) +__RUSTDIR__zfs_object_agent_SOURCES = $(shell sed 's/.*: //' $(RUSTDIR)/zfs_object_agent.d || find . -name "*.rs" -o -name "*.toml" -o -name "*.lock") -__RUSTDIR__zfs_object_agent_SOURCES = $(wildcard server/src/*.rs server/Cargo.toml) $(common_sources) +__RUSTDIR__zfs_object_perf_SOURCES = $(shell sed 's/.*: //' $(RUSTDIR)/zfs_object_perf.d || find . -name "*.rs" -o -name "*.toml" -o -name "*.lock") -__RUSTDIR__zfs_object_perf_SOURCES = $(wildcard object_perf/src/*.rs object_perf/Cargo.toml) $(common_sources) +__RUSTDIR__zoa_test_SOURCES = $(shell sed 's/.*: //' $(RUSTDIR)/zoa_test.d || find . -name "*.rs" -o -name "*.toml" -o -name "*.lock") -__RUSTDIR__zoa_test_SOURCES = $(wildcard client/src/*.rs client/Cargo.toml) $(common_sources) - -__RUSTDIR__libzoa_so_SOURCES = $(wildcard zoa/src/*.rs zoa/Cargo.toml) $(common_sources) +__RUSTDIR__libzoa_so_SOURCES = $(shell sed 's/.*: //' $(RUSTDIR)/libzoa.d || find . -name "*.rs" -o -name "*.toml" -o -name "*.lock") EXTRA_DIST = $(__RUSTDIR__libzoa_so_SOURCES)