Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238870
| Path | csiph.com!news.mixmin.net!news2.arglkargh.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Alexander Kapshuk <alexander.kapshuk@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/24] ver_linux: make.patch |
| Date | Sat, 03 Oct 2015 15:20:01 +0200 |
| Message-ID | <qfuTf-2Sn-9@gated-at.bofh.it> (permalink) |
| X-Original-To | linux-kernel <linux-kernel@vger.kernel.org> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=r451MMzvCA5YkKCHI1DQKNH1GsPvqhwpKeZb6zgDiWw=; b=szmQLe+49Shk1PNa8ATGXlM8ExB0xIYp+hu9QZpAn/PwWCwQ/DUvKywufX+b/0sHS9 dAsca/nMWw1tpCkLx8oxCJLv83PECB9Gf8KzuN37IH1a9tagsmfJHfUsDLgQ17J1jkrP MmkwS8svij6w0wOzdDVZK/SlyYFbtC7sfUqTOPEH+bBqYz89eaWcSnQgg97xHu/al5F8 oMY2nQ2BpTvrNc3R0YMfLwuGgPFhtwvi5E75+iYkDic+HlvvcTf+Y2IGflQKYqkN0swI ojfbVml4hIwOWrvv7drp6DHvpqzhhA//cqgMotSfqOnWbvkQSIjx3FPY4OHiYDHu53gp K+pQ== |
| X-Received | by 10.112.132.1 with SMTP id oq1mr7610484lbb.108.1443878029864; Sat, 03 Oct 2015 06:13:49 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 38 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Greg KH <gregkh@linuxfoundation.org> |
| X-Original-Date | Sat, 3 Oct 2015 16:13:10 +0300 |
| X-Original-Message-ID | <CAJ1xhMUD6jeo53rvoQF-SAmVb1SqWF8xsXnVb4FRHMP+Z17p=Q@mail.gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1238870 |
Show key headers only | View raw
Calling 'awk' more then once is redundant. The output of 'make --version'
already has the data we are after, why not utilise it.
The proposed implementation uses 'sed' to utilise the data output
modifying the white space formatting only.
Tested on:
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
Arch Linux
openSuSE 13.2
Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
---
--- linux/scripts/ver_linux.orig 2015-10-03 13:41:57.118790241 +0300
+++ linux/scripts/ver_linux 2015-10-03 13:49:39.548870365 +0300
@@ -14,8 +14,12 @@
gcc -dumpversion 2>&1| awk \
'NR==1{print "Gnu C ", $1}'
-make --version 2>&1 | awk -F, '{print $1}' | awk \
- '/GNU Make/{print "Gnu make ",$NF}'
+test -x "$make" &&
+$make --version 2>&1 |
+sed '
+ /^\(GNU Make\)[ \t]/!d
+ s//\1\t\t/
+'
echo "binutils $(ld -v | egrep -o '[0-9]+\.[0-9\.]+')"
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 4/24] ver_linux: make.patch Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-03 15:20 +0200
csiph-web