1. Takafumi Arakaki
  2. admin.tkf.bitbucket.org

Source

admin.tkf.bitbucket.org / Makefile

.PHONY: railgun railgun-doc railgun-doc-ja neorg-doc \
	copy-railgun-doc copy-railgun-doc-ja copy-neorg-doc \
	update-railgun-doc update-railgun-doc-ja update-neorg-doc \
	pull-all  pull-railgun pull-railgun-doc-ja pull-neorg \
	rstspreadsheet-doc copy-rstspreadsheet-doc \
	update-rstspreadsheet-doc pull-copy \
	thermo-chaos-ja copy-thermo-chaos-ja update-thermo-chaos-ja \
	pull-thermo-chaos-ja \


PYTHONPATH=$(shell pwd)/railgun:$(shell echo "$${PYTHONPATH}")

## build

railgun:
	cd $@ && python setup.py build_ext -i

railgun-doc: railgun
	rm -rf railgun/doc/source/_templates
	ln -s -t railgun/doc/source ../../../_templates/
	cd $@/doc/ && PYTHONPATH=$(PYTHONPATH) make html

railgun-doc-ja: railgun
	rm -rf railgun-doc-ja/source/_templates
	ln -s -t railgun-doc-ja/source/ ../../_templates/
	cd $@ && PYTHONPATH=${PYTHONPATH} make html

neorg-doc: neorg
	rm -rf $</doc/source/_templates
	ln -s -t $</doc/source/ ../../../_templates/
	make --directory=$</doc html

rstspreadsheet-doc:
	rm -rf rstspreadsheet/doc/_templates
	ln -s -t rstspreadsheet/doc/ ../../_templates/
	make --directory=rstspreadsheet/doc html

thermo-chaos-ja:
	rm -rf thermo-chaos-ja/source/_templates
	ln -s -t thermo-chaos-ja/source/ ../../_templates/
	make --directory=thermo-chaos-ja html


## copy

copy-railgun-doc:
	rm -rf tkf.bitbucket.org/railgun-doc
	cp -r railgun/doc/build/html tkf.bitbucket.org/railgun-doc

copy-railgun-doc-ja:
	rm -rf tkf.bitbucket.org/railgun-doc-ja
	cp -r railgun-doc-ja/build/html tkf.bitbucket.org/railgun-doc-ja

copy-neorg-doc:
	rm -rf tkf.bitbucket.org/neorg-doc
	cp -r neorg/doc/build/html tkf.bitbucket.org/neorg-doc

copy-rstspreadsheet-doc:
	rm -rf tkf.bitbucket.org/rstspreadsheet-doc
	cp -r rstspreadsheet/doc/_build/html \
		tkf.bitbucket.org/rstspreadsheet-doc

copy-thermo-chaos-ja:
	rm -rf tkf.bitbucket.org/thermo-chaos-ja
	cp -r thermo-chaos-ja/build/html \
		tkf.bitbucket.org/thermo-chaos-ja


## update `tkf.bitbucket.org` sub-repository

update-railgun-doc:
	hg -R tkf.bitbucket.org addremove tkf.bitbucket.org/railgun-doc
	hg -R tkf.bitbucket.org ci -m \
		"railgun-doc/`hg -R railgun id --id`" \
		tkf.bitbucket.org/railgun-doc

update-railgun-doc-ja:
	hg -R tkf.bitbucket.org addremove tkf.bitbucket.org/railgun-doc-ja
	hg -R tkf.bitbucket.org ci -m \
		"railgun-doc-ja/`hg -R railgun-doc-ja id --id`" \
		tkf.bitbucket.org/railgun-doc-ja

update-neorg-doc:
	hg -R tkf.bitbucket.org addremove tkf.bitbucket.org/neorg-doc
	hg -R tkf.bitbucket.org ci -m \
		"neorg-doc/`hg -R neorg id --id`" \
		tkf.bitbucket.org/neorg-doc

update-rstspreadsheet-doc:
	hg -R tkf.bitbucket.org addremove \
		tkf.bitbucket.org/rstspreadsheet-doc
	hg -R tkf.bitbucket.org ci -m \
		"rstspreadsheet-doc/`hg -R rstspreadsheet id --id`" \
		tkf.bitbucket.org/rstspreadsheet-doc

update-thermo-chaos-ja:
	hg -R tkf.bitbucket.org addremove \
		tkf.bitbucket.org/thermo-chaos-ja
	hg -R tkf.bitbucket.org ci -m \
		"thermo-chaos-ja/`hg -R thermo-chaos-ja id --id`" \
		tkf.bitbucket.org/thermo-chaos-ja


## pull

pull-railgun:
	hg -R railgun/ pull -u

pull-railgun-doc-ja:
	hg -R railgun-doc-ja/ pull -u

pull-neorg:
	hg -R neorg/ pull -u

pull-rstspreadsheet:
	hg -R rstspreadsheet/ pull -u

pull-thermo-chaos-ja:
	hg -R thermo-chaos-ja/ pull -u

pull-all: pull-railgun pull-railgun-doc-ja pull-neorg pull-rstspreadsheet