Commit c51cdd4e authored by Lev Walkin's avatar Lev Walkin

-pdu=auto support

parent 0f2c2721
#!/bin/sh
if [ -z "$ASN1PDU" \
if test -z "$ASN1PDU" \
-o -z "$ASN1MODULES" \
-o -z "$PROGNAME" \
]; then
; then
echo "ASN1CMDOPTS=\"$ASN1CMDOPTS\""
echo "ASN1MODULES=\"$ASN1MODULES\""
echo "ASN1PDU=\"$ASN1PDU\""
......@@ -12,18 +12,29 @@ if [ -z "$ASN1PDU" \
exit
fi
ASN1PDU=`echo "$ASN1PDU" | tr - _`
../../asn1c/asn1c -S ../../skeletons ${ASN1CMDOPTS} ${ASN1MODULES} || exit $?
if [ ! -f Makefile.am.sample ]; then
if test ! -f Makefile.am.sample ; then
echo "Makefile.am.sample is missing"
exit 1
fi
ASN1PDU=`echo "$ASN1PDU" | tr - _`
EXTRA_CFLAGS=""
if test -f config.h ; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_CONFIG_H"
fi
FIXEDPDU=`echo "[$ASN1PDU]" | sed -e "s/.*-pdu=auto.*//"`
if test "$FIXEDPDU" ; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -DASN_PDU_COLLECTION"
fi
set -x
cat Makefile.am.sample \
| sed -e "s/^CFLAGS.*/CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=${ASN1PDU}/" \
| sed -e "s/^CFLAGS.*/CFLAGS += -I. $EXTRA_CFLAGS -DPDU=${ASN1PDU}/" \
| sed -e "s/^all: /all: ${ASN1PDU}.c /" \
| sed -e "s/progname/${PROGNAME}/" \
> Makefile.$$
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment