On Wed, Feb 15, 2017 at 9:49 AM, Aleksander Morgado
<[email protected]> wrote:
> Worst case, we just add a custom mkdir step in those enums generation rules.

Could you test the attached patch?

-- 
Aleksander
https://aleksander.es
From 56d0c49dc80a66bb606b5ecea94c1ecdbb046ed6 Mon Sep 17 00:00:00 2001
From: Aleksander Morgado <[email protected]>
Date: Wed, 15 Feb 2017 10:10:51 +0100
Subject: [PATCH] build: make sure subdir exists before running glib-mkenums

Reported-by: Colin Helliwell <[email protected]>
---
 configure.ac        |  1 +
 plugins/Makefile.am | 22 +++++++++++++---------
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3ac71efc..0ad35ae5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,7 @@ dnl Required programs
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
+AC_PROG_MKDIR_P
 
 dnl Initialize libtool
 LT_PREREQ([2.2])
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 86026fd5..596866b7 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -900,17 +900,21 @@ UBLOX_ENUMS_GENERATED = \
 	$(NULL)
 
 ublox/mm-ublox-enums-types.h: Makefile.am $(UBLOX_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-template.h
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"mm-modem-helpers-ublox.h\"\n#ifndef __MM_UBLOX_ENUMS_TYPES_H__\n#define __MM_UBLOX_ENUMS_TYPES_H__\n" \
-		--template $(top_srcdir)/build-aux/mm-enums-template.h \
-		--ftail "#endif /* __MM_UBLOX_ENUMS_TYPES_H__ */\n" \
-		$(UBLOX_ENUMS_INPUTS) > $@
+	$(AM_V_GEN) \
+		$(MKDIR_P) ublox; \
+		$(GLIB_MKENUMS) \
+			--fhead "#include \"mm-modem-helpers-ublox.h\"\n#ifndef __MM_UBLOX_ENUMS_TYPES_H__\n#define __MM_UBLOX_ENUMS_TYPES_H__\n" \
+			--template $(top_srcdir)/build-aux/mm-enums-template.h \
+			--ftail "#endif /* __MM_UBLOX_ENUMS_TYPES_H__ */\n" \
+			$(UBLOX_ENUMS_INPUTS) > $@
 
 ublox/mm-ublox-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-template.c ublox/mm-ublox-enums-types.h
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"mm-ublox-enums-types.h\"" \
-		--template $(top_srcdir)/build-aux/mm-enums-template.c \
-		$(UBLOX_ENUMS_INPUTS) > $@
+	$(AM_V_GEN) \
+		$(MKDIR_P) ublox; \
+		$(GLIB_MKENUMS) \
+			--fhead "#include \"mm-ublox-enums-types.h\"" \
+			--template $(top_srcdir)/build-aux/mm-enums-template.c \
+			$(UBLOX_ENUMS_INPUTS) > $@
 
 libhelpers_ublox_la_SOURCES = \
 	ublox/mm-modem-helpers-ublox.c \
-- 
2.11.1

_______________________________________________
ModemManager-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Reply via email to