Makefile: Add generation of Vala documentation

This commit is contained in:
Adrien Plazas 2014-12-04 19:45:41 +01:00
parent eeaeca9982
commit 00f956dcfd
2 changed files with 20 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
out
doc*
*-internal.h
# Object files

View File

@ -14,6 +14,7 @@ SRC_DIR = retro
OUT_DIR = out
VAPI_DIR = vapi
DOC_DIR = doc
NAME=Retro
DESC=GObject based libretro wrapper
@ -76,6 +77,7 @@ OUT= \
$(NULL)
VALAC_OPTIONS= --save-temps
VALADOC_OPTIONS=
all: $(OUT) $(OUT_DIR)/$(DEPS) $(OUT_DIR)/$(TYPELIB) $(OUT_DIR)/$(PKGCONF)
@ -125,8 +127,23 @@ install:
install $(OUT_DIR)/$(DEPS) $(DEPS_DIR)
install $(OUT_DIR)/$(VAPI) $(DEPS_DIR)
doc: doc-vala
doc-vala: $(DOC_DIR)-vala/$(PKGNAME)
$(DOC_DIR)-vala/$(PKGNAME): $(SRC)
rm -Rf $@
mkdir -p $(@D)
valadoc \
-b $(<D) -o $@ \
--package-name=$(LIBNAME) --package-version=$(VERSION) \
$(PKG:%=--pkg=%) \
$^ \
$(VALADOC_OPTIONS) \
$(NULL)
clean:
rm -Rf $(OUT_DIR) $(SRC_DIR)/$(LIBNAME)-internal.h
rm -Rf $(OUT_DIR) $(SRC_DIR)/$(LIBNAME)-internal.h $(DOC_DIR)
.PHONY: all install clean
.PHONY: all install clean doc doc-vala