diff --git a/build.sh b/build.sh
index 2c1570f5..4fc65b0d 100755
--- a/build.sh
+++ b/build.sh
@@ -41,6 +41,7 @@ case "$1" in
    man)
       set -e
       "$0" mandirs
+      "$0" mangen
       "$0" mantype
       "$0" man1
       "$0" man7
@@ -61,7 +62,7 @@ case "$1" in
    ;;
 
    mantype)
-	   for mansrc in ${MAN7TYPESRC}; do
+	   for mansrc in conf/type/*/man.text; do
          dst="$(echo $mansrc | sed -e 's;conf/;cdist-;'  -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"
          ln -sf "../../../$mansrc" "$dst"
       done
@@ -83,7 +84,7 @@ case "$1" in
    ;;
 
    man7)
-      for man in cdist.text cdist-best-practise.text cdist-hacker.text         \
+      for man in cdist.text cdist-best-practice.text cdist-hacker.text         \
       cdist-quickstart.text cdist-reference.text cdist-stages.text             \
       cdist-type.text
          do