1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-19 17:31:31 +00:00
cc65/doc/Makefile

47 lines
1.0 KiB
Makefile
Raw Normal View History

2014-02-05 20:55:17 +01:00
.PHONY: all doc html gh-pages mostlyclean clean install
2014-02-05 00:20:43 +01:00
.SUFFIXES:
2014-02-05 20:55:17 +01:00
ifeq ($(shell echo),)
2014-02-05 00:20:43 +01:00
2014-02-05 20:55:17 +01:00
SGMLS := $(wildcard *.sgml)
GH_PAGES = ../../gh-pages
all:
doc: html
mostlyclean:
clean:
$(RM) -r ../html
html: $(addprefix ../html/,$(SGMLS:.sgml=.html))
2014-02-05 00:20:43 +01:00
../html:
mkdir $@
../html/%.html: %.sgml | ../html
linuxdoc -B html --split=0 --toc=2 $<
2014-02-05 20:55:17 +01:00
mv $(@F) ../html
2014-02-04 21:31:35 +01:00
2014-02-05 00:20:43 +01:00
gh-pages: html
2014-02-05 20:55:17 +01:00
ifdef GH_TOKEN
2014-02-04 21:31:35 +01: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 20:55:17 +01:00
$(RM) -r $(GH_PAGES)/test
2014-02-05 00:29:27 +01:00
mkdir $(GH_PAGES)/test
2014-02-05 00:20:43 +01:00
cp -R ../html/* $(GH_PAGES)/test
2014-02-05 18:40:03 +01:00
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A .
-git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git commit -m "Updated doc from commit $(TRAVIS_COMMIT)."
2014-02-04 21:31:35 +01:00
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git push
2014-02-05 20:55:17 +01:00
endif
else # cmd.exe
all doc mostlyclean clean install:
endif # cmd.exe