From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 20 Jun 2024 14:19:26 +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 1sKGlC-009FHc-0V for lore@lore.pengutronix.de; Thu, 20 Jun 2024 14:19:26 +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 1sKGlA-0005Bt-Rm; Thu, 20 Jun 2024 14:19:24 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sKGl8-0005BY-NK; Thu, 20 Jun 2024 14:19:22 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sKGl7-003hP7-Bj; Thu, 20 Jun 2024 14:19:21 +0200 Received: from pza by lupine with local (Exim 4.96) (envelope-from ) id 1sKGl7-0008b2-0x; Thu, 20 Jun 2024 14:19:21 +0200 Message-ID: <92f9a4d6aaba2dd867c91e7260016859ca855bfb.camel@pengutronix.de> From: Philipp Zabel To: LI Qingwu , oss-tools@pengutronix.de, m.felsch@pengutronix.de Date: Thu, 20 Jun 2024 14:19:21 +0200 In-Reply-To: <20240619102227.2013556-2-Qing-wu.Li@leica-geosystems.com.cn> References: <20240619102227.2013556-1-Qing-wu.Li@leica-geosystems.com.cn> <20240619102227.2013556-2-Qing-wu.Li@leica-geosystems.com.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 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: bsp-development.geo@leica-geosystems.com 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, 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 >=20 > 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 >=20 > 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 com= mit -s``) saying:: > =20 > (using your real name and e-mail address), you state that your contribut= ions > 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', 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: dep_libdrm =3D dependency('libdrm', version: '>=3D 2.4.112') platsch_link_args =3D [] 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 executable('platsch', 'platsch.c', dependencies: dep_libdrm, link_args: platsch_link_args, install: true, install_dir: 'sbin', ) Another option would be to drop static linking for now and only add it in a separate patch later. > + install: true, > + install_dir : 'sbin' Please pick a formatting style and apply it consistently, e.g. remove the space before all colons, or add it everywhere. Apart from the static linking issue, this looks good to me now. regards Philipp