[LTP] [PATCH v3 7/7] docparse: Split into metadata and docparse

Cyril Hrubis chrubis@suse.cz
Wed Nov 3 14:16:15 CET 2021


Hi!
> make install has wrong path (it's on jobs with out-of-tree build and with
> Fedora; it's visible in .github/workflows/ci.yml - MAKE_INSTALL but unfortunately GitHub Actions hide these variables):
> 
> https://github.com/pevik/ltp/runs/4092384478?check_suite_focus=true
> install -m 00775   "/__w/ltp/ltp-build/metadata/ltp.json" /github/home/ltp-install/opt/ltp/metadata/ltp.json
> install -m 00775   "/__w/ltp/ltp-build/metadata/docparse" /github/home/ltp-install/opt/ltp/metadata/docparse
> install: cannot stat '/__w/ltp/ltp-build/metadata/docparse': No such file or directory
> make[1]: *** [/__w/ltp/ltp/include/mk/env_post.mk:85: /github/home/ltp-install/opt/ltp/metadata/docparse] Error 1
> 
> Obviously path should be '/__w/ltp/ltp-build/metadata/../docparse'
> 
> Reproducing locally:
> $ ./configure CC=clang
> $ cd metadata
> $ make
> $ make install
> mkdir -p "/opt/ltp/metadata"
> install -m 00775   "ltp.git/metadata/ltp.json" /opt/ltp/metadata/ltp.json
> install -m 00775   "ltp.git/metadata/docparse" /opt/ltp/metadata/docparse
> install: cannot stat 'ltp.git/metadata/docparse': No such file or directory
> make: *** [../include/mk/env_post.mk:85: /opt/ltp/metadata/docparse] Error 1

Actually it's the

MAKE_TARGETS := ltp.json docparse

which treats the docparse as a actuall file.

So I guess that we need this:

diff --git a/metadata/Makefile b/metadata/Makefile
index 6c36cd210..522af4270 100644
--- a/metadata/Makefile
+++ b/metadata/Makefile
@@ -6,7 +6,7 @@ top_srcdir              ?= ..
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(top_srcdir)/include/mk/functions.mk

-MAKE_TARGETS           := ltp.json docparse
+MAKE_TARGETS           := ltp.json
 HOST_MAKE_TARGETS      := metaparse
 INSTALL_DIR            = metadata

@@ -14,13 +14,16 @@ INSTALL_DIR         = metadata

 ltp.json: metaparse
        $(abs_srcdir)/parse.sh > ltp.json
-
-docparse: ltp.json
 ifeq ($(WITH_METADATA),yes)
        mkdir -p $(abs_top_builddir)/docparse
        $(MAKE) -C $(abs_top_builddir)/docparse/ -f $(abs_top_srcdir)/docparse/Makefile
 endif

+ifeq ($(WITH_METADATA),yes)
+install:
+       $(MAKE) -C $(abs_top_builddir)/docparse/ -f $(abs_top_srcdir)/docparse/Makefile install
+endif
+
 test:
        $(MAKE) -C $(abs_srcdir)/tests/ test


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list