From 28060bb52dd75c398ee90a8ab679a024814f4441 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Mon, 8 May 2017 13:15:17 +0100 Subject: Makefile: Add rules to build and install docs --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4020cc9..8d8d316 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +PREFIX ?= /usr +CP := cp -r +RM := rm -rf + .PHONY: all all: lua-5.1-try lua-5.2-try @@ -6,6 +10,15 @@ include findlua.mk .PHONY: install install: lua-5.1-try-install lua-5.2-try-install +.PHONY: install-doc +install-doc: doc + $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/doc/luxio + $(CP) doc/* $(DESTDIR)$(PREFIX)/share/doc/luxio + +.PHONY: doc +doc: + ldoc . + CFLAGS ?= -O2 -Wall INSTALL := /usr/bin/install @@ -13,7 +26,7 @@ LUALIBS := $(patsubst %,luxio/%.lua, event simple subprocess) .PHONY: clean clean: - $(RM) *.so *.o luxio_constants.inc luxio-5.1 luxio-5.2 + $(RM) *.so *.o luxio_constants.inc luxio-5.1 luxio-5.2 doc luxio_constants.inc: luxio_constants.inc.in const-proc.lua $(LUA_REPL) ./const-proc.lua < $^ > $@ -- cgit v1.2.1