Added check-all to Makefile which makes syntax check to all .pp files.
This commit is contained in:
parent
8562ddec5b
commit
4ce58ed21a
1 changed files with 15 additions and 0 deletions
15
Makefile
15
Makefile
|
@ -21,6 +21,21 @@ check:
|
||||||
"line $${errors}" 1>&2 ; \
|
"line $${errors}" 1>&2 ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
check-all:
|
||||||
|
@which puppet > /dev/null 2>&1 || ( \
|
||||||
|
echo "puppet not installed, cannot perform syntax checking" \
|
||||||
|
1>&2 ; exit 1 )
|
||||||
|
@for name in `find . -name \*.pp` ; do \
|
||||||
|
echo -n "$${name}: " ; \
|
||||||
|
errors="`puppet --color=false --parseonly --ignoreimport $${name}`" ; \
|
||||||
|
if [ $$? -eq 0 ]; then \
|
||||||
|
echo "ok" ; \
|
||||||
|
else \
|
||||||
|
echo "error" ; \
|
||||||
|
echo "$${errors}" 1>&2 ; \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
|
||||||
rdoc: $(MANIFESTS)
|
rdoc: $(MANIFESTS)
|
||||||
mkdir .$$$$ ; \
|
mkdir .$$$$ ; \
|
||||||
puppetdoc --mode rdoc --outputdir rdoc --modulepath . --manifestdir .$$$$ ; \
|
puppetdoc --mode rdoc --outputdir rdoc --modulepath . --manifestdir .$$$$ ; \
|
||||||
|
|
Loading…
Add table
Reference in a new issue