From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 50D44A0679 for ; Mon, 1 Apr 2019 17:39:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9DD364C99; Mon, 1 Apr 2019 17:39:02 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10085.outbound.protection.outlook.com [40.107.1.85]) by dpdk.org (Postfix) with ESMTP id 67BCA4C96 for ; Mon, 1 Apr 2019 17:39:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cg9/uPezjZ3E8YivvM3Q3yLTJ2SjG2XyzX/pRcY3kZk=; b=ESj7jnhjzP2rHLaVADddq4FKF/iQG2EqO9WE7foliqcgCLWK0eLwwDaldvp5RLvRC7soJoC4z/Kl5TctD3f/vpL6YerhSqZqcu6a7SUnfQL61AsNkF281xkTqBVRRdBrEE6ecWI94ufIb5346WGtSZ9T97HSO2CYI4q6XdrBna0= Received: from AM6PR05MB4405.eurprd05.prod.outlook.com (52.135.163.23) by AM6PR05MB6133.eurprd05.prod.outlook.com (20.179.3.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.15; Mon, 1 Apr 2019 15:38:59 +0000 Received: from AM6PR05MB4405.eurprd05.prod.outlook.com ([fe80::edb9:6ee3:cd08:b3f2]) by AM6PR05MB4405.eurprd05.prod.outlook.com ([fe80::edb9:6ee3:cd08:b3f2%6]) with mapi id 15.20.1750.017; Mon, 1 Apr 2019 15:38:59 +0000 From: Ali Alnubani To: "dev@dpdk.org" CC: "bruce.richardson@intel.com" , Thomas Monjalon , "ferruh.yigit@intel.com" Thread-Topic: [PATCH v2] build: use cat if found Thread-Index: AQHU6KEGvBkQt68if0OGzLDoN9sqqQ== Date: Mon, 1 Apr 2019 15:38:59 +0000 Message-ID: <20190401153836.30807-1-alialnu@mellanox.com> References: <20190401103551.28909-1-alialnu@mellanox.com> In-Reply-To: <20190401103551.28909-1-alialnu@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.19.2 x-clientproxiedby: LNXP265CA0082.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::22) To AM6PR05MB4405.eurprd05.prod.outlook.com (2603:10a6:209:44::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=alialnu@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 43805a23-4de5-4e64-371f-08d6b6b8287d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB6133; x-ms-traffictypediagnostic: AM6PR05MB6133: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0994F5E0C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(366004)(136003)(346002)(376002)(199004)(189003)(105586002)(81156014)(86362001)(2501003)(11346002)(186003)(316002)(1730700003)(99286004)(53936002)(476003)(81166006)(76176011)(71200400001)(102836004)(71190400001)(486006)(2906002)(68736007)(14444005)(25786009)(8936002)(26005)(97736004)(2616005)(50226002)(8676002)(6916009)(5660300002)(386003)(478600001)(6116002)(54906003)(5640700003)(36756003)(1076003)(446003)(256004)(6506007)(966005)(4326008)(14454004)(3846002)(52116002)(2351001)(6436002)(6306002)(6486002)(106356001)(6512007)(305945005)(7736002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB6133; H:AM6PR05MB4405.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 7X0y0nxZWXOCQTxqj6K9IO9hzlz9buGJ3/g2j1NrEEz897h/A2dCfxPBx53J3IgtbBanE4cfuVZtoKSX56njizLTebIRXkJbRx9fA26amjCPZ5uJq1uzohDQIIk6BZ2jvlnwKWr3O29mAoU6Ud7jnPNkUhlZwIG2KZ/pKB+4M6X5BMvloSbP8DePwmGEzypgO7ndRmmgvUyHpcKe8ijlCskLrqDW57yQvE219e8ypKervmXnR6cFQ8Xc5UEnX5psEJfFW2OXB7bb1P1DbtlubPBsPk86aWMMyGW1HZFVz3rvyp18I5GMBHw+Jh1yvmFN+mduVSHk7n0E81ZT51+U8oZWq6JRXHt4CPf5i6hwZD40FNuQRZcK0oXdKDbKhu312SvrGZ6za3rfW1NnCT0uQUQJIAgpdiTmUtfoxxOiw3w= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 43805a23-4de5-4e64-371f-08d6b6b8287d X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2019 15:38:59.2809 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB6133 Subject: [dpdk-dev] [PATCH v2] build: use cat if found X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190401153859.AF8ci7Ygt34nbHgnD-V8peew8Ixrs8AvQFh7EQbJbgQ@z> This is to fix a build error with meson in GNU/Linux that is caused by using the 'more' command to read the VERSION file. The error: config/meson.build:10:10: ERROR: String '::::::::::::::\nVERSION\n::::::::::::::\n19' cannot be converted to int The command 'more' prints the file name before the actual contents of the file when it's being run without a controlling terminal. This could happen in CI environments. Please refer to: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/text-ut= ils/more.c Fixes: c04172b5f031 ("build: add single source of DPDK version number") Fixes: d320fe56bd51 ("build: use version number from config file") Signed-off-by: Ali Alnubani Signed-off-by: Bruce Richardson --- Changes in v2: - Use find_program to fallback to 'more'. - Update patch title. meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index fa6bf3d07..6061c4b1e 100644 --- a/meson.build +++ b/meson.build @@ -3,8 +3,9 @@ =20 project('DPDK', 'C', # Get version number from file. - # Use "more" rather than "cat" for windows compatibility. - version: run_command('more', files('VERSION')).stdout().strip(), + # Fallback to "more" for Windows compatibility. + version: run_command(find_program('cat', 'more'), + files('VERSION')).stdout().strip(), license: 'BSD', default_options: ['buildtype=3Drelease', 'default_library=3Dstatic'], meson_version: '>=3D 0.47.1' --=20 2.19.2