From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edlNl-00010l-Bk for guix-patches@gnu.org; Mon, 22 Jan 2018 18:20:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edlNi-00088a-6c for guix-patches@gnu.org; Mon, 22 Jan 2018 18:20:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59057) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edlNi-00088V-3n for guix-patches@gnu.org; Mon, 22 Jan 2018 18:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1edlNh-0002lX-Pd for guix-patches@gnu.org; Mon, 22 Jan 2018 18:20:01 -0500 Subject: [bug#30147] Simplify =?UTF-8?Q?=E2=80=9Cscripts/guix=E2=80=9D?= Resent-Message-ID: Date: Mon, 22 Jan 2018 12:19:58 -0600 From: Eric Bavier Message-ID: <20180122121958.2eb9d1b4@centurylink.net> In-Reply-To: <87inc0i8yt.fsf@gnu.org> References: <87inc0i8yt.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/XcsPGi2tTS13wWB.od_qb9p"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Mathieu Lirzin Cc: 30147@debbugs.gnu.org --Sig_/XcsPGi2tTS13wWB.od_qb9p Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 17 Jan 2018 20:25:14 +0100 Mathieu Lirzin wrote: > This moves the complexity of Autotools variable expansion outside of the > application code. >=20 > * scripts/guix.in (config-lookup): Delete. > (maybe-augment-load-paths!, run-guix-main): Use fully expanded variables > instead of calling =E2=80=98config-lookup=E2=80=99. > * configure.ac: Don't use AC_CONFIG_FILES for =E2=80=98scripts/guix=E2=80= =99. > * Makefile.am (scripts/guix): New rule. > (do_subst): New variable. > (CLEANFILES, EXTRA_DIST): Adapt. FWIW this is what my Joy compiler does for its entry script. It works well. https://notabug.org/bavier/joy-in-the-morning.git > +scripts/guix: scripts/guix.in Makefile > + $(AM_V_GEN)rm -f $@ $@-t \ > + && $(MKDIR_P) $(@D) \ > + && $(do_subst) <$(srcdir)/$@.in >$@-t \ > + && chmod a+x,a-w $@-t && mv -f $@-t $@ I think. since there's no state variables that needs to carry accross commands, that this would read better without the line continuations and appropriate use of $(AM_V_at). While we're looking at it: I'm not certain, but I think Guix currently work if one overrides the "prefix" variable when invoking 'make install', which is a use-case suggested by the GNU Coding Standards (Section 7.2.5). I bring it up because adding '$(prefix)/bin/guix' to the above rule might be a start. > +;; Run Guix. > +(let ((guix-main (module-ref (resolve-interface '(guix ui)) 'guix-main))) > + (bindtextdomain "guix" "@localedir@") > + (bindtextdomain "guix-packages" "@localedir@") > ;; XXX: It would be more convenient to change it to: > ;; (exit (run-guix-main)) > ;; but since the 'guix' command is not updated by 'guix pull', we cann= ot > ;; really do it now. > - (run-guix-main)) > + (apply guix-main (command-line))) If we're going to be patching scripts/guix.in, would now be the time to add the '(exit ...)'? Otherwise LGTM! `~Eric --Sig_/XcsPGi2tTS13wWB.od_qb9p Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEoMXjUi7471xkzbfw/XPKxxnTJWYFAlpmK04ACgkQ/XPKxxnT JWZsBBAAl42XaOQ2DzwWfveboU1lVl+90J8sosuhsRiaGmT/CyWIDiREvukLEyRi kKdl1oUjZZu1AjBn0PXmco6WAhE8TmnmlZBAq0QKf0ziAMBOihe+QAxJyxWXlngy 2lpmJMFkcCVBWQ97yqtH9Poygt/kZ0ezCgDaNfCdvTvMQXpkrpSTCfR0GEpHajSi SdXU2nv3sYVLZB48NZ2f8CtyuPqoNI88GdUdgrnjApJUVJqvTunky46Sz5x8y7Bl V05WPkh+Bshuq8lXg/TME9sg+MFPQLMw5Fynh+PmU1vPy7OSzgauKaG5s8/qFc+S FQow8M418vy3V7nKHSMiG7Bg02bvfNeQFkA4gXCP5ScK4HqN7nJeaYq8ZXFaATVQ avvdjWEb++W0De7OgbFsxKWeMThGSUfGUaZ02UhxI2VQuHkKAn6zKeWQNkvD898e epQDTfKcJ/Jd2KqCtc24pOIRMOGXcUFt933sTDRdl09JNv1pz1sGCpdxiIL0VmJa rtgkk6CJfS7Ki2gja7woHPcyzPLAsePbQj3E0op7dpbflzgXS7PX817pehaLMy1E 4kLpMHIiLOoW4aSEb5No339yIrXSuxwEGfW8jDk5tpFcsIhmR/ssfoT/VsGe4+BL q38GfhnFJPDVVvi8WjXycPpRtkk2DgGeFVSS8EDaQQLG2213bBU= =+c8u -----END PGP SIGNATURE----- --Sig_/XcsPGi2tTS13wWB.od_qb9p--