aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile2
-rw-r--r--build.rs21
2 files changed, 22 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2a926a375b..77bdacc221 100644
--- a/Makefile
+++ b/Makefile
@@ -2958,7 +2958,7 @@ scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
-$(RUST_LIB): Cargo.toml $(RUST_SOURCES)
+$(RUST_LIB): Cargo.toml $(RUST_SOURCES) $(XDIFF_LIB) $(LIB_FILE) $(REFTABLE_LIB)
$(QUIET_CARGO)cargo build $(CARGO_ARGS)
.PHONY: rust
diff --git a/build.rs b/build.rs
new file mode 100644
index 0000000000..136d58c35a
--- /dev/null
+++ b/build.rs
@@ -0,0 +1,21 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation: version 2 of the License, dated June 1991.
+//
+// This program 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, see <https://www.gnu.org/licenses/>.
+
+fn main() {
+ println!("cargo::rustc-link-search=.");
+ println!("cargo::rustc-link-search=reftable");
+ println!("cargo::rustc-link-search=xdiff");
+ println!("cargo::rustc-link-lib=git");
+ println!("cargo::rustc-link-lib=reftable");
+ println!("cargo::rustc-link-lib=z");
+ println!("cargo::rustc-link-lib=xdiff");
+}