From c761d15a0a9e44e965445f61f748ef5a123696b4 Mon Sep 17 00:00:00 2001
From: Steve Bennett <steveb@workware.net.au>
Date: Thu, 14 Nov 2019 09:40:30 +1000
Subject: build: Fix out-of-tree build with json ext

If building out-of-tree, the jsmn/ directory may not exist.
So create it during configure

Signed-off-by: Steve Bennett <steveb@workware.net.au>
---
 auto.def | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'auto.def')

diff --git a/auto.def b/auto.def
index 893c93a..615f157 100644
--- a/auto.def
+++ b/auto.def
@@ -468,6 +468,8 @@ if {$jimregexp || [opt-bool jim-regexp]} {
 foreach mod $extinfo(static-c) {
     if {[dict exists $extdb info $mod extrasrcs]} {
         foreach src [dict get $extdb info $mod extrasrcs] {
+            # In case we are building out-of-tree and $src is in a subdir
+            file mkdir [file dirname $src]
             lappend extra_objs {*}[file rootname $src].o
         }
     }
-- 
cgit v1.1

