[LTP] [PATCH v2 2/2] Add Linux Test eXecutor inside tools

Petr Vorel pvorel@suse.cz
Fri Sep 15 20:22:20 CEST 2023


> Hi!
> > This is breaking build:

> > 2023-09-15T13:47:12.1128844Z make -C ltx
> > 2023-09-15T13:47:12.1148029Z make[3]: *** No targets specified and no makefile found.  Stop.
> > 2023-09-15T13:47:12.1153175Z make[2]: *** [/__w/ltp/ltp/tools/ltx/Makefile:13: all] Error 2
> > 2023-09-15T13:47:12.1159251Z make[1]: *** [../include/mk/generic_trunk_target.inc:108: all] Error 2
> > 2023-09-15T13:47:12.1163512Z make[1]: Leaving directory '/__w/ltp/ltp/tools'
> > 2023-09-15T13:47:12.1169815Z make: *** [Makefile:94: tools-all] Error 2

> I suppose that we need

> > Reproduce with simple:
> > $ cd tools && make -C ltx

> > The problem is because there is no tools/ltx/Makefile

> Huh? I did apply the two patches and I do have tools/ltx/Makefile

I'm sorry, I was wrong, of course tools/ltx/Makefile is there,
there is another make error.

> And actually there is a minor problem there, without the submodules
> checked out I get:

> CC ltx
> gcc: fatal error: no input files
> compilation terminated.
> make: *** [Makefile:21: ltx] Error 1

> So I guess that we need:

> diff --git a/tools/ltx/Makefile b/tools/ltx/Makefile
> index 0fbf7cfd9..43ed93c6b 100644
> --- a/tools/ltx/Makefile
> +++ b/tools/ltx/Makefile
> @@ -7,6 +7,8 @@ top_srcdir              ?= ../..

>  include $(top_srcdir)/include/mk/env_pre.mk

> +ifneq ($(wildcard $(abs_srcdir/ltx-src/*)),)
> +
>  BINARY=ltx

>  MAKE_TARGETS := $(BINARY)
> @@ -23,4 +25,6 @@ endif

>  INSTALL_DIR := $(prefix)

> +endif
> +
>  include $(top_srcdir)/include/mk/generic_leaf_target.mk

+1

> > Why are the sources in tools/ltx/ltx-src instead of tools/ltx anyway?

> Because if there is a directory with the name ltx it horribly confused
> Make.

Thx for info!

> > I guess you used sparse approach, which is not necessary here.

> I'm not sure that we can do things simpler, the Makefile in the ltx git
> repository does not support out of tree build, so unless we remove that
> from LTP this is probably the easiest solution.

Your solution looks OK to me. I guess we could merge it on Monday.

Kind regards,
Petr

> > I'm ok with that if it makes things simpler, but please include the required
> > Makefile.

> It is there.


More information about the ltp mailing list