2012-05-11 20:19:38 -04:00
|
|
|
##
|
|
|
|
# ease.js website Makefile
|
2011-11-23 20:08:26 -05:00
|
|
|
#
|
2012-05-11 20:19:38 -04:00
|
|
|
# Builds ease.js website (dynamically generated static content)
|
|
|
|
#
|
2014-04-09 19:49:00 -04:00
|
|
|
# Copyright (C) 2010 Free Software Foundation, Inc.
|
2012-05-11 20:19:38 -04:00
|
|
|
#
|
|
|
|
# This file is part of the ease.js website.
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as
|
|
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
##
|
2011-11-23 20:08:26 -05:00
|
|
|
|
2012-06-09 11:39:49 -04:00
|
|
|
header := includes/header.html
|
|
|
|
footer := includes/footer.html
|
2013-12-23 22:28:13 -05:00
|
|
|
header_news := includes/news-header.html
|
2011-11-23 20:08:26 -05:00
|
|
|
|
|
|
|
input_html := $(wildcard *.html)
|
|
|
|
input_images := $(wildcard images/*.png)
|
|
|
|
input_scripts := $(shell find scripts/ -name '*.js')
|
|
|
|
|
|
|
|
outdir := webroot
|
|
|
|
output_html := $(addprefix $(outdir)/, $(input_html))
|
|
|
|
output_images := $(addprefix $(outdir)/, $(input_images))
|
|
|
|
output_scripts := $(addprefix $(outdir)/, $(input_scripts))
|
|
|
|
|
2015-05-19 01:29:37 -04:00
|
|
|
.PHONY: default clean news publish FORCE
|
2011-11-23 20:08:26 -05:00
|
|
|
|
|
|
|
default: $(outdir) $(output_html) $(output_images) \
|
2014-02-01 00:48:46 -05:00
|
|
|
$(output_scripts) $(outdir)/style.css $(outdir)/fonts
|
2011-11-23 20:08:26 -05:00
|
|
|
|
|
|
|
$(outdir):
|
|
|
|
mkdir -p $@ $@/images $@/scripts/ex
|
|
|
|
|
|
|
|
$(outdir)/style.css: style.css | $(outdir)
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(outdir)/scripts/%.js: scripts/%.js | $(outdir)
|
|
|
|
cp -r $< $@
|
|
|
|
|
|
|
|
$(outdir)/images/%.png: images/%.png | $(outdir)
|
|
|
|
cp -r $< $@
|
|
|
|
|
2014-02-01 00:48:46 -05:00
|
|
|
$(outdir)/fonts: fonts
|
|
|
|
mkdir -p "$@" && cp $</*.woff "$@"
|
|
|
|
|
2015-05-19 01:29:37 -04:00
|
|
|
$(outdir)/download.html: .release-current.html
|
|
|
|
$(outdir)/release-notes.html: .release-all.html
|
2012-05-05 23:48:10 -04:00
|
|
|
$(outdir)/%.html: %.html $(header) $(footer) tools/page-parse | $(outdir)
|
2011-11-23 22:49:59 -05:00
|
|
|
cat $(header) \
|
|
|
|
| sed 's/\(<body\)/\1 class="$*"/' \
|
2011-11-23 23:43:45 -05:00
|
|
|
| cat - $< $(footer) \
|
2012-01-08 16:14:38 -05:00
|
|
|
| sed 's/^ \+//;s/^ *#//;' \
|
|
|
|
| tools/page-parse \
|
2011-11-23 23:43:45 -05:00
|
|
|
> $@
|
2011-11-23 20:08:26 -05:00
|
|
|
|
2015-05-19 01:29:37 -04:00
|
|
|
.release-current.html: FORCE
|
|
|
|
./tools/release-notes 1 > $@
|
|
|
|
|
|
|
|
.release-all.html: FORCE
|
|
|
|
./tools/release-notes > $@
|
|
|
|
|
2012-01-04 23:09:00 -05:00
|
|
|
# requires git-weblog from mikegerwitz's git-supp package
|
2013-12-23 22:28:13 -05:00
|
|
|
news:
|
2016-07-16 00:20:05 -04:00
|
|
|
tools/news-fmt < ../NEWS \
|
2013-12-23 22:28:13 -05:00
|
|
|
| cat $(header) $(header_news) - $(footer) \
|
|
|
|
| sed 's/\(<body\)/\1 class="news"/' \
|
|
|
|
> "$(outdir)/news.html"
|
2012-01-04 23:09:00 -05:00
|
|
|
|
2012-05-07 21:40:32 -04:00
|
|
|
# documentation, styled to match the rest of the website
|
2015-08-23 01:11:35 -04:00
|
|
|
webdoc: default
|
2012-05-07 21:40:32 -04:00
|
|
|
./tools/webdoc
|
|
|
|
|
2012-01-07 22:56:49 -05:00
|
|
|
# publish webroot to remote server using rsync (do not delete files, since we
|
|
|
|
# may not have built everything)
|
|
|
|
publish: | default
|
2012-01-10 00:39:22 -05:00
|
|
|
@[ -n "$(PUBROOT)" ] || ( echo "PUBROOT not set; aborting." >&2 && false )
|
2012-05-07 22:03:12 -04:00
|
|
|
rsync -vrL $(outdir)/./* "$(PUBROOT)"
|
2012-01-07 22:56:49 -05:00
|
|
|
|
2011-11-23 20:08:26 -05:00
|
|
|
clean:
|
2014-04-29 03:03:56 -04:00
|
|
|
${RM} -r webroot doc-cp
|
2015-05-19 01:29:37 -04:00
|
|
|
|
|
|
|
FORCE:
|