Simplify Makefile.
parent
6a5856fc7c
commit
4559c1d7af
@ -1,25 +1,31 @@
|
|||||||
# targets that aren't filenames
|
# 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 :=
|
BIBBLE = bibble
|
||||||
_site/index.html _site/wacas14/index.html:
|
|
||||||
jekyll build $(BUILDARGS)
|
|
||||||
|
|
||||||
BIBBLE=bibble
|
|
||||||
|
|
||||||
_includes/pubs.html: bib/pubs.bib bib/publications.tmpl
|
_includes/pubs.html: bib/pubs.bib bib/publications.tmpl
|
||||||
mkdir -p _includes
|
mkdir -p _includes
|
||||||
$(BIBBLE) $+ > $@
|
$(BIBBLE) $+ > $@
|
||||||
|
|
||||||
_site/index.html: $(wildcard *.html) _includes/pubs.html _config.yml \
|
build: _includes/pubs.html
|
||||||
_layouts/default.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:
|
clean:
|
||||||
$(RM) -r _site _includes/pubs.html
|
$(RM) -r _site _includes/pubs.html
|
||||||
|
|
||||||
HOST := yourwebpage.com
|
DEPLOY_HOST ?= yourwebpage.com
|
||||||
PATHSVR := www/
|
DEPLOY_PATH ?= www/
|
||||||
deploy: clean all
|
RSYNC := rsync --compress --recursive --checksum --itemize-changes --delete -e ssh
|
||||||
rsync --compress --recursive --checksum --itemize-changes --delete -e ssh _site/ $(HOST):$(PATHSVR)
|
|
||||||
|
deploy: clean build
|
||||||
|
$(RSYNC) _site/ $(DEPLOY_HOST):$(DEPLOY_PATH)
|
||||||
|
Loading…
Reference in New Issue