From c5fab448d4260594a876a2d29339156e45bfd379 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 5 Apr 2013 22:08:41 +0000 Subject: tree reorganization + various maint fixes Using an ext/ directory is easier to grok for RubyGems --- GNUmakefile | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 GNUmakefile (limited to 'GNUmakefile') 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 -- cgit v1.2.3-24-ge0c7