configure: fix ion-c submodule update
[awesomized/ext-ion] / docs / Makefile
1 PHP ?= php
2 COMPOSER ?= composer
3 TAG := $(shell (git describe --tags --exact-match --match=v[1-9]* || echo v0.0) | cut -d. -f-2 2>/dev/null)
4
5 .PHONY: all
6 all: latest
7
8 .PHONY: clean
9 clean:
10 -rm -rf latest src vendor composer.*
11
12 vendor/%:
13 $(COMPOSER) require m6w6/mdref:dev-master
14
15 src: ../ion.stub.php | vendor/bin/stub2ref
16 mkdir -p $@ && cd $@ && $(PHP) ../$| ion ../$^
17 touch $@
18
19 $(TAG): src | vendor/bin/ref2html
20 mkdir -p $@
21 $(PHP) $| $@ $^
22 touch $@
23
24 latest: $(TAG)
25 -unlink latest 2>/dev/null
26 ln -s "$(TAG)/" latest
27 touch $@