[Libosinfo] [PATCH] build: fix VPATH based builds

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Fri Jan 8 19:06:40 UTC 2016


This patch breaks `make distcheck` here:

--------------------
if test "/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/../../docs/reference"
!= "/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/docs/reference"
; then \
    files=`echo   Libosinfo-docs.xml Libosinfo-sections.txt
Libosinfo-overrides.txt Libosinfo.types`; \
    if test "x$files" != "x" ; then \
        for file in $files ; do \
            destdir=`dirname
/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/docs/reference/$file`;
\
            test -d "$destdir" || mkdir -p "$destdir"; \
            test -f
/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/../../docs/reference/$file
&& \
                cp -pf
/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/../../docs/reference/$file
/home/zeenix/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/docs/reference/$file
|| true; \
        done; \
    fi; \
fi
make[4]: *** No rule to make target '../../osinfo/*.c', needed by
'scan-build.stamp'.  Stop.
make[4]: *** Waiting for unfinished jobs....
touch setup-build.stamp
make[4]: Leaving directory
'/extra-data/checkout/gnome/libosinfo/libosinfo-0.3.0/_build/sub/docs/reference'
-------------------

I'm reverting it for now for release.

On Fri, Sep 25, 2015 at 12:34 PM, Daniel P. Berrange
<berrange at redhat.com> wrote:
> The VPATH build fails because the enum generator is told to
> look for two generated files in the $srcdir instead of builddir.
> We should not in fact loom the generated files at all when building
> enums, so they can be removed.
>
> The g-ir-scanner is also missing a -I$(build_dir) to let it find
> the generated files.
>
> Finally the gtk-doc tools were not being told to look in the
> $(build_dir)
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>
> Pushed to git under broken build fix rule.
>
>  docs/reference/Makefile.am | 6 +++---
>  osinfo/Makefile.am         | 7 ++++---
>  2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
> index c7f4c7b..5b516ed 100644
> --- a/docs/reference/Makefile.am
> +++ b/docs/reference/Makefile.am
> @@ -3,7 +3,7 @@ DOC_MODULE=Libosinfo
>
>  DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
>
> -DOC_SOURCE_DIR=$(top_srcdir)/osinfo
> +DOC_SOURCE_DIR=$(top_srcdir)/osinfo $(top_builddir)/osinfo
>
>  SCANGOBJ_OPTIONS=
>
> @@ -17,8 +17,8 @@ MKHTML_OPTIONS=
>
>  FIXXREF_OPTIONS=
>
> -HFILE_GLOB=$(top_srcdir)/osinfo/*.h
> -CFILE_GLOB=$(top_srcdir)/osinfo/*.c
> +HFILE_GLOB=$(top_srcdir)/osinfo/*.h $(top_builddir)/osinfo/*.h
> +CFILE_GLOB=$(top_srcdir)/osinfo/*.c $(top_builddir)/osinfo/*.c
>
>  IGNORE_HFILES=
>
> diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
> index 8f5685c..c07d362 100644
> --- a/osinfo/Makefile.am
> +++ b/osinfo/Makefile.am
> @@ -30,6 +30,7 @@ libosinfo_1_0_la_CFLAGS = \
>         $(WARN_CFLAGS) \
>         $(COVERAGE_CFLAGS) \
>         -I$(top_srcdir) \
> +       -I$(top_builddir) \
>         $(LIBXML_CFLAGS) \
>         $(LIBXSLT_CFLAGS) \
>         $(GOBJECT_CFLAGS) \
> @@ -94,11 +95,11 @@ OSINFO_HEADER_FILES =                       \
>    osinfo_resourceslist.h               \
>    osinfo_tree.h                                \
>    osinfo_treelist.h                    \
> -  osinfo_version.h                     \
>    $(NULL)
>
>  libosinfo_1_0_include_HEADERS =                \
>    $(OSINFO_HEADER_FILES)               \
> +  osinfo_version.h                     \
>    osinfo_enum_types.h                  \
>    $(NULL)
>
> @@ -149,10 +150,10 @@ libosinfo_1_0_la_SOURCES =                \
>    $(NULL)
>
>  osinfo_enum_types.h: $(OSINFO_HEADER_FILES) osinfo_enum_types.h.template
> -       $(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.h.template $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
> +       $(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.h.template $(OSINFO_HEADER_FILES:%=$(srcdir)/%) ) > $@
>
>  osinfo_enum_types.c: $(OSINFO_HEADER_FILES) osinfo_enum_types.c.template osinfo_enum_types.h
> -       $(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.c.template $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
> +       $(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.c.template $(OSINFO_HEADER_FILES:%=$(srcdir)/%) ) > $@
>
>  DISTCLEANFILES +=                              \
>         osinfo_enum_types.c                     \
> --
> 2.4.3
>
> _______________________________________________
> Libosinfo mailing list
> Libosinfo at redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo



-- 
Regards,

Zeeshan Ali (Khattak)
________________________________________
Befriend GNOME: http://www.gnome.org/friends/




More information about the Libosinfo mailing list