2014-03-06 22:32:24 +01:00
|
|
|
ifneq ($(shell echo),)
|
|
|
|
CMD_EXE = 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: all mostlyclean clean install doc html info gh-pages
|
2014-02-05 00:20:43 +01:00
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
|
2014-03-06 22:32:24 +01:00
|
|
|
all mostlyclean install:
|
|
|
|
|
|
|
|
ifdef CMD_EXE
|
|
|
|
|
|
|
|
clean doc:
|
|
|
|
|
|
|
|
else # CMD_EXE
|
2014-02-05 00:20:43 +01:00
|
|
|
|
2014-02-05 20:55:17 +01:00
|
|
|
SGMLS := $(wildcard *.sgml)
|
|
|
|
|
2014-02-05 22:30:28 +01:00
|
|
|
../html/coding.html ../html/index.html: \
|
|
|
|
TOC_LEVEL = 0
|
|
|
|
|
|
|
|
TOC_LEVEL = 2
|
|
|
|
|
2014-02-05 20:55:17 +01:00
|
|
|
GH_PAGES = ../../gh-pages
|
|
|
|
|
2014-03-06 22:32:24 +01:00
|
|
|
clean:
|
|
|
|
$(RM) -r ../html ../info
|
2014-02-05 20:55:17 +01:00
|
|
|
|
2014-02-27 23:37:36 +01:00
|
|
|
doc: html info
|
2014-02-05 20:55:17 +01:00
|
|
|
|
2014-02-09 22:43:55 +01:00
|
|
|
html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png)
|
2014-02-05 23:20:03 +01:00
|
|
|
|
2014-02-27 23:37:36 +01:00
|
|
|
info: $(addprefix ../info/,$(SGMLS:.sgml=.info))
|
|
|
|
|
|
|
|
../html ../info:
|
2014-02-05 23:20:03 +01:00
|
|
|
@mkdir $@
|
2014-02-05 00:20:43 +01:00
|
|
|
|
2014-02-09 22:57:38 +01:00
|
|
|
../html/%.html: %.sgml header.html | ../html
|
2014-02-09 22:50:01 +01:00
|
|
|
@cd ../html && linuxdoc -B html -s 0 -T $(TOC_LEVEL) -H ../doc/header.html ../doc/$<
|
2014-02-09 22:43:55 +01:00
|
|
|
|
|
|
|
../html/doc.%: doc.% | ../html
|
|
|
|
cp $< ../html
|
2014-02-04 21:31:35 +01:00
|
|
|
|
2014-02-27 23:37:36 +01:00
|
|
|
../info/%.info: %.sgml | ../info
|
|
|
|
@cd ../info && linuxdoc -B info ../doc/$<
|
|
|
|
|
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-08 22:47:24 +01:00
|
|
|
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config push.default simple
|
2014-02-05 23:20:03 +01:00
|
|
|
$(RM) -r $(GH_PAGES)/doc
|
|
|
|
mkdir $(GH_PAGES)/doc
|
2014-02-06 12:54:53 +01:00
|
|
|
cp ../html/* $(GH_PAGES)/doc
|
2014-02-06 12:44:46 +01:00
|
|
|
git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A doc
|
2014-02-05 18:49:22 +01:00
|
|
|
-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
|
|
|
|
|
2014-03-06 22:32:24 +01:00
|
|
|
endif # CMD_EXE
|