diff --git a/Makefile b/Makefile index 712e08b..4704613 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ -MODULES = $(shell find . -maxdepth 1 -mindepth 1 -type d) +MODULES = $(shell find */manifests/init.pp | sed -e 's/^\([^\/]*\).*/\1/') +MANIFESTS = $(shell find . -name \*.pp) all: puppet-modules.tar.gz puppet-modules.tar.gz: $(MODULES) umask 022 ; tar zcvf $@ --owner=root --group=root \ - --mode g-w,o=g --exclude=.git $^ + --mode g-w,o=g --exclude=.git --exclude=rdoc $^ check: @which puppet > /dev/null 2>&1 || ( \ @@ -20,14 +21,10 @@ check: "line $${errors}" 1>&2 ; \ done -rdoc: - mkdir .$$$$ && \ - rm -rf rdoc ; \ - find . -name \*.pp | egrep -v "^doc\.pp" | sed -e 's/^\(.*\)/import "\1"/' > doc.pp ; \ +rdoc: $(MANIFESTS) + mkdir .$$$$ ; \ puppetdoc --mode rdoc --outputdir rdoc --modulepath . --manifestdir .$$$$ ; \ rmdir .$$$$ -.PHONY: rdoc - clean: rm -rf puppet-modules.tar.gz rdoc