From 3d731dc450bf369cf55fea59282d289c5e7a8afa Mon Sep 17 00:00:00 2001
From: Lev Walkin <vlm@lionet.info>
Date: Wed, 11 Aug 2004 05:48:02 +0000
Subject: [PATCH] passing environment down the script

---
 asn1c/tests/Makefile.am       | 2 +-
 asn1c/tests/Makefile.in       | 5 +++--
 asn1c/tests/check-assembly.sh | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/asn1c/tests/Makefile.am b/asn1c/tests/Makefile.am
index 78cf68e3..45cdd03a 100644
--- a/asn1c/tests/Makefile.am
+++ b/asn1c/tests/Makefile.am
@@ -1,7 +1,7 @@
 
 check_SCRIPTS = check-assembly.sh
 
-TESTS_ENVIRONMENT= ./check-assembly.sh
+TESTS_ENVIRONMENT= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" ./check-assembly.sh
 
 if CPLUSPLUS_FOUND
 TESTS = check-*.c check-*.cc	## Include C++ test filed (.cc)
diff --git a/asn1c/tests/Makefile.in b/asn1c/tests/Makefile.in
index a64bc54f..17cc553a 100644
--- a/asn1c/tests/Makefile.in
+++ b/asn1c/tests/Makefile.in
@@ -159,8 +159,9 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 check_SCRIPTS = check-assembly.sh
-TESTS_ENVIRONMENT = ./check-assembly.sh
-TESTS = check-*.c*
+TESTS_ENVIRONMENT = CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" ./check-assembly.sh
+@CPLUSPLUS_FOUND_FALSE@TESTS = check-*.c
+@CPLUSPLUS_FOUND_TRUE@TESTS = check-*.c check-*.cc	## Include C++ test filed (.cc)
 EXTRA_DIST = ${check_SCRIPTS} check-*.c*
 all: all-am
 
diff --git a/asn1c/tests/check-assembly.sh b/asn1c/tests/check-assembly.sh
index 5a67ab66..d9f4afed 100755
--- a/asn1c/tests/check-assembly.sh
+++ b/asn1c/tests/check-assembly.sh
@@ -33,7 +33,7 @@ set +x
 
 # Create a Makefile for the project.
 cat > Makefile <<EOM
-COMMON_FLAGS= -I. -Wall -g -DEMIT_ASN_DEBUG
+COMMON_FLAGS= -I. -DEMIT_ASN_DEBUG
 CFLAGS=\${COMMON_FLAGS} ${CFLAGS}
 CXXFLAGS=\${COMMON_FLAGS} ${CXXFLAGS}
 SRCS=`echo *.c*`
-- 
GitLab