Simplify Makefile.
parent
6a5856fc7c
commit
4559c1d7af
@ -1,25 +1,31 @@
|
||||
# targets that aren't filenames
|
||||
.PHONY: all clean deploy
|
||||
.PHONY: all clean deploy build serve
|
||||
|
||||
all: _includes/pubs.html _site/index.html
|
||||
all: build
|
||||
|
||||
BUILDARGS :=
|
||||
_site/index.html _site/wacas14/index.html:
|
||||
jekyll build $(BUILDARGS)
|
||||
|
||||
BIBBLE=bibble
|
||||
BIBBLE = bibble
|
||||
|
||||
_includes/pubs.html: bib/pubs.bib bib/publications.tmpl
|
||||
mkdir -p _includes
|
||||
$(BIBBLE) $+ > $@
|
||||
|
||||
_site/index.html: $(wildcard *.html) _includes/pubs.html _config.yml \
|
||||
_layouts/default.html
|
||||
build: _includes/pubs.html
|
||||
jekyll build
|
||||
|
||||
# you can configure these at the shell, e.g.:
|
||||
# SERVE_PORT=5001 make serve
|
||||
SERVE_HOST ?= 127.0.0.1
|
||||
SERVE_PORT ?= 5000
|
||||
|
||||
serve: _includes/pubs.html
|
||||
jekyll serve --port $(SERVE_PORT) --host $(SERVE_HOST)
|
||||
|
||||
clean:
|
||||
$(RM) -r _site _includes/pubs.html
|
||||
|
||||
HOST := yourwebpage.com
|
||||
PATHSVR := www/
|
||||
deploy: clean all
|
||||
rsync --compress --recursive --checksum --itemize-changes --delete -e ssh _site/ $(HOST):$(PATHSVR)
|
||||
DEPLOY_HOST ?= yourwebpage.com
|
||||
DEPLOY_PATH ?= www/
|
||||
RSYNC := rsync --compress --recursive --checksum --itemize-changes --delete -e ssh
|
||||
|
||||
deploy: clean build
|
||||
$(RSYNC) _site/ $(DEPLOY_HOST):$(DEPLOY_PATH)
|
||||
|
Loading…
Reference in New Issue