mirror of https://github.com/seL4/docs.git
Reshuffle rust tutorial build
- install microkit and seL4 env for tutorial build from Makefile - improve jekyll build time by moving rust tutorial out of jekyll tree The tutorial build for Rust is too large to handle through Jekyll (build time goes up by a factor of 8), even though Jekyll only needs to copy those files. Ignore these files in the Jekyll build and copy/rsync them manually instead. Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
parent
5989759c95
commit
72f7f88dca
|
@ -7,11 +7,11 @@ _preview/
|
||||||
.sass-cache/
|
.sass-cache/
|
||||||
_repos/
|
_repos/
|
||||||
projects/virtualization/docs/api/
|
projects/virtualization/docs/api/
|
||||||
projects/rust/tutorial
|
|
||||||
.jekyll-cache/
|
.jekyll-cache/
|
||||||
.npm_deps
|
.npm_deps
|
||||||
vendor/
|
vendor/
|
||||||
node_modules/
|
node_modules/
|
||||||
_processed/microkit-tutorial/
|
_processed/microkit-tutorial/
|
||||||
_processed/tutes/
|
_processed/tutes/
|
||||||
|
_processed/rust/
|
||||||
_data/microkit_tutorial.yml
|
_data/microkit_tutorial.yml
|
||||||
|
|
30
Makefile
30
Makefile
|
@ -71,6 +71,23 @@ $(REPOSITORIES):
|
||||||
.PHONY: repos
|
.PHONY: repos
|
||||||
repos: $(REPOSITORIES)
|
repos: $(REPOSITORIES)
|
||||||
|
|
||||||
|
MICROKIT_VERSION=1.4.1
|
||||||
|
VENDOR_SEL4 = vendor/seL4
|
||||||
|
VENDOR_MICROKIT = vendor/microkit/sdk
|
||||||
|
|
||||||
|
.PHONY: sdk
|
||||||
|
sdk: $(VENDOR_SEL4) $(VENDOR_MICROKIT)
|
||||||
|
|
||||||
|
# it is fine to use the Linux version on Mac, we're not going to run any binaries
|
||||||
|
$(VENDOR_MICROKIT):
|
||||||
|
mkdir -p $@
|
||||||
|
curl -L https://github.com/seL4/microkit/releases/download/$(MICROKIT_VERSION)/microkit-sdk-$(MICROKIT_VERSION)-linux-x86-64.tar.gz | tar -xzf - -C $@ --strip-components=1
|
||||||
|
|
||||||
|
MK_BOARD = board/qemu_virt_aarch64/debug
|
||||||
|
$(VENDOR_SEL4): $(VENDOR_MICROKIT)
|
||||||
|
mkdir -p $@
|
||||||
|
ln -s ../../$</$(MK_BOARD)/ $@/libsel4
|
||||||
|
|
||||||
# Tutorials
|
# Tutorials
|
||||||
|
|
||||||
TUTES_DST = _processed/tutes
|
TUTES_DST = _processed/tutes
|
||||||
|
@ -120,11 +137,15 @@ microkit-tutorial: $(MICROKIT_TUT_DST_FILES) _data/microkit_tutorial.yml
|
||||||
|
|
||||||
RUST_TUT_REPO = _repos/coliasgroup/sel4-rust-tutorial
|
RUST_TUT_REPO = _repos/coliasgroup/sel4-rust-tutorial
|
||||||
RUST_TUT_BUILD = $(RUST_TUT_REPO)/book/build
|
RUST_TUT_BUILD = $(RUST_TUT_REPO)/book/build
|
||||||
RUST_TUT_DST = projects/rust/tutorial
|
RUST_TUT_DST = _processed/rust/tutorial
|
||||||
|
RUST_TUT_FINAL_DST = projects/rust/tutorial
|
||||||
|
|
||||||
.PHONY: rust-tutorial
|
.PHONY: rust-tutorial
|
||||||
rust-tutorial: $(RUST_TUT_REPO)
|
rust-tutorial: $(RUST_TUT_REPO)
|
||||||
cd $(RUST_TUT_REPO) && make for-docsite
|
cd $(RUST_TUT_REPO) && \
|
||||||
|
SEL4_PREFIX="${CURDIR}/$(VENDOR_SEL4)" \
|
||||||
|
SEL4_INCLUDE_DIRS="${CURDIR}/$(VENDOR_MICROKIT)/$(MK_BOARD)/include" \
|
||||||
|
make for-docsite
|
||||||
rm -rf $(RUST_TUT_DST)
|
rm -rf $(RUST_TUT_DST)
|
||||||
mkdir -p $(dir $(RUST_TUT_DST))
|
mkdir -p $(dir $(RUST_TUT_DST))
|
||||||
cp -rL $(RUST_TUT_BUILD) $(RUST_TUT_DST)
|
cp -rL $(RUST_TUT_BUILD) $(RUST_TUT_DST)
|
||||||
|
@ -227,6 +248,7 @@ docker_build:
|
||||||
# the connection; also works locally
|
# the connection; also works locally
|
||||||
.PHONY: serve
|
.PHONY: serve
|
||||||
serve: generate
|
serve: generate
|
||||||
|
rsync -a $(RUST_TUT_DST) _site/$(RUST_TUT_FINAL_DST)
|
||||||
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll serve
|
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll serve
|
||||||
|
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
|
@ -235,13 +257,17 @@ ifeq ($(JEKYLL_ENV),production)
|
||||||
$(MAKE) generate_data_files
|
$(MAKE) generate_data_files
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
JEKYLL_OUT = _site
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: generate
|
build: generate
|
||||||
|
rsync -a $(RUST_TUT_DST) $(JEKYLL_OUT)/$(RUST_TUT_FINAL_DST)
|
||||||
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll build $(BUILD_OPTS)
|
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll build $(BUILD_OPTS)
|
||||||
|
|
||||||
.PHONY: preview
|
.PHONY: preview
|
||||||
preview: JEKYLL_ENV := production
|
preview: JEKYLL_ENV := production
|
||||||
preview: BUILD_OPTS := --config "_config.yml,_preview.yml" $(BUILD_OPTS)
|
preview: BUILD_OPTS := --config "_config.yml,_preview.yml" $(BUILD_OPTS)
|
||||||
|
preview: JEKYLL_OUT := _preview
|
||||||
preview: build
|
preview: build
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
|
@ -116,3 +116,6 @@ exclude:
|
||||||
- "**/*.license"
|
- "**/*.license"
|
||||||
- .github/
|
- .github/
|
||||||
- .reuse/
|
- .reuse/
|
||||||
|
|
||||||
|
keep_files:
|
||||||
|
- projects/rust/tutorial
|
||||||
|
|
Loading…
Reference in New Issue