[PATCH] libosmocore[master]: fix build: generate gsm0503.h to builddir, not srcdir

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Mar 7 21:17:04 UTC 2017


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1996

to look at the new patch set (#2).

fix build: generate gsm0503.h to builddir, not srcdir

gsm/gsm0503.h: generate to builddir, not srcdir
coding: add builddir include path to find generated header.
conv_gen.py: create parent dirs to be able to write to builddir include.

Change-Id: Ia773ef5893a2018feb416061aefcf51835df18d2
---
M include/Makefile.am
M src/coding/Makefile.am
M utils/conv_gen.py
3 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/96/1996/2

diff --git a/include/Makefile.am b/include/Makefile.am
index f8b1f8f..63c94df 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -151,6 +151,6 @@
 
 osmocom/gsm/gsm0503.h:
 	$(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py gen_header gsm \
-		--target-path $(top_srcdir)/include/osmocom/gsm/
+		--target-path $(top_builddir)/include/osmocom/gsm/
 
 CLEANFILES = osmocom/gsm/gsm0503.h
diff --git a/src/coding/Makefile.am b/src/coding/Makefile.am
index 5a055c8..cbdcf47 100644
--- a/src/coding/Makefile.am
+++ b/src/coding/Makefile.am
@@ -3,7 +3,10 @@
 # documentation before making any modification
 LIBVERSION = 0:0:0
 
-AM_CPPFLAGS = -I$(top_srcdir)/include $(TALLOC_CFLAGS)
+AM_CPPFLAGS = \
+	-I"$(top_srcdir)/include" \
+	-I"$(top_builddir)/include" \
+	$(TALLOC_CFLAGS)
 AM_CFLAGS = -Wall
 
 lib_LTLIBRARIES = libosmocoding.la
diff --git a/utils/conv_gen.py b/utils/conv_gen.py
index 1ffeb3f..0bf82c5 100644
--- a/utils/conv_gen.py
+++ b/utils/conv_gen.py
@@ -363,6 +363,8 @@
 
 def generate_header(codes, path, prefix, name, description = None):
 	# Open a new file for writing
+	if not os.isdir(path):
+		os.makedirs(path)
 	f = open(os.path.join(path, name), 'w')
 
 	# Print license and includes

-- 
To view, visit https://gerrit.osmocom.org/1996
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia773ef5893a2018feb416061aefcf51835df18d2
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list