-pdu=* changes


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1238 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/examples/sample.makefile.regen b/examples/sample.makefile.regen
index 5072c18..4c39f78 100755
--- a/examples/sample.makefile.regen
+++ b/examples/sample.makefile.regen
@@ -23,12 +23,14 @@
 	exit
 fi
 
+CMDOPTS="-pdu=${ASN1PDU} ${ASN1CMDOPTS} ${ASN1MODULES}"
+
 if test -x ../../asn1c/asn1c ; then
   echo "Compiling ${ASN1MODULES} using local compiler"
-  ../../asn1c/asn1c -S ../../skeletons ${ASN1CMDOPTS} ${ASN1MODULES} || exit $?
+  ../../asn1c/asn1c -S ../../skeletons ${CMDOPTS} || exit $?
 else
   echo "Compiling ${ASN1MODULES} using system compiler"
-  asn1c ${ASN1CMDOPTS} ${ASN1MODULES} || exit $?
+  asn1c ${CMDOPTS} || exit $?
 fi
 
 if test ! -f Makefile.am.sample ; then
@@ -36,15 +38,14 @@
 	exit 1
 fi
 
-ASN1DEFPDU=`echo "$ASN1PDU" | tr - _`
-CFLAGS="-DPDU=${ASN1DEFPDU}"
+EXTRA_CFLAGS=""
 if test -f config.h ; then
-	CFLAGS="-DHAVE_CONFIG_H $CFLAGS"
+	EXTRA_CFLAGS="-DHAVE_CONFIG_H $EXTRA_CFLAGS"
 fi
 
 set -x
 cat Makefile.am.sample						\
-	| sed -e "s/^CFLAGS += /CFLAGS += ${CFLAGS} /"		\
+	| sed -e "s/^CFLAGS += /CFLAGS += ${EXTRA_CFLAGS} /"	\
 	| sed -e "s/^all: /all: ${ASN1PDU}.c /"			\
 	| sed -e "s/progname/${PROGNAME}/"			\
 	> Makefile.$$