2014-02-05 19:55:17 +00:00
|
|
|
.PHONY: all doc html gh-pages mostlyclean clean install
|
2014-02-04 23:20:43 +00:00
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
|
2014-02-05 19:55:17 +00:00
|
|
|
ifeq ($(shell echo),)
|
2014-02-04 23:20:43 +00:00
|
|
|
|
2014-02-05 19:55:17 +00:00
|
|
|
SGMLS := $(wildcard *.sgml)
|
|
|
|
|
2014-02-05 21:30:28 +00:00
|
|
|
../html/coding.html ../html/index.html: \
|
|
|
|
TOC_LEVEL = 0
|
|
|
|
|
|
|
|
TOC_LEVEL = 2
|
|
|
|
|
2014-02-05 19:55:17 +00:00
|
|
|
GH_PAGES = ../../gh-pages
|
|
|
|
|
|
|
|
all:
|
|
|
|
|
|
|
|
doc: html
|
|
|
|
|
|
|
|
mostlyclean:
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) -r ../html
|
|
|
|
|
|
|
|
html: $(addprefix ../html/,$(SGMLS:.sgml=.html))
|
2014-02-04 23:20:43 +00:00
|
|
|
|
|
|
|
../html:
|
|
|
|
mkdir $@
|
|
|
|
|
|
|
|
../html/%.html: %.sgml | ../html
|
2014-02-05 21:30:28 +00:00
|
|
|
linuxdoc -B html --split=0 --toc=$(TOC_LEVEL) $<
|
2014-02-05 19:55:17 +00:00
|
|
|
mv $(@F) ../html
|
2014-02-04 20:31:35 +00:00
|
|
|
|
2014-02-04 23:20:43 +00:00
|
|
|
gh-pages: html
|
2014-02-05 19:55:17 +00:00
|
|
|
ifdef GH_TOKEN
|
2014-02-04 20:31:35 +00:00
|
|
|
git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES)
|
|
|
|
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.name "Oliver Schmidt"
|
|
|
|
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.email "ol.sc@web.de"
|
2014-02-05 19:55:17 +00:00
|
|
|
$(RM) -r $(GH_PAGES)/test
|
2014-02-04 23:29:27 +00:00
|
|
|
mkdir $(GH_PAGES)/test
|
2014-02-04 23:20:43 +00:00
|
|
|
cp -R ../html/* $(GH_PAGES)/test
|
2014-02-05 17:40:03 +00:00
|
|
|
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A .
|
2014-02-05 17:49:22 +00:00
|
|
|
-git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git commit -m "Updated doc from commit $(TRAVIS_COMMIT)."
|
2014-02-04 20:31:35 +00:00
|
|
|
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git push
|
2014-02-05 19:55:17 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
else # cmd.exe
|
|
|
|
|
|
|
|
all doc mostlyclean clean install:
|
|
|
|
|
|
|
|
endif # cmd.exe
|