From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d21AU-00078D-PV for guix-patches@gnu.org; Sat, 22 Apr 2017 15:58:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d21AQ-0005MX-Rh for guix-patches@gnu.org; Sat, 22 Apr 2017 15:58:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d21AQ-0005MR-Nq for guix-patches@gnu.org; Sat, 22 Apr 2017 15:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d21AQ-0001Mp-Hp for guix-patches@gnu.org; Sat, 22 Apr 2017 15:58:02 -0400 Subject: bug#26559: [PATCH] build: emacs: Install only a subset of files. Resent-Message-ID: From: Alex Kost References: Date: Sat, 22 Apr 2017 22:57:05 +0300 In-Reply-To: (Arun Isaac's message of "Wed, 19 Apr 2017 13:05:25 +0530") Message-ID: <87r30k9pwu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain 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: Arun Isaac Cc: 26559@debbugs.gnu.org Arun Isaac (2017-04-19 13:05 +0530) wrote: > * guix/build/emacs-build-system.scm (install): Install files matching > #:include while excluding files matching #:exclude. > * guix/build-system/emacs.scm (emacs-build): Add keyword arguments #:include > and #:exclude. > --- > guix/build-system/emacs.scm | 6 ++++++ > guix/build/emacs-build-system.scm | 24 +++++++++++++++++++++--- > 2 files changed, 27 insertions(+), 3 deletions(-) > > diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm > index a7982002b..e6c021c7e 100644 > --- a/guix/build-system/emacs.scm > +++ b/guix/build-system/emacs.scm > @@ -83,6 +83,10 @@ > (phases '(@ (guix build emacs-build-system) > %standard-phases)) > (outputs '("out")) > + (include ''(".*.el$" ".*.el.in$" "^dir$" > + ".*.info$" ".*.texi$" ".*.texinfo$" > + "doc/dir" "doc/*.info$" "doc/*.texi$" "doc/*.texinfo$")) I think only ".*.el$", ".*.info$", and probably "doc/*.info$" are needed here. The rest regexps look useless to me. Note, however, that 'move-doc' procedure should be adjusted to find info in "doc" subdir (for "doc/*.info$" regex). > + (exclude ''("^.dir-locals.el$" "^test.el$" "^tests.el$" ".*-test.el$" ".*-tests.el$")) Don't forget to add ".*-pkg.el" here. [...] > -(define* (install #:key outputs #:allow-other-keys) > +(define* (install #:key outputs > + (include '(".*.el$" ".*.el.in$" "^dir$" > + ".*.info$" ".*.texi$" ".*.texinfo$" > + "^doc/dir" "^doc/*.info$" "^doc/*.texi$" "^doc/*.texinfo$")) > + (exclude '("^.dir-locals.el$" "^test.el$" "^tests.el$" ".*-test.el$" ".*-tests.el$")) It doesn't look right that these regexps are duplicated in 2 places. I'm not very familiar with build systems, but what if the 'include'/'exclude' arguments of 'install' procedure would simply be empty lists? I think it wouldn't do harm if you leave these regexps only in 'emacs-build' procedure or would it? -- Alex