[libvirt] [PATCH] virkeymaps.h: Fix VPATH build with --disable-dependency-tracking

Michal Privoznik mprivozn at redhat.com
Tue Nov 3 12:40:01 UTC 2015


On 03.11.2015 11:09, Peter Krempa wrote:
> On Tue, Nov 03, 2015 at 10:55:31 +0100, Peter Krempa wrote:
>> On Tue, Nov 03, 2015 at 10:40:50 +0100, Peter Krempa wrote:
>>> On Tue, Nov 03, 2015 at 09:08:04 +0100, Michal Privoznik wrote:
>>>> Funny things happen when you try to do a VPATH build and pass
>>>> --disable-dependency-tracking argument to the configure script.
>>>> Not only the directory structure is not created at the end of
>>>> configure phase, but also contradictory to others, virkeymaps.h
>>>
>>> Maybe that's the actual problem.
> 
> [...]
> 
>> A proper fix will be something along:
>>
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index 99b4993..db0ca54 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -1056,6 +1056,7 @@ libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
>>                 $(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) \
>>                 $(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(SYSTEMD_DAEMON_LIBS) \
>>                 $(POLKIT_LIBS)
>> +libvirt_util_DEPENDENCIES = util/keymaps.h
> 
> Okay, this didn't work. I thought it did, but I've looked into a wrong
> terminal window ...
> 
> This does work though:
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 99b4993..8d7d3c6 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -180,7 +180,8 @@ MAINTAINERCLEANFILES += util/virkeymaps.h
> 
>  util/virkeymaps.h: $(srcdir)/util/keymaps.csv  \
>                 $(srcdir)/util/virkeycode-mapgen.py
> -       $(AM_V_GEN)$(PYTHON) $(srcdir)/util/virkeycode-mapgen.py \
> +       $(AM_V_GEN) $(MKDIR_P) util;\
> +               $(PYTHON) $(srcdir)/util/virkeycode-mapgen.py \
>           <$(srcdir)/util/keymaps.csv >util/virkeymaps.h
> 
>  # Internal generic driver infrastructure
> 

Of course this will work as long as you are 'mkdir'-ing. My idea was
that we should not do that directly (as that proves we have an error
somewhere IMO), but let automake do that for us instead.

Michal




More information about the libvir-list mailing list