summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2012-08-18 03:30:13 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2012-08-18 03:30:13 +0200
commit765adcc5aa9e7456cb35f906b6f33381feb92cd7 (patch)
treeaea2ca8f0b4e3755cf7d89ffb0576f82ebc1945c
parent63ef59492469c08e8d3c7d8a186e4a765eae87b0 (diff)
downloadipecamera-765adcc5aa9e7456cb35f906b6f33381feb92cd7.tar.gz
ipecamera-765adcc5aa9e7456cb35f906b6f33381feb92cd7.tar.bz2
ipecamera-765adcc5aa9e7456cb35f906b6f33381feb92cd7.tar.xz
ipecamera-765adcc5aa9e7456cb35f906b6f33381feb92cd7.zip
Don't use gawk for gcc detection
-rw-r--r--driver/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/Makefile b/driver/Makefile
index ac4a14c..92fa913 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -10,7 +10,7 @@ EXTRA_CFLAGS += -I$(M)/..
default:
@KERNEL_GCC_VERSION=`cat /proc/version | head -n1 | cut -d " " -f 7` ;\
- GCC_VERSION=`$(CC) --version | head -n 1 | awk 'BEGIN { FPAT = "([^[:space:]]*)|(\\\\([^)]+\\\\))" } { print $$3 }'` ;\
+ GCC_VERSION=`$(CC) --version | head -n 1 | tr ' ' '\n' | tail -n 1` ;\
if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \
echo "Kernel is compiled with gcc $$KERNEL_GCC_VERSION, but you are now using $$GCC_VERSION" ;\
GCC_MAJOR=`echo $$KERNEL_GCC_VERSION | cut -d "." -f 1-2` ;\
@@ -20,7 +20,7 @@ default:
echo "No compiler of $$GCC_MAJOR series is installed" ;\
exit 1 ;\
fi ;\
- GCC_VERSION=`$$CC --version | head -n 1 | awk 'BEGIN { FPAT = "([^[:space:]]*)|(\\\\([^)]+\\\\))" } { print $$3 }'` ;\
+ GCC_VERSION=`$$CC --version | head -n 1 | tr ' ' '\n' | tail -n 1` ;\
if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \
echo "The $$GCC_VERSION of $$GCC_MAJOR series is installed" ;\
exit 1 ;\