DPKG_BUILDFLAGS_EXPORT_ENVVAR code example
Example: DPKG_BUILDFLAGS_EXPORT_ENVVAR
AAA=`dpkg-buildflags --get CFLAGS`
GO2="-g -O2"
OPT3="-g3 -O3"
CFLAGS="${AAA/$GO2/$OPT3}"
export CFLAGS
LD=gcc
LDFLAGS="${CFLAGS} ${LDFLAGS}"
AR=gcc-ar
RANLIB=gcc-ranlib
echo $CFLAGS
export DEB_CFLAGS_SET=$CFLAGS
dpkg-buildflags --get CFLAGS