From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 26 Jun 2024 10:41:47 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sMODr-00CU8w-1V for lore@lore.pengutronix.de; Wed, 26 Jun 2024 10:41:47 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sMODh-0007pW-AC; Wed, 26 Jun 2024 10:41:37 +0200 Received: from mail-he1eur04on20628.outbound.protection.outlook.com ([2a01:111:f403:260f::628] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sLLfw-0007t8-NR; Sun, 23 Jun 2024 13:46:29 +0200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hEXqtwocX+GpEDJGjb7Wuvnx+k7fhe6lDlMutR18/KNH2zv14nRdkLvIR1mARL9QfDR+g0LPRxzUIJAFFE1IXUADkpCT8QbIrsyLLwCfbCR/opD723aUx6m9MFACjIZAshz6CEZmh4z1i+AF1tBziSeQXFU8T/bGp4oyaYC87kzT+JUvUT+SZD616MQZtYMTx5MdyVFnwdNQtWa1RIvljxSHjST46Ask29Tei7o3R8xEoPLS8Jr5XmDq0/q1KPHVGE4oKvsw/JpxN1+tI8RQjTp06LvhsAWZB7hkTJDW7PcQ4WDf+1WIZfmxuRPwUP/BikCOfqTYjMoeIHUMbTskXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jmB+6Zix7533kJPR65Luxi0sma8yB1+8CdZRcFSzCAE=; b=ANhlF1sBw6Ni4ZaX3Yk63OyVaJ1GzbhNPlE8QVRRfvYqadVeWu0MFe4ZGADUdCJb7+3sto2PyFccWCtKbWok+YYnnMvx0U4W+/yL2MDnfvBwWutpN7LcCs8FbuPPCkT5ulF3XdRAj/nF1K8w3sbnKpx80oR6Ruv4eGhSWQN1EQpRU5S40Yze+JWkzzcqA1dW4ZEceMN1/ZoT/RZOAQ4TRntpdNbQi4NIfmBWpOM/7WAjsSpoyKBT3sPG43gTWg0x1ff6NixsDrvA0E5VVBSUCmkEDgJxjEqKF3O7T/2YD+dax7b4Kz0HOjBFz4rC0NZg1k42CdfFqwl5JEANJPOZxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=leica-geosystems.com.cn; dmarc=pass action=none header.from=leica-geosystems.com.cn; dkim=pass header.d=leica-geosystems.com.cn; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com.cn; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jmB+6Zix7533kJPR65Luxi0sma8yB1+8CdZRcFSzCAE=; b=K1V5FMuoFIQ+w3u1NoLTdt4D/Zo6WGpzNYJd8q4c3s1kxN8vxnyAMZCwZtgp0FlOr1jeK5iULgZJH5ccPj8WKYjqIs14LgsuywZ0AWJhb/WyTARNVI6b+/IDb/CETcgfhPMAVQrTHBJfxHgT/GrBqubiCmEs6q7DdIUpvMzXtfs= Received: from AS8PR06MB7432.eurprd06.prod.outlook.com (2603:10a6:20b:319::19) by DU2PR06MB8398.eurprd06.prod.outlook.com (2603:10a6:10:2f1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.28; Sun, 23 Jun 2024 11:46:24 +0000 Received: from AS8PR06MB7432.eurprd06.prod.outlook.com ([fe80::6e12:7988:eb22:7e30]) by AS8PR06MB7432.eurprd06.prod.outlook.com ([fe80::6e12:7988:eb22:7e30%6]) with mapi id 15.20.7698.025; Sun, 23 Jun 2024 11:46:23 +0000 From: LI Qingwu To: Philipp Zabel , "oss-tools@pengutronix.de" , "m.felsch@pengutronix.de" Thread-Topic: [OSS-Tools] [PATCH platsch V5 2/5] convert to meson build Thread-Index: AQHawjKZjVjD7h+1eke0ztP7GCtlMLHQk8OAgASsr7A= Date: Sun, 23 Jun 2024 11:46:23 +0000 Message-ID: References: <20240619102227.2013556-1-Qing-wu.Li@leica-geosystems.com.cn> <20240619102227.2013556-2-Qing-wu.Li@leica-geosystems.com.cn> <92f9a4d6aaba2dd867c91e7260016859ca855bfb.camel@pengutronix.de> In-Reply-To: <92f9a4d6aaba2dd867c91e7260016859ca855bfb.camel@pengutronix.de> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=leica-geosystems.com.cn; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS8PR06MB7432:EE_|DU2PR06MB8398:EE_ x-ms-office365-filtering-correlation-id: 51a1b251-0bda-469a-5f7d-08dc937a1b90 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230037|376011|1800799021|366013|38070700015; x-microsoft-antispam-message-info: =?us-ascii?Q?a3RXJKUA27EahjehPNXdEEePdd4ZXRoyU44kIoo/ht2Nz8IHIWmmZp8HMgqO?= =?us-ascii?Q?stYbPWbnN3+GeyZ8/v33S0GJ0YZs0KtaJERgcn8cIsbKxs7IDfk4dmRT7qLZ?= =?us-ascii?Q?cO0pQ4nzw+9NuFn1LiHbL8hq5fHOugeoSXMAYuYnWN19toYhSNsfzOGFFYhW?= =?us-ascii?Q?o/5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Yj2NSi75utWqkEHz?= =?us-ascii?Q?eU77cgJuzjGxQb1Oal7xU/m47fyWzP//MELPM5OvkPptttMPwL6AY7QClhCH?= =?us-ascii?Q?3H33evgvWk6R4yT1dd6TKytfsIwnrJ4eCH9bwOY7S6YG2E/9uHb6ueYVxNXQ?= =?us-ascii?Q?mWygnianUqwChiW4W+1ADY5I6WWlFE3hH8Xjg6rFsaS8OJn2P5WR0NVS5bbK?= =?us-ascii?Q?A4+WkTzrclKpcRVQAZ8JqV1rGReyO38K00OJbLiwvAqCmX85whvilXqKxBOP?= =?us-ascii?Q?YWrTiBN5KQH4nho2MHZx1DtD7T7GyKUUzXqNlkdvn3h8PU4U3NYxRH6IJHXD?= =?us-ascii?Q?LRl1ivU=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR06MB7432.eurprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(376011)(1800799021)(366013)(38070700015); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BLIlhs/dOU979biyEGoKtUsbVMTlPM7x8xMNPJ1EwsIe5VdYZjz9NjEOWDkG?= =?us-ascii?Q?Prohsr/MWGiEY5ezDDjb8NqqgfnW+X3wmusyRwXZGsR8+9FT+soX3zVGqEO9?= =?us-ascii?Q?gms2QRo6b0+IYfn8q7JRHoGssxptWGCCOSjXsg/0JgeyIBPzG+QXZxiAUH5Z?= =?us-ascii?Q?KMSl0nn/YfJShyjqN3acfUetTHef6T0neN1d+tkc0oS1Y2IlMeYA0wQpqYbL?= =?us-ascii?Q?2p2D7J9ECTVOgJLDuApb3DrHCm+gPzxiEiRlwWmnEog1WTzM8X6H0YVGYRAy?= =?us-ascii?Q?si7971TFZyFcXd9jipPFilAp/FPfGPEFkCzz7eLMniuS9/luDYhSjm8hGqn6?= =?us-ascii?Q?N3fcLt0UUSGofg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DK4?= =?us-ascii?Q?o0VLS3moIFMrUs+ElAOtBMzdMj6z+eRzGZGDUlNRjfZfPzgURTup4D/etS9N?= =?us-ascii?Q?jHzJ2uHKFm7rYqr3oNfFDI6WqJQlwDAKLznb7SNdFiVQTFcB/vr0hDQezm23?= =?us-ascii?Q?dKW3mqnnR5ZiOsTahpii5ZsMitAKGeTW2JKb1Lv8840zuTuxRX6M6qsU/p2a?= =?us-ascii?Q?N6TjZdjG3u0wzNKffNTk2CL2L1Fmfe5AuwzHj29KJXG8pDrikpTqSsC8anps?= =?us-ascii?Q?dMAC96sPpzcvcRrLyAxWA7tFfLuLuvCWVI5dFfNWKxeIrIZdGSh8mVMX/Tsi?= =?us-ascii?Q?VGsAiV6je5wjxZZ4JV+DdFRPl8SCsIbDPwG4XJLFOWNC7OR0qBzM78u+9LIQ?= =?us-ascii?Q?EhiAabfXdK74wUiCP0Lhk+k=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: leica-geosystems.com.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR06MB7432.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51a1b251-0bda-469a-5f7d-08dc937a1b90 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2024 11:46:23.7250 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5xJsOTkixOkbhasdHJAjlnJk4vT0ntUKcFlXIFAE/vNjf1KZRMQI4ZkfWjs6bGzjyr1u2OqTi4YfHJuXG5W6HaX/hOaEBhMuRMfhR2IAg/cR/RLU+7sAtYWoSRjBTMTV X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR06MB8398 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Mailman-Approved-At: Wed, 26 Jun 2024 10:41:34 +0200 Subject: Re: [OSS-Tools] [PATCH platsch V5 2/5] convert to meson build X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: GEO-CHHER-bsp-development Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hi Philipp, > -----Original Message----- > From: Philipp Zabel > Sent: Thursday, June 20, 2024 8:19 PM > To: LI Qingwu ; > oss-tools@pengutronix.de; m.felsch@pengutronix.de > Cc: GEO-CHHER-bsp-development > > Subject: Re: [OSS-Tools] [PATCH platsch V5 2/5] convert to meson build >=20 > [Some people who received this message don't often get email from > p.zabel@pengutronix.de. Learn why this is important at > https://aka.ms/LearnAboutSenderIdentification ] >=20 > This email is not from Hexagon's Office 365 instance. Please be careful w= hile > clicking links, opening attachments, or replying to this email. >=20 >=20 > Hi, >=20 > On Mi, 2024-06-19 at 12:22 +0200, LI Qingwu wrote: > > Convert to meson build and update the README.rst version update to > > 2024.06.0 cleanup .gitignore > > > > Signed-off-by: LI Qingwu > > --- > > .gitignore | 14 -------------- > > Makefile.am | 23 ----------------------- > > README.rst | 8 ++++++++ > > configure.ac | 13 ------------- > > meson.build | 14 ++++++++++++++ > > 5 files changed, 22 insertions(+), 50 deletions(-) delete mode > > 100644 Makefile.am delete mode 100644 configure.ac create mode > > 100644 meson.build > > > > diff --git a/.gitignore b/.gitignore > > index bef7e68..e69de29 100644 > > --- a/.gitignore > > +++ b/.gitignore > > @@ -1,14 +0,0 @@ > > -/*.o > > -/aclocal.m4 > > -/autom4te.cache > > -/compile > > -/config.log > > -/config.status > > -/configure > > -/depcomp > > -/.deps > > -/install-sh > > -/Makefile > > -/Makefile.in > > -/missing > > -/platsch > > diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index > > d149ae0..0000000 > > --- a/Makefile.am > > +++ /dev/null > > @@ -1,23 +0,0 @@ > > -EXTRA_DIST =3D README.rst LICENSE > > - > > -sbin_PROGRAMS =3D platsch > > - > > -platsch_SOURCES =3D platsch.c > > -platsch_CFLAGS =3D $(LIBDRM_CFLAGS) > > -platsch_LDADD =3D $(LIBDRM_LIBS) > > - > > -CLEANFILES =3D \ > > - $(DIST_ARCHIVES) > > - > > -DISTCLEAN =3D \ > > - config.log \ > > - config.status \ > > - Makefile > > - > > -MAINTAINERCLEANFILES =3D \ > > - aclocal.m4 \ > > - configure \ > > - depcomp \ > > - install-sh \ > > - Makefile.in \ > > - missing > > diff --git a/README.rst b/README.rst > > index e318120..f1c0812 100644 > > --- a/README.rst > > +++ b/README.rst > > @@ -141,3 +141,11 @@ By adding a Signed-off-by line (e.g. using ``git > commit -s``) saying:: > > > > (using your real name and e-mail address), you state that your > > contributions are in line with the DCO. > > + > > +Compiling Instructions > > +---------------------------- > > + > > +.. code-block:: shell > > + > > + meson setup build > > + meson compile -C build > > diff --git a/configure.ac b/configure.ac deleted file mode 100644 > > index 18878db..0000000 > > --- a/configure.ac > > +++ /dev/null > > @@ -1,13 +0,0 @@ > > -AC_PREREQ([2.69]) > > -AC_INIT([platsch], [2019.12.0], [oss-tools@pengutronix.de]) > > -AC_CONFIG_SRCDIR([platsch.c]) > > -AM_INIT_AUTOMAKE([foreign dist-xz]) > > - > > -AC_PROG_CC > > -AC_PROG_MAKE_SET > > - > > -PKG_CHECK_MODULES([LIBDRM], [libdrm >=3D 2.4.112]) > > - > > -AC_CONFIG_FILES([Makefile]) > > - > > -AC_OUTPUT > > diff --git a/meson.build b/meson.build new file mode 100644 index > > 0000000..b732a06 > > --- /dev/null > > +++ b/meson.build > > @@ -0,0 +1,14 @@ > > +project('platsch', 'c', version: '2024.06.0', license : '0BSD') > > + > > +dep_libdrm =3D dependency('libdrm', > > + version: '>=3D 2.4.112', > > + static: true > > +) > > + > > +executable('platsch', > > + 'platsch.c', > > + dependencies: dep_libdrm, > > + link_args: '-static', >=20 > Dynamic linking should be kept working in case the build environment does= not > provide static libraries. I think we could gate static linking behind the > --prefer-static Meson option, like this: >=20 > dep_libdrm =3D dependency('libdrm', version: '>=3D 2.4.112') >=20 > platsch_link_args =3D [] >=20 > if get_option('prefer_static') > cc =3D meson.get_compiler('c') > if cc.find_library('drm', static: true, required: false).found() > platsch_link_args +=3D '-static' > endif > endif >=20 > executable('platsch', > 'platsch.c', > dependencies: dep_libdrm, > link_args: platsch_link_args, > install: true, > install_dir: 'sbin', > ) During my test, meson build will link static if set prefer_static=3Dtrue, I just update the document in v6, user just set prefer_static=3Dtrue during= setup: meson setup -Dspinner=3Dtrue -Dprefer_static=3Dtrue build > Another option would be to drop static linking for now and only add it in= a > separate patch later. >=20 > > + install: true, > > + install_dir : 'sbin' >=20 > Please pick a formatting style and apply it consistently, e.g. remove the= space > before all colons, or add it everywhere. >=20 > Apart from the static linking issue, this looks good to me now. >=20 > regards > Philipp