File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed
Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -77,4 +77,10 @@ cargo-clean-config:
7777
7878clean-local : cargo-clean-chirp cxxbridge-clean-chirp clean-librustdeps-la cargo-clean-config
7979
80+ dist-hook : cxxbridge-chirp
81+ $(MKDIR_P ) $(distdir ) /chirp/gen/src
82+ $(MKDIR_P ) $(distdir ) /chirp/gen/include/rust/chirp
83+ cp $(LIBRUST_CHIRP_CPP ) $(distdir ) /chirp/gen/src/
84+ cp $(LIBRUST_CHIRP_H ) $(distdir ) /chirp/gen/include/rust/chirp/
85+
8086.PHONY : cargo-build cargo-clean cargo-clean-config
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ LIBRUST_CHIRP_GEN_DIR = $(abs_top_builddir)/rust/chirp/gen
1212LIBRUST_CHIRP_MANIFEST = $(LIBRUST_CHIRP_CRATE_DIR)/Cargo.toml
1313LIBRUST_CHIRP_CARGO_BUILD_OPTS = $(CARGO_BUILD_OPTS) --manifest-path $(LIBRUST_CHIRP_MANIFEST)
1414
15+ LIBRUST_CHIRP_GEN_SRCDIR = $(top_srcdir)/rust/chirp/gen
16+
1517LIBRUST_CHIRP_SRCS = \
1618 $(LIBRUST_CHIRP_CRATE_DIR)/src/lib.rs
1719
@@ -29,9 +31,21 @@ LIBRUST_CHIRP_INCLUDES = \
2931
3032$(LIBRUST_CHIRP_SRCS): ;
3133
32- $(LIBRUST_CHIRP_H) $(LIBRUST_CHIRP_CPP): $(LIBRUST_CHIRP_SRCS)
34+ $(LIBRUST_CHIRP_CPP): $(LIBRUST_CHIRP_SRCS)
35+ $(AM_V_at)$(MKDIR_P) $(@D)
36+ $(AM_V_GEN)if test -f $(LIBRUST_CHIRP_GEN_SRCDIR)/src/lib.cpp; then \
37+ cp $(LIBRUST_CHIRP_GEN_SRCDIR)/src/lib.cpp $@; \
38+ else \
39+ $(CXXBRIDGE) $< -o $@; \
40+ fi
41+
42+ $(LIBRUST_CHIRP_H): $(LIBRUST_CHIRP_SRCS)
3343 $(AM_V_at)$(MKDIR_P) $(@D)
34- $(AM_V_GEN)$(CXXBRIDGE) $< $(if $(filter %.h,$@),--header) -o $@
44+ $(AM_V_GEN)if test -f $(LIBRUST_CHIRP_GEN_SRCDIR)/include/rust/chirp/lib.h; then \
45+ cp $(LIBRUST_CHIRP_GEN_SRCDIR)/include/rust/chirp/lib.h $@; \
46+ else \
47+ $(CXXBRIDGE) $< --header -o $@; \
48+ fi
3549
3650$(LIBRUST_CHIRP): $(LIBRUST_CHIRP_SRCS) $(LIBRUST_CHIRP_BUILD) $(LIBRUST_CHIRP_MANIFEST)
3751 $(AM_V_GEN)$(LIBRUST_CHIRP_CARGO_ENV) $(CARGO) build $(LIBRUST_CHIRP_CARGO_BUILD_OPTS)
Original file line number Diff line number Diff line change @@ -1198,7 +1198,7 @@ endif
11981198libcxxbridge_la_CPPFLAGS = $(AM_CPPFLAGS ) $(BITCOIN_INCLUDES ) $(PIC_FLAGS )
11991199libcxxbridge_la_CXXFLAGS = $(AM_CXXFLAGS ) $(PIE_FLAGS ) $(PIC_FLAGS ) -static
12001200libcxxbridge_la_LDFLAGS = $(AM_LDFLAGS ) -static
1201- libcxxbridge_la_SOURCES = $(LIBRUSTDEPS_CPP )
1201+ nodist_libcxxbridge_la_SOURCES = $(LIBRUSTDEPS_CPP )
12021202
12031203$(libcxxbridge_la_OBJECTS ) : $(LIBRUSTDEPS_H )
12041204#
You can’t perform that action at this time.
0 commit comments