[LTP] [PATCH] include/lapi: add leaf Makefile
Petr Vorel
pvorel@suse.cz
Thu Apr 16 20:05:59 CEST 2026
Hi Li,
[ Cc Cyril if he wants to add his 2 cents ]
> On Tue, Apr 14, 2026 at 5:20 AM Petr Vorel <pvorel@suse.cz> wrote:
> > Hi Jinseok,
> > Thanks for fixing this!
> > > Fixes : https://github.com/linux-test-project/ltp/issues/1262
> > nit: Please next time avoid space before ':'.
> > Fixes: https://github.com/linux-test-project/ltp/issues/1262
> > > include/lapi and include/lapi/syscalls lack Makefiles, so 'make check'
> > > does not work in these directories. Add minimal leaf Makefiles.
> > nit: Also it'd go here.
> > > Signed-off-by: Jinseok Kim <always.starving0@gmail.com>
> > > ---
> > > include/lapi/Makefile | 8 ++++++++
> > > include/lapi/syscalls/Makefile | 8 ++++++++
> > > 2 files changed, 16 insertions(+)
> > > create mode 100644 include/lapi/Makefile
> > > create mode 100644 include/lapi/syscalls/Makefile
> > > diff --git a/include/lapi/Makefile b/include/lapi/Makefile
> > > new file mode 100644
> > > index 000000000..83ef85c77
> > > --- /dev/null
> > > +++ b/include/lapi/Makefile
> > > @@ -0,0 +1,8 @@
> > > +# SPDX-License-Identifier: GPL-2.0-or-later
> > > +# Copyright (C) 2026 Jinseok Kim <always.starving0@gmail.com>
> > > +
> > > +top_srcdir ?= ../../
> > > +
> > > +include $(top_srcdir)/include/mk/env_pre.mk
> > > +
> > > +include $(top_srcdir)/include/mk/generic_leaf_target.mk
> > > diff --git a/include/lapi/syscalls/Makefile b/include/lapi/syscalls/Makefile
> > > new file mode 100644
> > > index 000000000..e46c90ef5
> > > --- /dev/null
> > > +++ b/include/lapi/syscalls/Makefile
> > > @@ -0,0 +1,8 @@
> > > +# SPDX-License-Identifier: GPL-2.0-or-later
> > > +# Copyright (C) 2026 Jinseok Kim <always.starving0@gmail.com>
> > > +
> > > +top_srcdir ?= ../../../
> > > +
> > > +include $(top_srcdir)/include/mk/env_pre.mk
> > > +
> > > +include $(top_srcdir)/include/mk/generic_leaf_target.mk
> > Why do we need this file? This one should be deleted. Also, because make install
> > works for include directory, it should work here as well.
> > I would just copy that header, update top_srcdir location and also include
> > generic_trunk_target.mk to include/Makefile.
> > I think this is a better version.
> Yes, this solution looks smarter, but tiny queries below.
> > ...
> > include $(top_srcdir)/include/mk/env_pre.mk
> > +INSTALL_DIR := $(includedir)/lapi
> I'm doubting should we install the include/lapi/ local header files to
> the /opt/ltp/include?
Do you question *whether* install lapi/*.h or *where* to install them?
We install include/*.h files. What is a difference with include/lapi/?
I'd say either install both or none. I would prefer to not install any,
LTP library is not separated anyway (there is an old Andrea's effort, but that
uses meson anyway). Installation was added in 2008 and I doubt anybody is using
it.
> > ...
> > --- include/lapi/syscalls/Makefile
> > +++ /dev/null
> Does the `make check` still work (inside include/lapi/syscalls/)
> without this Makefile?
Sure not. Do we really want to check generate_arch.sh and generate_syscalls.sh
in arch? If yes, sure it needs to be added, but that was not my intention when
creating #1262. I really wanted to check C (and shell) library and tests code.
Kind regards,
Petr
More information about the ltp
mailing list