X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2FMakefile;h=63ce8561e617572c604c5a04ede673db407dd4d4;hb=485f776eaf82a2acd6f5fb3e2a8fd46e034f4522;hp=ddbea7b658fba48e8ea451cbbe0f3d570817d59c;hpb=f27d5e87d6a39a1d4dae84a46fdbfd162b33eade;p=awesomized%2Fext-ion diff --git a/docs/Makefile b/docs/Makefile index ddbea7b..63ce856 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,27 +1,44 @@ PHP ?= php COMPOSER ?= composer -TAG := $(shell (git describe --tags --exact-match --match=v[1-9]* || echo v0.0) | cut -d. -f-2 2>/dev/null) +TAG := $(shell (git describe --tags --exact-match --match=v[1-9]* 2>/dev/null || echo v0.0) | cut -d. -f-2) -.PHONY: all -all: latest +# --- -.PHONY: clean -clean: - -rm -rf latest src vendor composer.* +SPECIAL_SRC := src/ion/\\\:\\\ Security.md src/ion/\\\:\\\ Contributing.md src/ion.md -vendor/%: - $(COMPOSER) require m6w6/mdref:dev-master +.PHONY: all +all: latest -src: ../ion.stub.php | vendor/bin/stub2ref - mkdir -p $@ && cd $@ && $(PHP) ../$| ion ../$^ +latest: $(TAG) + -unlink $@ 2>/dev/null + ln -s "$(TAG)/" $@ touch $@ -$(TAG): src | vendor/bin/ref2html +$(TAG): markdown | vendor/bin/ref2html mkdir -p $@ - $(PHP) $| $@ $^ + $(PHP) $| ext-ion/$@ src touch $@ -latest: $(TAG) - -unlink latest 2>/dev/null - ln -s "$(TAG)/" latest - touch $@ +.PHONY: markdown +markdown: src/ion.stub.php $(SPECIAL_SRC) | vendor/bin/stub2ref + $(PHP) $| ion $< src + +src src/ion: + -mkdir -p $@ +src/ion.stub.php: ../ion.stub.php | src + -test -e $@ || ln $^ $@ +src/ion.md: ../README.md | src + -test -e $@ || ln $^ $@ +src/ion/\\\:\\\ Security.md: ../SECURITY.md | src/ion + -test -e $@ || ln $^ $@ +src/ion/\\\:\\\ Contributing.md: ../CONTRIBUTING.md | src/ion + -test -e $@ || ln $^ $@ + +vendor/%: + COMPOSER= $(COMPOSER) require m6w6/mdref:dev-master + +.PHONY: clean +clean: + -rm -rf latest src vendor composer.* + +