From 861d9d2ebf81c7830277bca719f311191abc468a Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Sat, 23 Oct 2021 01:01:04 +0200 Subject: [PATCH] src/*/Makefile.am: Copy back to srcdir the generated .c files from ASN Change-Id: I203a25a8059218bb9fd6d10cbc028a296d347382 --- src/hnbap/Makefile.am | 4 ++++ src/ranap/Makefile.am | 4 ++++ src/rua/Makefile.am | 4 ++++ src/sabp/Makefile.am | 5 ++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/hnbap/Makefile.am b/src/hnbap/Makefile.am index c4a8c296..7835bcdc 100644 --- a/src/hnbap/Makefile.am +++ b/src/hnbap/Makefile.am @@ -248,3 +248,7 @@ regenerate-from-asn1-source: -rm ANY.* BOOLEAN.* INTEGER.* NativeEnumerated.* NativeInteger.* OBJECT_IDENTIFIER.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.* # change include style to `#include ' $(top_srcdir)/move-asn1-header-files.sh osmocom/hnbap $(ASN_MODULE_INC) +# Finally copy *.c from buildir to srcdir: + if test "$(realpath $(CURDIR))" != "$(realpath $(top_srcdir)/src/hnbap)"; then \ + cp *.c $(top_srcdir)/src/hnbap/; \ + fi diff --git a/src/ranap/Makefile.am b/src/ranap/Makefile.am index 0bb36a0c..4ba3a79d 100644 --- a/src/ranap/Makefile.am +++ b/src/ranap/Makefile.am @@ -1188,3 +1188,7 @@ regenerate-from-asn1-source: sed -i 's/Member/MemberN/' RANAP_RABDataVolumeReport.[ch] # change include style to `#include ' $(top_srcdir)/move-asn1-header-files.sh osmocom/ranap $(ASN_MODULE_INC) +# Finally copy *.c from buildir to srcdir: + if test "$(realpath $(CURDIR))" != "$(realpath $(top_srcdir)/src/ranap)"; then \ + cp *.c $(top_srcdir)/src/ranap/; \ + fi diff --git a/src/rua/Makefile.am b/src/rua/Makefile.am index 7e1d18e7..c8486390 100644 --- a/src/rua/Makefile.am +++ b/src/rua/Makefile.am @@ -86,3 +86,7 @@ regenerate-from-asn1-source: @rm ANY.* BOOLEAN.* INTEGER.* NativeEnumerated.* NativeInteger.* OBJECT_IDENTIFIER.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.* # change include style to `#include ' $(top_srcdir)/move-asn1-header-files.sh osmocom/rua $(ASN_MODULE_INC) +# Finally copy *.c from buildir to srcdir: + if test "$(realpath $(CURDIR))" != "$(realpath $(top_srcdir)/src/rua)"; then \ + cp *.c $(top_srcdir)/src/rua/; \ + fi diff --git a/src/sabp/Makefile.am b/src/sabp/Makefile.am index a30674c5..5e1b5579 100644 --- a/src/sabp/Makefile.am +++ b/src/sabp/Makefile.am @@ -145,4 +145,7 @@ regenerate-from-asn1-source: sed -i '/#include "SABP_Serial-Number.h"/a #include ' SABP_Old-Serial-Number.h SABP_New-Serial-Number.h # change include style to `#include ' $(top_srcdir)/move-asn1-header-files.sh osmocom/sabp $(ASN_MODULE_INC) - +# Finally copy *.c from buildir to srcdir: + if test "$(realpath $(CURDIR))" != "$(realpath $(top_srcdir)/src/sabp)"; then \ + cp *.c $(top_srcdir)/src/sabp/; \ + fi