Re: [PATCH] makefile: Move include/Makefile.am to include/libvirt/Makefile.am

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06.04.2016 09:54, Erik Skultety wrote:
> The reason for this is to fix the automatic rebuild of libvirt-common.h.in.
> All *.in files should be automatically rebuilt each time they're modified.
> It works well for makefiles and pkgconfig files, since they do have a valid
> dependency in the top-level Makefile. However, with libvirt-common.h.in
> there is no dependency in the top-level Makefile and there's no need for it
> either, so this rule
> 
> include/libvirt/libvirt-common.h: $(top_builddir)/config.status \
>         $(top_srcdir)/include/libvirt/libvirt-common.h.in
>     cd $(top_builddir) && $(SHELL) ./config.status $@
> 
> is never hit and should be moved to include/Makefile, but that's automake's
> job. According to GNU automake docs:
> 
> "Files created by AC_CONFIG_FILES, be they
> Automake Makefiles or not, are all removed by ‘make distclean’. Their inputs
> are automatically distributed, unless they are the output of prior
> AC_CONFIG_FILES commands. Finally, rebuild rules are generated in the Automake
> Makefile existing in the subdirectory of the output file, if there is one, or
> in the top-level Makefile otherwise."
> 
> Which means that if we want to have the rule for libvirt-common.h automatically
> generated by automake, the include/Makefile.am needs to be moved into libvirt/
> subdirectory and $SUBDIRS in the top-level Makefile need to be adjusted as
> well. This patch moves Makefile.am from include/ to include/libvirt, adjusting
> the prefixes accordingly as well as updates the top-level Makefile $SUBDIRS to
> properly hint automake to generate all rules at proper places.
> 
> Best way to see the changes, use -M with 'git show'.
> 
> Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
> ---
>  Makefile.am                       |  2 +-
>  configure.ac                      |  2 +-
>  include/{ => libvirt}/Makefile.am | 12 ++++++------
>  3 files changed, 8 insertions(+), 8 deletions(-)
>  rename include/{ => libvirt}/Makefile.am (76%)

ACK

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]