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

Cyril Hrubis chrubis@suse.cz
Wed Nov 3 16:35:49 CET 2021


Hi!
> > Changes LGTM (works locally, testing it in CI:
> > https://github.com/pevik/ltp/actions/runs/1417208983
> Failed :(.
> 
> Reproducible locally:
> make -C "metadata" \
> 	-f "/home/pvorel/install/src/ltp.git/metadata/Makefile" install
> make[1]: Entering directory '/home/pvorel/install/src/ltp.git/metadata'
> make -C /home/pvorel/install/src/ltp.git/docparse/ -f /home/pvorel/install/src/ltp.git/docparse/Makefile install
> make[2]: Entering directory '/home/pvorel/install/src/ltp.git/docparse'
> install -m 00775   "/home/pvorel/install/src/ltp.git/docparse/metadata.html" /opt/ltp/metadata/metadata.html
> install: cannot stat '/home/pvorel/install/src/ltp.git/docparse/metadata.html': No such file or directory
> make[2]: *** [../include/mk/env_post.mk:85: /opt/ltp/metadata/metadata.html] Error 1
> make[2]: Leaving directory '/home/pvorel/install/src/ltp.git/docparse'
> make[1]: *** [/home/pvorel/install/src/ltp.git/metadata/Makefile:26: install] Error 2
> make[1]: Leaving directory '/home/pvorel/install/src/ltp.git/metadata'
> make: *** [Makefile:138: metadata-install] Error 2
> 
> Maybe I wrongly applied your patch, could you please have a look?

As far as I can tell this just means that the html wasn't build at all,
at least that's what was shown by the CI.

> Kind regards,
> Petr
> 
> diff --git metadata/Makefile metadata/Makefile
> index f1d99b243..6c36cd210 100644
> --- metadata/Makefile
> +++ 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
> +MAKE_TARGETS		:= ltp.json docparse
>  HOST_MAKE_TARGETS	:= metaparse
>  INSTALL_DIR		= metadata

I guess that this is the revese diff.

> @@ -21,11 +21,6 @@ ifeq ($(WITH_METADATA),yes)
>  	$(MAKE) -C $(abs_top_builddir)/docparse/ -f $(abs_top_srcdir)/docparse/Makefile
>  endif

This part is likely wrong, it should look like:

ltp.json: metaparse
        $(abs_srcdir)/parse.sh > 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

So that in the case that WITH_METADATA is set the rule has three lines
not one.

And that would explain why the html wasn't build since there was a
docparse rule but nothing refrenced it.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list