mahoro.git  about / heads / tags
Ruby interface to libmagic
blob 6ebd5836935d3d49877bc09bfbe8064f36547882 1214 bytes (raw)
$ git show HEAD:GNUmakefile	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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) --exclude .gitignore -av \
		www/ yhbt.net:/srv/yhbt/mahoro/

.PHONY: publish_doc package

git clone https://yhbt.net/mahoro.git