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.
This commit is contained in:
Harald Welte 2015-12-16 13:07:10 +01:00
parent 3297dbaaa7
commit fd5db064cb
3 changed files with 23 additions and 0 deletions

View File

@ -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.*

View File

@ -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 <constr_CHOICE.h>' 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]

View File

@ -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.*