From fd5db064cb094ed5b0837dbdf7d5f9c2ed7d9819 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 16 Dec 2015 13:07:10 +0100 Subject: [PATCH] Re-add the 'regen' targets lost in the automake transition This might need a lot of cleanup for out-of-source-tree builds and the like, but let's not spend time on this now. The old Makefile also didn't support that. But loosing the ability to regenerate the C source is not an option either. --- src/hnbap/Makefile.am | 7 +++++++ src/ranap/Makefile.am | 9 +++++++++ src/rua/Makefile.am | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/src/hnbap/Makefile.am b/src/hnbap/Makefile.am index 920b8fcd..a9e8163c 100644 --- a/src/hnbap/Makefile.am +++ b/src/hnbap/Makefile.am @@ -238,3 +238,10 @@ noinst_LIBRARIES=libosmo-asn1-hnbap.a libosmo_asn1_hnbap_a_SOURCES=$(ASN_MODULE_SOURCES) include_HEADERS = $(ASN_MODULE_INC) libosmo_asn1_hnbap_a_LIBADD=$(ASN1C_LDADD) + +regen: regenerate-from-asn1-source + +regenerate-from-asn1-source: + asn1c -gen-PER -fnative-types ../../asn1/hnbap/HNBAP-CommonDataTypes.asn ../../asn1/hnbap/HNBAP-Constants.asn ../../asn1/hnbap/HNBAP-IEs.asn ../../asn1/hnbap/HNBAP-PDU.asn +# remove the local copy of the runtime code + @rm ANY.* BOOLEAN.* INTEGER.* NativeEnumerated.* NativeInteger.* OBJECT_IDENTIFIER.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.* diff --git a/src/ranap/Makefile.am b/src/ranap/Makefile.am index 59575ed6..ad860200 100644 --- a/src/ranap/Makefile.am +++ b/src/ranap/Makefile.am @@ -1044,3 +1044,12 @@ noinst_LIBRARIES=libosmo-asn1-ranap.a libosmo_asn1_ranap_a_SOURCES=$(ASN_MODULE_SRC) include_HEADERS=$(ASN_MODULE_INC) libosmo_asn1_ranap_a_LIBADD=$(ASN1C_LDADD) + +regen: regenerate-from-asn1-source + +regenerate-from-asn1-source: + ASN1C_PREFIX="RANAP_" asn1c -gen-PER ../../asn1/ranap/RANAP-CommonDataTypes.asn ../../asn1/ranap/RANAP-Constants.asn ../../asn1/ranap/RANAP-IEs.asn ../../asn1/ranap/RANAP-PDU.asn + @rm ANY.* BOOLEAN.* INTEGER.* NativeEnumerated.* NativeInteger.* NULL.* OBJECT_IDENTIFIER.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.* +# some fixups in erroneous code that asn1c generates + sed -i '6i#include ' RANAP_ChosenEncryptionAlgorithm.h RANAP_ChosenIntegrityProtectionAlgorithm.h RANAP_IMSI.h RANAP_PLMNidentity.h RANAP_RAB-ReleaseFailedList.c + sed -i 's/Member/MemberA/' RANAP_LA-LIST.[ch] RANAP_SDU-Parameters.[ch] RANAP_RABParametersList.[ch] RANAP_AuthorisedPLMNs.[ch] diff --git a/src/rua/Makefile.am b/src/rua/Makefile.am index 26902528..c93b8012 100644 --- a/src/rua/Makefile.am +++ b/src/rua/Makefile.am @@ -79,3 +79,10 @@ libosmo_asn1_rua_a_SOURCES=$(ASN_MODULE_SOURCES) include_HEADERS=$(ASN_MODULES_INC) libosmo_asn1_rua_a_LIBADD=$(ASN1C_LDADD) +regen: regenerate-from-asn1-source + +regenerate-from-asn1-source: + ASN1C_PREFIX="RUA_" asn1c -gen-PER ../../asn1/rua/RUA-CommonDataTypes.asn ../../asn1/rua/RUA-Constants.asn ../../asn1/rua/RUA-IEs.asn ../../asn1/rua/RUA-PDU.asn +# remove the local copy of the runtime code + @rm ANY.* BOOLEAN.* INTEGER.* NativeEnumerated.* NativeInteger.* OBJECT_IDENTIFIER.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.* +