vulkan: Fix gen_enum_to_str in out of tree builds
authorDylan Baker <dylan@pnwbakers.com>
Thu, 23 Feb 2017 00:37:10 +0000 (16:37 -0800)
committerDylan Baker <dylan@pnwbakers.com>
Thu, 23 Feb 2017 01:08:52 +0000 (17:08 -0800)
In some configurations the util directory is created when building out
of tree, but not others. This patch ensures that it's created.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-and-Tested-by: Mike Lothian <mike@fireburn.co.uk>
src/vulkan/Makefile.am

index fa72d63d65fbab26237073455416f9ce8ee094fc..5cdffbf901e6e2410bb9eaeeeb1f707289112dc1 100644 (file)
@@ -5,6 +5,9 @@ noinst_LTLIBRARIES = libvulkan_wsi.la libvulkan_util.la
 vulkan_includedir = $(includedir)/vulkan
 vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
 
+MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
+
 EXTRA_DIST = \
        util/gen_enum_to_str.py
 
@@ -13,7 +16,8 @@ BUILT_SOURCES = \
        util/vk_enum_to_str.h
 
 util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py $(vulkan_api_xml)
-       $(AM_V_GEN)$(PYTHON2) $(srcdir)/util/gen_enum_to_str.py
+       $(MKDIR_GEN)
+       $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py
 
 libvulkan_util_la_SOURCES = $(VULKAN_UTIL_FILES)