On Thu, Apr 20, 2017 at 07:54:39PM +0200, Andrea Bolognani wrote:
The goal is twofold: firstly, we want to extend the script so
that it can deal with more than a single git submodule, and
secondly we'd like to reduce the amount of duplicated code.
Moreover, since we're making heavy changes to the code anyway,
we might as well make sure it follows a somewhat consistent
coding style too.
To reduce code duplication, we introduce a new --dry-run
option, which can be used by third parties to figure out
whether calling autogen.sh is necessary or not: this allows
us to get rid of the reimplementation of part of the logic
in cfg.mk and guarantee they'll never get out of sync.
Other changes include: making dirty submodules checking and
cleaning entirely independent of other operations; removing
the use of 'set -e' and handling errors explicitly instead;
better parsing of command line arguments.
---
Changes from [v1]:
* drop the generic submodule update framework and simply
update all submodules unconditionally, *then* perform
any required gnulib-specific step;
* handle "autogen not required" and "dry run error"
differently in cfg.mk;
* improve comments.
[v1]
https://www.redhat.com/archives/libvir-list/2017-April/msg00816.html
autogen.sh | 253 ++++++++++++++++++++++++++++++++++++++++---------------------
cfg.mk | 53 ++++++-------
2 files changed, 193 insertions(+), 113 deletions(-)
I applied this to my local git master & rebased my keycodemap code on
to it.
I then did a clean build of master, then switched to my keycodemap
branch again, and tried make. It correctly updated the new git submodule
and avoided re-running gnulib bootstrap.
So this looks to be functioning as desired.
ACK
Regards,
Daniel
--
|:
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 :|