build: Expand ‘scripts/guix’ at Make time.

This moves the complexity of Autotools variable expansion outside of the
application code.

* scripts/guix.in (config-lookup): Delete.
(maybe-augment-load-paths!, run-guix-main): Use fully expanded variables
instead of calling ‘config-lookup’.
* configure.ac: Don't use AC_CONFIG_FILES for ‘scripts/guix’.
Use AC_PROG_SED.
* Makefile.am (scripts/guix): New rule.
(do_subst): New variable.
(CLEANFILES, EXTRA_DIST): Adapt.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Mathieu Lirzin 2018-01-17 17:14:24 +01:00 committed by Ludovic Courtès
parent 341afe2a36
commit cba386c129
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
3 changed files with 25 additions and 29 deletions

View file

@ -124,6 +124,8 @@ dnl Make sure we don't suffer from the bug in 'equal?' wrt. syntax objects
dnl found in 2.2.1. See <https://bugs.gnu.org/29903>.
GUIX_ASSERT_SYNTAX_OBJECT_EQUAL
AC_PROG_SED
dnl Decompressors, for use by the substituter and other modules.
AC_PATH_PROG([GZIP], [gzip])
AC_PATH_PROG([BZIP2], [bzip2])
@ -272,7 +274,6 @@ AC_CONFIG_FILES([Makefile
po/packages/Makefile.in
guix/config.scm])
AC_CONFIG_FILES([scripts/guix], [chmod +x scripts/guix])
AC_CONFIG_FILES([test-env:build-aux/test-env.in], [chmod +x test-env])
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
[chmod +x pre-inst-env])