waf: auto-create include paths if needed
authorAndrew Tridgell <tridge@samba.org>
Fri, 4 Mar 2011 06:11:33 +0000 (17:11 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 15 Mar 2011 01:22:20 +0000 (12:22 +1100)
buildtools/wafsamba/samba_headers.py

index 95d1e6f..a03254e 100644 (file)
@@ -136,6 +136,13 @@ def PUBLIC_HEADERS(bld, public_headers, header_path=None, public_headers_install
 
         header_map[src_path] = target_path
 
+        build_dir = os.path.join(bld.bldnode.abspath(),
+                                 'default',
+                                 bld.env.build_public_headers,
+                                 inst_path)
+        if not os.path.exists(build_dir):
+            mkdir_p(build_dir)
+
         t = bld.SAMBA_GENERATOR('HEADER_%s/%s/%s' % (relpath2, inst_path, inst_name),
                                 group='headers',
                                 rule=create_public_header,