diff --git a/examples/sample.makefile.regen b/examples/sample.makefile.regen index 64a3aad57ea4144478b7604e254bf1d59250c0b6..f34f0a268182f35bb9012e17bed890a9bfecdc17 100755 --- a/examples/sample.makefile.regen +++ b/examples/sample.makefile.regen @@ -34,15 +34,15 @@ fi CFLAGS="" +if test -f config.h ; then + CFLAGS="$CFLAGS -DHAVE_CONFIG_H" +fi + FIXEDPDU=`echo "[$ASN1CMDOPTS]" | sed -e "s/.*-pdu=auto.*//"` if test ! "$FIXEDPDU" ; then CFLAGS="$CFLAGS -DASN_PDU_COLLECTION" fi -if test -f config.h ; then - CFLAGS="$CFLAGS -DHAVE_CONFIG_H" -fi - set -x cat Makefile.am.sample \ | sed -e "s/^CFLAGS.*/CFLAGS +=$CFLAGS -DPDU=${ASN1DEFPDU} -I./" \ diff --git a/examples/sample.source.LDAP3/Makefile b/examples/sample.source.LDAP3/Makefile index 7fae0bd667349fd16bdea1bebd57d53c4f785a80..d75f5692bd1d3bbd2dfb49983415f17ae1fde1be 100644 --- a/examples/sample.source.LDAP3/Makefile +++ b/examples/sample.source.LDAP3/Makefile @@ -163,7 +163,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = ldap3dump -CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=LDAPMessage +CFLAGS += -DHAVE_CONFIG_H -DPDU=LDAPMessage -I. OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: LDAPMessage.c $(TARGET) @@ -188,13 +188,16 @@ regenerate-from-asn1-source: LDAPMessage.c: ../sample.makefile.regen + make regen-makefile + @touch LDAPMessage.c + make + +regen-makefile: ASN1CMDOPTS="-fcompound-names" \ ASN1MODULES="../rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1" \ ASN1PDU=LDAPMessage \ PROGNAME=ldap3dump \ ../sample.makefile.regen - @touch LDAPMessage.c - make check: ${TARGET} @if test -f ./sample-LDAPMessage-1.[db]er ; then \ diff --git a/examples/sample.source.MEGACO/Makefile b/examples/sample.source.MEGACO/Makefile index 21009c4681c15facf1f5e447048231c46e3ae001..d05f4a450be827b7c7413b4e2d57fd1d887ef0c7 100644 --- a/examples/sample.source.MEGACO/Makefile +++ b/examples/sample.source.MEGACO/Makefile @@ -285,7 +285,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = megacoDump -CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=MegacoMessage +CFLAGS += -DHAVE_CONFIG_H -DPDU=MegacoMessage -I. OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: MegacoMessage.c $(TARGET) @@ -310,13 +310,16 @@ regenerate-from-asn1-source: MegacoMessage.c: ../sample.makefile.regen + make regen-makefile + @touch MegacoMessage.c + make + +regen-makefile: ASN1CMDOPTS="-fcompound-names" \ ASN1MODULES="../rfc3525-MEDIA-GATEWAY-CONTROL.asn1" \ ASN1PDU=MegacoMessage \ PROGNAME=megacoDump \ ../sample.makefile.regen - @touch MegacoMessage.c - make check: ${TARGET} @if test -f ./sample-MegacoMessage-1.[db]er ; then \ diff --git a/examples/sample.source.MHEG5/Makefile b/examples/sample.source.MHEG5/Makefile index cd3e0b65dd8a86d2e30a047d0b5d973ae1b012f7..8eea2448c7024107fe02ff925b7dc73a026505ad 100644 --- a/examples/sample.source.MHEG5/Makefile +++ b/examples/sample.source.MHEG5/Makefile @@ -453,7 +453,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = mheg5dump -CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=InterchangedObject +CFLAGS += -DHAVE_CONFIG_H -DPDU=InterchangedObject -I. OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: InterchangedObject.c $(TARGET) @@ -478,13 +478,16 @@ regenerate-from-asn1-source: InterchangedObject.c: ../sample.makefile.regen + make regen-makefile + @touch InterchangedObject.c + make + +regen-makefile: ASN1CMDOPTS="-fcompound-names" \ ASN1MODULES="../ISO13522-MHEG-5.asn" \ ASN1PDU=InterchangedObject \ PROGNAME=mheg5dump \ ../sample.makefile.regen - @touch InterchangedObject.c - make check: ${TARGET} @if test -f ./sample-InterchangedObject-1.[db]er ; then \ diff --git a/examples/sample.source.PKIX1/Makefile b/examples/sample.source.PKIX1/Makefile index 20387969957668246bc697ff7b2d51fe04924fb3..c1846abc27734a814653fc75abca75d45181c3f4 100644 --- a/examples/sample.source.PKIX1/Makefile +++ b/examples/sample.source.PKIX1/Makefile @@ -345,7 +345,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = x509dump -CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=Certificate +CFLAGS += -DHAVE_CONFIG_H -DPDU=Certificate -I. OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: Certificate.c $(TARGET) @@ -370,13 +370,16 @@ regenerate-from-asn1-source: Certificate.c: ../sample.makefile.regen + make regen-makefile + @touch Certificate.c + make + +regen-makefile: ASN1CMDOPTS="" \ ASN1MODULES="../rfc3280-*.asn1" \ ASN1PDU=Certificate \ PROGNAME=x509dump \ ../sample.makefile.regen - @touch Certificate.c - make check: ${TARGET} @if test -f ./sample-Certificate-1.[db]er ; then \ diff --git a/examples/sample.source.RRC/Makefile b/examples/sample.source.RRC/Makefile index f447926157e27d8514b3d615a1b37544dd5e6194..db38e980f6752769bee39b82f31f34fdce9f27a2 100644 --- a/examples/sample.source.RRC/Makefile +++ b/examples/sample.source.RRC/Makefile @@ -4740,10 +4740,10 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = rrc-dump -CFLAGS += -I. -DHAVE_CONFIG_H -DASN_PDU_COLLECTION -DPDU=DL_DCCH_Message +CFLAGS += -DHAVE_CONFIG_H -DASN_PDU_COLLECTION -DPDU=DL_DCCH_Message -I. OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} -all: DL_DCCH_Message.c $(TARGET) +all: DL-DCCH-Message.c $(TARGET) $(TARGET): ${OBJS} $(CC) $(CFLAGS) -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS) @@ -4764,18 +4764,21 @@ regenerate-from-asn1-source: ../../asn1c/asn1c -S ../../skeletons -fcompound-names -pdu=auto -gen-PER ../rrc.asn1 -DL_DCCH_Message.c: ../sample.makefile.regen +DL-DCCH-Message.c: ../sample.makefile.regen + make regen-makefile + @touch DL-DCCH-Message.c + make + +regen-makefile: ASN1CMDOPTS="-fcompound-names -pdu=auto -gen-PER" \ ASN1MODULES="../rrc.asn1" \ - ASN1PDU=DL_DCCH_Message \ + ASN1PDU=DL-DCCH-Message \ PROGNAME=rrc-dump \ ../sample.makefile.regen - @touch DL_DCCH_Message.c - make check: ${TARGET} - @if test -f ./sample-DL_DCCH_Message-1.[db]er ; then \ - for f in ./sample-DL_DCCH_Message-*.[db]er; do \ + @if test -f ./sample-DL-DCCH-Message-1.[db]er ; then \ + for f in ./sample-DL-DCCH-Message-*.[db]er; do \ echo "Recoding $$f into XER and back..."; \ ./${TARGET} -iber -oxer $$f > ./.tmp.1.$$ || exit 2; \ ./${TARGET} -ixer -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \ diff --git a/examples/sample.source.TAP3/Makefile b/examples/sample.source.TAP3/Makefile index 65e4a533047143ad8628ed621e314127e6937d56..74586888726337b2de59ae2eede03c9d568241bd 100644 --- a/examples/sample.source.TAP3/Makefile +++ b/examples/sample.source.TAP3/Makefile @@ -679,7 +679,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = tap3dump -CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=DataInterChange +CFLAGS += -DHAVE_CONFIG_H -DPDU=DataInterChange -I. OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: DataInterChange.c $(TARGET) @@ -704,13 +704,16 @@ regenerate-from-asn1-source: DataInterChange.c: ../sample.makefile.regen + make regen-makefile + @touch DataInterChange.c + make + +regen-makefile: ASN1CMDOPTS="" \ ASN1MODULES="../tap3.asn1" \ ASN1PDU=DataInterChange \ PROGNAME=tap3dump \ ../sample.makefile.regen - @touch DataInterChange.c - make check: ${TARGET} @if test -f ./sample-DataInterChange-1.[db]er ; then \