summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9d3e307..87f07ff 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2012-2014 Kaarle Ritvanen
+# Copyright (c) 2012-2015 Kaarle Ritvanen
# See LICENSE file for license details
ROOT_DIR := /
@@ -9,9 +9,16 @@ luadir := usr/share/lua/$(LUA_VERSION)/aconf
resdir := usr/share/aconf
augdir := $(resdir)/augeas
webdir := $(resdir)/web
+docdir := usr/share/doc/aconf
starter := usr/sbin/aconfd
-all: install
+files := $(starter)
+
+
+all: doc/index.html
+
+doc/%: aconf/model/config.ld $(shell find aconf/model -name '*.lua')
+ ldoc -f markdown -M -p aconf aconf/model
define _copy =
install -d $$(dir $$@)
@@ -50,6 +57,9 @@ $(eval $(call link,config,$(confdir)))
$(eval $(call copy,config,$(confdir),audit.json,600))
$(eval $(call copy,config,$(confdir),auth.json,600))
+$(eval $(call copy,doc,$(docdir),index.html))
+$(eval $(call copy,doc,$(docdir),ldoc.css))
+
$(eval $(call copy,.,$(resdir),LICENSE))
$(ROOT_DIR)/$(starter): run-server.sh
@@ -63,6 +73,6 @@ $(eval $(call copy,web,$(webdir),client.xhtml))
$(eval $(call rcopy,web,$(webdir),js))
-install: $(foreach f,$(files),$(ROOT_DIR)/$(f)) $(ROOT_DIR)/$(starter)
+install: $(foreach f,$(files),$(ROOT_DIR)/$(f))
.PHONY: all install