1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-20 12:32:58 +00:00
cc65/doc/Makefile

55 lines
1.3 KiB
Makefile
Raw Normal View History

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)
../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
html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png)
2014-02-05 19:55:17 +00:00
mostlyclean:
clean:
$(RM) -r ../html
2014-02-04 23:20:43 +00:00
../html:
@mkdir $@
2014-02-04 23:20:43 +00:00
../html/%.html: %.sgml | ../html
2014-02-09 21:50:01 +00:00
@cd ../html && linuxdoc -B html -s 0 -T $(TOC_LEVEL) -H ../doc/header.html ../doc/$<
../html/doc.%: doc.% | ../html
cp $< ../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-08 21:47:24 +00:00
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config push.default simple
$(RM) -r $(GH_PAGES)/doc
mkdir $(GH_PAGES)/doc
cp ../html/* $(GH_PAGES)/doc
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A doc
-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