diff mbox series

[14.2,3/3] rust: Copy install-html rule from Ada frontend

Message ID 20240614142300.31778-8-arthur.cohen@embecosm.com
State New
Headers show
Series [14.2,1/3] gccrs: Add base documentation for using the Rust frontend. | expand

Commit Message

Arthur Cohen June 14, 2024, 2:21 p.m. UTC
gcc/rust/ChangeLog:

	* Make-lang.in: Add proper rust.install-html rule.
---
 gcc/rust/Make-lang.in | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index 2395541425f..815a8b315c0 100644
--- a/gcc/rust/Make-lang.in
+++ b/gcc/rust/Make-lang.in
@@ -375,7 +375,24 @@  selftest-rust-valgrind: $(RUST_SELFTEST_DEPS)
 rust.install-info:
 
 rust.install-dvi:
-rust.install-html:
+
+rust.install-html: $(build_htmldir)/rust
+	@$(NORMAL_INSTALL)
+	test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
+	@for p in $(build_htmldir)/rust; do \
+	  if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+	  f=$(html__strip_dir) \
+	  if test -d "$$d$$p"; then \
+	    echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+	  else \
+	    echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+	  fi; \
+	done
+
 rust.install-pdf:
 
 # Install man pages for the front end. This target should ignore errors.