Fixed Makefile

This commit is contained in:
Wen Kokke 2018-02-28 12:01:22 +00:00
parent d9a79cf298
commit 6888d87b37
No known key found for this signature in database
GPG key ID: 82A1AE2526064F4B
2 changed files with 15 additions and 18 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
_site/
.sass-cache/
*.agdai
out/

View file

@ -4,19 +4,21 @@ markdown := $(subst src/,out/,$(subst .lagda,.md,$(agda)))
all: $(markdown)
out/:
out/%.md: src/%.lagda
mkdir -p out
out/%.md: src/%.lagda out/
agda2html --verbose --link-to-agda-stdlib --jekyll-root=out/ -i $< -o $@
# serve website using jekyll
serve:
ruby -S bundle exec jekyll serve
ruby -S bundle exec jekyll serve --no-watch --detach
.phony: serve
# build website using jekyll
build: $(markdown)
ruby -S bundle exec jekyll build
# build website using jekyll incrementally
build-incremental:
ruby -S bundle exec jekyll build --incremental
# remove all auxiliary files
clean:
@ -24,9 +26,6 @@ ifneq ($(strip $(agdai)),)
rm $(agdai)
endif
.phony: clean
# remove all generated files
clobber: clean
ruby -S bundle exec jekyll clean
@ -35,25 +34,20 @@ ifneq ($(strip $(markdown)),)
endif
rmdir out/
.phony: clobber
# install bundler, and gem dependencies
setup:
macos-setup:
brew install libxml2
ruby -S gem install bundler --no-ri --no-rdoc
ruby -S gem install pkg-config --no-ri --no-rdoc -v "~> 1.1"
ruby -S bundle config build.nokogiri --use-system-libraries
ruby -S bundle install
.phony: setup
# install agda, agda-stdlib, and agda2html
travis-setup:\
$(HOME)/agda-master/\
$(HOME)/agda-stdlib-master/\
$(HOME)/agda2html-master/
.phony: travis-setup
$(HOME)/agda-master/:
curl -L https://github.com/agda/agda/archive/master.zip -o $(HOME)/agda-master.zip
unzip -qq $(HOME)/agda-master.zip -d $(HOME)
@ -72,3 +66,5 @@ $(HOME)/agda2html-master/:
unzip -qq $(HOME)/agda2html-master.zip -d $(HOME)
cd $(HOME)/agda2html-master;\
stack install
.phony: serve build clean clobber macos-setup travis-setup