Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 1 | From 4233b5ac1629c225a7a80f33efc0eff527a95851 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 2 | From: Li Wang <li.wang@windriver.com> |
| 3 | Date: Wed, 30 Aug 2017 15:05:16 +0800 |
| 4 | Subject: [PATCH] Remove host information from version.h |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 5 | |
| 6 | make lsof not include host information |
| 7 | |
| 8 | Upstream-Status: Inappropriate [embedded specific] |
| 9 | |
| 10 | Signed-off-by: Li Wang <li.wang@windriver.com> |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 11 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 12 | --- |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 13 | dialects/linux/Makefile | 48 +++++++---------------------------------- |
| 14 | 1 file changed, 8 insertions(+), 40 deletions(-) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 15 | |
| 16 | diff --git a/dialects/linux/Makefile b/dialects/linux/Makefile |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 17 | index 46c83c2..50f03cc 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 18 | --- a/dialects/linux/Makefile |
| 19 | +++ b/dialects/linux/Makefile |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 20 | @@ -84,47 +84,15 @@ version.h: FRC |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 21 | @echo Constructing version.h |
| 22 | @rm -f version.h |
| 23 | @echo '#define LSOF_BLDCMT "${LSOF_BLDCMT}"' > version.h; |
| 24 | - @echo '#define LSOF_CC "${CC}"' >> version.h |
| 25 | - @echo '#define LSOF_CCV "${CCV}"' >> version.h |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 26 | - @echo '#define LSOF_CCFLAGS "'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h |
| 27 | + @echo '#define LSOF_CC ""' >> version.h |
| 28 | + @echo '#define LSOF_CCV ""' >> version.h |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 29 | + @echo '#define LSOF_CCFLAGS ""' >> version.h |
| 30 | @echo '#define LSOF_CINFO "${CINFO}"' >> version.h |
| 31 | - @if [ "X${LSOF_HOST}" = "X" ]; then \ |
| 32 | - echo '#define LSOF_HOST "'`uname -n`'"' >> version.h; \ |
| 33 | - else \ |
| 34 | - if [ "${LSOF_HOST}" = "none" ]; then \ |
| 35 | - echo '#define LSOF_HOST ""' >> version.h; \ |
| 36 | - else \ |
| 37 | - echo '#define LSOF_HOST "${LSOF_HOST}"' >> version.h; \ |
| 38 | - fi \ |
| 39 | - fi |
| 40 | - @echo '#define LSOF_LDFLAGS "${CFGL}"' >> version.h |
| 41 | - @if [ "X${LSOF_LOGNAME}" = "X" ]; then \ |
| 42 | - echo '#define LSOF_LOGNAME "${LOGNAME}"' >> version.h; \ |
| 43 | - else \ |
| 44 | - if [ "${LSOF_LOGNAME}" = "none" ]; then \ |
| 45 | - echo '#define LSOF_LOGNAME ""' >> version.h; \ |
| 46 | - else \ |
| 47 | - echo '#define LSOF_LOGNAME "${LSOF_LOGNAME}"' >> version.h; \ |
| 48 | - fi; \ |
| 49 | - fi |
| 50 | - @if [ "X${LSOF_SYSINFO}" = "X" ]; then \ |
| 51 | - echo '#define LSOF_SYSINFO "'`uname -a`'"' >> version.h; \ |
| 52 | - else \ |
| 53 | - if [ "${LSOF_SYSINFO}" = "none" ]; then \ |
| 54 | - echo '#define LSOF_SYSINFO ""' >> version.h; \ |
| 55 | - else \ |
| 56 | - echo '#define LSOF_SYSINFO "${LSOF_SYSINFO}"' >> version.h; \ |
| 57 | - fi \ |
| 58 | - fi |
| 59 | - @if [ "X${LSOF_USER}" = "X" ]; then \ |
| 60 | - echo '#define LSOF_USER "${USER}"' >> version.h; \ |
| 61 | - else \ |
| 62 | - if [ "${LSOF_USER}" = "none" ]; then \ |
| 63 | - echo '#define LSOF_USER ""' >> version.h; \ |
| 64 | - else \ |
| 65 | - echo '#define LSOF_USER "${LSOF_USER}"' >> version.h; \ |
| 66 | - fi \ |
| 67 | - fi |
| 68 | + @echo '#define LSOF_HOST ""' >> version.h; |
| 69 | + @echo '#define LSOF_LDFLAGS ""' >> version.h |
| 70 | + @echo '#define LSOF_LOGNAME ""' >> version.h; |
| 71 | + @echo '#define LSOF_SYSINFO ""' >> version.h; |
| 72 | + @echo '#define LSOF_USER ""' >> version.h; |
| 73 | @sed '/VN/s/.ds VN \(.*\)/#define LSOF_VERSION "\1"/' < version >> version.h |
| 74 | |
| 75 | FRC: |