[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v5 00/12] Convert over to use keycodemapdb

From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH v5 00/12] Convert over to use keycodemapdb
Date: Tue, 19 Sep 2017 12:20:55 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Tue, Sep 19, 2017 at 12:58:20PM +0200, Gerd Hoffmann wrote:
>   Hi,
> > > So I did the keymaps build with a recursive make call too, which
> > > doesn't look that pretty ...
> > 
> > I don't think that's too ugly, but I wonder if there's some way to
> > avoid
> > the recursive make call.
> > 
> > It feels like this is a similar scenario to 'config-host.mak' being
> > outdated. I don't entirely understand the logic yet, but we manage to
> > automatically re-run configure and rebuild config-host.make, when
> > configure changes, and that in turn affects which dependancies need
> > rebuild.
> Can't spot anything special in the Makefile.  Maybe make is clever
> enough to figure that a rule updates a include file and starts over
> then.
> > I wonder if we can somehow integrate into that process, so
> > that configure is responsible for checking out the git submodules,
> > then make the re-running of configure trigger when .gitmodules
> > changes content.
> .gitmodules only has the repo links, not the checkout hashes.  So it
> wouldn't be touched on updates.
> I can't see an easy way for make to figure a submodule has changed,
> other than running "git submodule update".

So I think I figured out the trick libvirt/gnulib uses for this. It
runs an external script to check the submodule status. This runs
'git submodule' to get a list of expected hashes, and compares this
to a file .git-submodule-status that it previously created (might be
missing on fresh checkout). If the expected & stores hashes don't
match this script runs an error.

The Makefile checks the output of this script, and if it indicates
that an submodule update is required, it uses an ifeq() to add a
dependancy between "Makefile" and a phony target that re-runs
configure (which in turns updates the submodules). If no update was
required, then no dependancy from Makefile gets added, so build runs

|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]