libcasio/docs/Makefile

40 lines
1.1 KiB
Makefile
Raw Normal View History

2017-09-02 20:22:50 +02:00
#!/usr/bin/make -f
#*****************************************************************************#
# Target for the end user #
#*****************************************************************************#
2017-09-03 15:30:13 +02:00
# Make it.
all: -all
2017-09-02 20:22:50 +02:00
# Preview in local how it will render.
preview prev: -all-watch
2017-09-03 15:30:13 +02:00
# Upload it to production (only for maintainers).
show: -all -install
2017-09-02 20:22:50 +02:00
.PHONY: preview prev
#*****************************************************************************#
# Internal #
#*****************************************************************************#
JEK := bundle exec jekyll
2017-09-03 15:30:13 +02:00
ROOT := cake@p7.planet-casio.com:libcasio_doc
2017-09-02 20:22:50 +02:00
# Prepare the bundle.
-prepare:
bundle check || bundle install --path vendor/bundle
# Make it all.
-all: -prepare
$(JEK) build $(JEKYLL_OPT)
# Make and watch.
-all-watch: -prepare
$(JEK) serve --watch $(JEKYLL_OPT)
2017-09-03 15:30:13 +02:00
# Upload.
-install:
find _site -type f -exec chmod 644 {} \;
rsync -Prlt --delete _site/ "$(ROOT)"
.PHONY: -prepare -all -all-watch -install
2017-09-02 20:22:50 +02:00
# End of file.