Minor changes in makefile; moved bundle install to make setup

This commit is contained in:
Wen Kokke 2018-02-02 13:36:01 +00:00
parent 4df09d9b05
commit abfff1ac17
No known key found for this signature in database
GPG key ID: 82A1AE2526064F4B
2 changed files with 24 additions and 12 deletions

View file

@ -36,7 +36,7 @@ before_install:
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# Download and install agda, agda-stdlib, and agda2html
- make setup
- make travis-setup setup
script:
- make

View file

@ -2,45 +2,57 @@ agda := $(wildcard src/*.lagda)
agdai := $(wildcard src/*.agdai)
markdown := $(subst src/,out/,$(subst .lagda,.md,$(agda)))
default: $(markdown)
all: $(markdown)
out/:
mkdir out
mkdir -p out
out/%.md: src/%.lagda out/
agda2html --verbose --link-to-agda-stdlib --jekyll-root=out/ -i $< -o $@
.phony: serve
# serve website using jekyll
serve:
ruby -S gem install bundler --no-ri --no-rdoc
ruby -S bundle install
ruby -S bundle exec jekyll serve
.phony: clean
.phony: serve
# remove all auxiliary files
clean:
ifneq ($(strip $(agdai)),)
rm $(agdai)
endif
.phony: clobber
.phony: clean
# remove all generated files
clobber: clean
ruby -S gem install bundler --no-ri --no-rdoc
ruby -S bundle install
ruby -S bundle exec jekyll clean
ifneq ($(strip $(markdown)),)
rm $(markdown)
endif
rmdir out/
setup:\
.phony: clobber
# install bundler, and gem dependencies
setup:
ruby -S gem install bundler --no-ri --no-rdoc
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: setup
.phony: travis-setup
$(HOME)/agda-master/:
curl -L https://github.com/agda/agda/archive/master.zip -o $(HOME)/agda-master.zip