diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-02-09 19:09:32 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-02-09 19:21:53 +0100 |
commit | 803137f4715ee7ab127a9718ca213db252193398 (patch) | |
tree | f60e81e1c47f0440d858eb9e0377286711ae56b4 /configure.ac | |
parent | 857a39265452c23d4769e6d729ae4c30e44b2973 (diff) |
configure: add --with-referenced-git option
This is similar to --with-linked-git, but:
1) It uses git submodule update --reference, so it works with submodules.
2) The created repo is a true git repo, except that its object database
reuses the referenced repo's objects, so it's a real speedup when e.g.
translations are enabled.
I intentionally didn't just fixed --with-linked-git, to make it clear
this is more like git clone --reference, not git-new-workdir.
Change-Id: I7c9584bce3670fd1e175b90aded2435cfe78056d
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index da60c50c5d90..723998ff5129 100644 --- a/configure.ac +++ b/configure.ac @@ -1202,6 +1202,14 @@ AC_ARG_WITH(linked-git, GIT_LINK_SRC=$withval , ) +AC_ARG_WITH(referenced-git, + AS_HELP_STRING([--with-referenced-git=<OTHER_CHECKOUT_DIR>], + [Specify another checkout directory to reference. This makes use of + git submodule update --reference, and saves a lot of diskspace + when having multiple trees side-by-side.]), + GIT_REFERENCE_SRC=$withval , +) + AC_ARG_WITH(vba-package-format, AS_HELP_STRING([--with-vba-package-format], [Specify package format for vba compatibility api. Specifying "builtin" @@ -11915,6 +11923,17 @@ if test -n "${GIT_LINK_SRC}"; then fi AC_SUBST(GIT_LINK_SRC) +dnl git submodule update --reference +dnl =================================================================== +if test -n "${GIT_REFERENCE_SRC}"; then + for repo in ${GIT_NEEDED_SUBMODULES}; do + if ! test -d "${GIT_REFERENCE_SRC}"/${repo}; then + AC_MSG_ERROR([referenced git: required repository does not exist: ${GIT_REFERENCE_SRC}/${repo}]) + fi + done +fi +AC_SUBST(GIT_REFERENCE_SRC) + dnl branding dnl =================================================================== AC_MSG_CHECKING([for alternative branding images directory]) |