From 2e575db3dbee69e1beaa395e184106ab0e8f9d2c Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 16 Oct 2016 14:06:01 -0600 Subject: [PATCH] Allow rustdoc --- Makefile | 11 ++++++++--- krustdoc.sh | 2 ++ rustdoc.sh | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100755 krustdoc.sh create mode 100755 rustdoc.sh diff --git a/Makefile b/Makefile index 09202dc..0629938 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ KTARGET=$(ARCH)-unknown-none KBUILD=build/kernel KRUSTC=./krustc.sh KRUSTCFLAGS=--target $(KTARGET).json -C opt-level=s -C soft-float -KCARGO=RUSTC="$(KRUSTC)" cargo +KRUSTDOC=./krustdoc.sh +KCARGO=RUSTC="$(KRUSTC)" RUSTDOC="$(KRUSTDOC)" cargo KCARGOFLAGS=--target $(KTARGET).json -- -C opt-level=s -C soft-float # Userspace variables @@ -13,11 +14,12 @@ TARGET=$(ARCH)-unknown-redox BUILD=build/userspace RUSTC=./rustc.sh RUSTCFLAGS=--target $(TARGET).json -C opt-level=s --cfg redox -CARGO=RUSTC="$(RUSTC)" cargo +RUSTDOC=./rustdoc.sh +CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" cargo CARGOFLAGS=--target $(TARGET).json -- -C opt-level=s --cfg redox # Default targets -.PHONY: all clean update qemu bochs drivers schemes coreutils extrautils netutils userutils wireshark FORCE +.PHONY: all clean doc update qemu bochs drivers schemes coreutils extrautils netutils userutils wireshark FORCE all: $(KBUILD)/harddrive.bin @@ -48,6 +50,9 @@ clean: rm -rf filesystem/bin rm -rf build +doc: $(KBUILD)/libkernel.a + $(KCARGO) doc --target $(KTARGET).json + update: cargo update cargo update --manifest-path libstd/Cargo.toml diff --git a/krustdoc.sh b/krustdoc.sh new file mode 100755 index 0000000..de4cdb6 --- /dev/null +++ b/krustdoc.sh @@ -0,0 +1,2 @@ +#!/bin/bash +RUST_BACKTRACE=1 rustdoc -L build/kernel --cfg redox $* diff --git a/rustdoc.sh b/rustdoc.sh new file mode 100755 index 0000000..4eff5a2 --- /dev/null +++ b/rustdoc.sh @@ -0,0 +1,2 @@ +#!/bin/bash +RUST_BACKTRACE=1 rustdoc -L build/userspace --cfg redox $*