mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 04:15:49 +00:00
build: allow for local gnulib diffs
Commit f7bd00c12
pulled in a gnulib module that fails to compile
on mingw. While it would be nice to pull in a newer version of
.gnulib that fixes this, it is difficult to backport any .gnulib
update to older releases. So, it makes sense to take advantage
of gnulib-tool's ability to support local diffs, where we can
apply specific diffs in our use of gnulib without waiting for
upstream gnulib to pick up those changes, as well as avoiding
a wholesale .gnulib update. The existence of local diffs will
also make it easier to backport fixes against a tarball (as long
as a tarball and libvirt.git share the same .gnulib commit, then
the tarball can be patched by applying the same local diffs as
a post-release libvirt.git commit, without having to rerun an
entire gnulib-tool bootstrap).
This patch introduces the framework for supporting local diffs,
without actually introducing any.
* bootstrap.conf (local_gl_dir): New variable.
* autogen.sh (bootstrap_hash): Hash any local diffs, to force a
re-bootstrap if just diffs change.
* cfg.mk (_update_required): Likewise.
This commit is contained in:
parent
0dbc10a89e
commit
676fdf8cb5
@ -41,10 +41,13 @@ fi
|
|||||||
# is required. The first is just the SHA1 that selects a gnulib snapshot.
|
# is required. The first is just the SHA1 that selects a gnulib snapshot.
|
||||||
# The second ensures that whenever we change the set of gnulib modules used
|
# The second ensures that whenever we change the set of gnulib modules used
|
||||||
# by this package, we rerun bootstrap to pull in the matching set of files.
|
# by this package, we rerun bootstrap to pull in the matching set of files.
|
||||||
|
# The third ensures that whenever we change the set of local gnulib diffs,
|
||||||
|
# we rerun bootstrap to pull in those diffs.
|
||||||
bootstrap_hash()
|
bootstrap_hash()
|
||||||
{
|
{
|
||||||
git submodule status | sed 's/^[ +-]//;s/ .*//'
|
git submodule status | sed 's/^[ +-]//;s/ .*//'
|
||||||
git hash-object bootstrap.conf
|
git hash-object bootstrap.conf
|
||||||
|
git ls-tree -d HEAD gnulib/local | awk '{print $3}'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ensure that whenever we pull in a gnulib update or otherwise change to a
|
# Ensure that whenever we pull in a gnulib update or otherwise change to a
|
||||||
|
@ -160,9 +160,10 @@ fi
|
|||||||
|
|
||||||
# Tell gnulib to:
|
# Tell gnulib to:
|
||||||
# require LGPLv2+
|
# require LGPLv2+
|
||||||
|
# apply any local diffs in gnulib/local/ dir
|
||||||
# put *.m4 files in new gnulib/m4/ dir
|
# put *.m4 files in new gnulib/m4/ dir
|
||||||
# put *.[ch] files in new gnulib/lib/ dir.
|
# put *.[ch] files in new gnulib/lib/ dir
|
||||||
# import gnulib tests in new gnulib/tests/ dir.
|
# import gnulib tests in new gnulib/tests/ dir
|
||||||
gnulib_name=libgnu
|
gnulib_name=libgnu
|
||||||
m4_base=gnulib/m4
|
m4_base=gnulib/m4
|
||||||
source_base=gnulib/lib
|
source_base=gnulib/lib
|
||||||
@ -172,6 +173,7 @@ gnulib_tool_option_extras="\
|
|||||||
--with-tests\
|
--with-tests\
|
||||||
--avoid=pt_chown\
|
--avoid=pt_chown\
|
||||||
"
|
"
|
||||||
|
local_gl_dir=gnulib/local
|
||||||
|
|
||||||
# Convince bootstrap to use multiple m4 directories.
|
# Convince bootstrap to use multiple m4 directories.
|
||||||
: ${ACLOCAL=aclocal}
|
: ${ACLOCAL=aclocal}
|
||||||
|
1
cfg.mk
1
cfg.mk
@ -627,6 +627,7 @@ ifeq (0,$(MAKELEVEL))
|
|||||||
test -f po/Makevars || { echo 1; exit; }; \
|
test -f po/Makevars || { echo 1; exit; }; \
|
||||||
actual=$$(git submodule status | $(_submodule_hash); \
|
actual=$$(git submodule status | $(_submodule_hash); \
|
||||||
git hash-object bootstrap.conf; \
|
git hash-object bootstrap.conf; \
|
||||||
|
git ls-tree -d HEAD gnulib/local | awk '{print $$3}'; \
|
||||||
git diff .gnulib); \
|
git diff .gnulib); \
|
||||||
stamp="$$($(_submodule_hash) $(_curr_status) 2>/dev/null)"; \
|
stamp="$$($(_submodule_hash) $(_curr_status) 2>/dev/null)"; \
|
||||||
test "$$stamp" = "$$actual"; echo $$?)
|
test "$$stamp" = "$$actual"; echo $$?)
|
||||||
|
Loading…
Reference in New Issue
Block a user