diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-04-05 22:08:41 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-04-05 22:40:51 +0000 |
commit | c5fab448d4260594a876a2d29339156e45bfd379 (patch) | |
tree | c3cfa6069cddf2535ad1fe92cdf3a0f611e13351 /GNUmakefile | |
parent | 7f87cbc2e5289f328c3278a991519068d8747374 (diff) | |
download | mahoro-c5fab448d4260594a876a2d29339156e45bfd379.tar.gz |
tree reorganization + various maint fixes v0.4
Using an ext/ directory is easier to grok for RubyGems
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..9fb82f5 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,63 @@ +# maintainer jobs here, not needed for normal users +all:: + +.ri/created.rid: ext/mahoro/mahoro.c lib/mahoro/thread_safe.rb + rdoc --ri -o $(@D) $^ + +order = +order += Mahoro +order += Mahoro.new +order += Mahoro\#file +order += Mahoro\#buffer +order += Mahoro\#flags= +order += Mahoro\#valid? +order += Mahoro\#compile +order += Mahoro.compile +order += Mahoro::ThreadSafe + +www/API: .ri/created.rid + ( \ + for i in $(order); \ + do \ + ri --no-standard-docs -T -d .ri -w 80 "$$i" \ + | col -b \ + | grep -vF $(CURDIR)/.ri; \ + done \ + ) > $@ + +www/API.gz: www/API + gzip < $< > $@ + touch -r $< $@ + +www/README.gz: README + install -p -m 644 README www/ + gzip < $< > $@ + touch -r $< $@ + +all:: www/API.gz www/README.gz +clean: + $(RM) www/* + +ifneq ($(VERSION),) +gem := mahoro-$(VERSION).gem +$(gem): $(shell git ls-files) + VERSION=$(VERSION) gem build mahoro.gemspec + +tgz := mahoro-$(VERSION).tar.gz +$(tgz): $(shell git ls-files) + git archive --format=tar --prefix=mahoro-$(VERSION)/ HEAD | \ + gzip -9 > $@ +else +gem tgz: + @echo >&2 error VERSION not defined + @false +endif + +package: $(gem) $(tgz) + +RSYNC = rsync +publish_doc: all + $(RSYNC) --delete --exclude .gitignore -av \ + www/ dcvr:/srv/bogomips/mahoro/ + +.PHONY: publish_doc package |