Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH] build: Generate and install provision.db
Date: Thu,  1 Feb 2024 14:23:33 -0600	[thread overview]
Message-ID: <20240201202350.951327-1-denkenz@gmail.com> (raw)

Run provisiontool to generate the provisioning database in binary format
from the intermediate json format.  The database will be installed in
pkgdata_DATA directory (typically /usr/share/ofono) when make install is
performed.
---
 .gitignore  | 1 +
 Makefile.am | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0cfe5283ec35..27184e16e42b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@ stamp-h1
 build-aux
 autom4te.cache
 ell
+provision.db
 
 ofono.pc
 include/ofono
diff --git a/Makefile.am b/Makefile.am
index 5221b1cca138..8517bc0309d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -207,6 +207,11 @@ statedir = $(localstatedir)/lib/ofono
 state_DATA =
 endif
 
+provision.db: provision.json
+	$(AM_V_GEN)$(srcdir)/tools/provisiontool generate \
+		--infile $< --outfile $@
+pkgdata_DATA = provision.db
+
 builtin_modules =
 builtin_sources =
 builtin_libadd =
@@ -748,7 +753,7 @@ src_ofonod_LDFLAGS = -Wl,--export-dynamic \
 
 BUILT_SOURCES = $(local_headers) $(ell_built_sources) src/builtin.h
 
-CLEANFILES = $(BUILT_SOURCES) $(rules_DATA)
+CLEANFILES = $(BUILT_SOURCES) $(rules_DATA) provision.db
 
 plugindir = $(pkglibdir)/plugins
 
@@ -901,7 +906,7 @@ test_SCRIPTS = $(test_scripts)
 endif
 
 EXTRA_DIST = src/genbuiltin plugins/ofono.rules plugins/ofono-speedup.rules \
-		tools/provisiontool \
+		tools/provisiontool provision.json \
 		unit/test-provision.json \
 		$(doc_files) $(test_scripts)
 
-- 
2.43.0


             reply	other threads:[~2024-02-01 20:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 20:23 Denis Kenzior [this message]
2024-02-01 21:40 ` [PATCH] build: Generate and install provision.db patchwork-bot+ofono

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240201202350.951327-1-denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox