Skip to content

Commit f981b2a

Browse files
feat(makefile): add open option for doc
* add open option for doc command * document this flag in readme Signed-off-by: Anhad Singh <[email protected]>
1 parent 3af6b55 commit f981b2a

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ qemu: $(KERNEL_TARGET) $(USERLAND_TARGET)
4141

4242
.PHONY: doc
4343
doc:
44-
rm -rf target/doc
4544
cd src && cargo doc --package aero_kernel --release --target-dir=../target/doc/
4645
cp web/index.html target/doc/index.html
46+
ifeq ($(open),yes)
47+
xdg-open target/doc/index.html
48+
endif

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ $ cd aero
7575
make distro-image
7676
make qemu
7777

78-
# To build documentation run the following command. The documentation will be outputed to the `target/doc` directory.
79-
make doc
80-
# The documentation will be available in the `target/doc` directory.
78+
# To build documentation run the following command. The documentation will be outputed
79+
# to the `target/doc` directory.
80+
#
81+
# Optionally you can pass `open=yes` to open the documentation in the default browser.
82+
make doc open=yes
8183
```
8284

8385
# Contributing

web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<meta http-equiv='refresh' content='0; URL=./x86_64-aero_os/doc/aero_kernel/index.html' />
1+
<meta http-equiv='refresh' content='0; URL=./x86_64-unknown-none/doc/aero_kernel/index.html' />

0 commit comments

Comments
 (0)