Check for non existent directories when building 'book'.

This commit is contained in:
Amar Takhar 2016-01-15 23:45:50 -05:00 committed by Amar Takhar
parent 5daabd23cf
commit f4defea480

View File

@ -1,5 +1,5 @@
from sys import path from sys import path
from os.path import abspath from os.path import abspath, exists
path.append(abspath('../common/')) path.append(abspath('../common/'))
from waf import cmd_configure, cmd_build from waf import cmd_configure, cmd_build
@ -13,7 +13,6 @@ def build(ctx):
"user", "user",
"rtemsconfig", "rtemsconfig",
"shell", "shell",
"commands",
"ada_user", "ada_user",
"bsp_howto", "bsp_howto",
"c_user", "c_user",
@ -28,6 +27,11 @@ def build(ctx):
"relnotes" "relnotes"
] ]
p = ctx.path.parent.abspath()
for dir in dirs:
if not exists("%s/%s" % (p, dir)):
ctx.fatal("Directory does not exist: %s/%s" % (p, dir))
for dir in dirs: for dir in dirs:
files = ctx.path.parent.find_node(dir).ant_glob("**/*.rst") files = ctx.path.parent.find_node(dir).ant_glob("**/*.rst")
files = [x for x in files if x.name.find("/build/") == -1] files = [x for x in files if x.name.find("/build/") == -1]