From df34f478944217b8621315acbe21d1f1dd63f4be Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 3 Jun 2017 23:43:02 -0700 Subject: build-system: emacs: Factorize include/exclude default arguments. The `install' phase of the emacs-build-system contained default arguments duplicated from the host side `emacs-build' procedure. This change factorizes them so that: 1. They are not duplicated. 2. They can be reused and extended easily when defining emacs packages. * guix/build/emacs-build-system.scm (%default-include, %default-exclude): New variables. (install): Use %default-include and %default-exclude as default arguments. * guix/build-system/emacs.scm: Use and re-export %default-include, %default-exclude from (guix build emacs-build-system). (emacs-build): Use %default-include and %default-exclude as default arguments. Signed-off-by: Arun Isaac --- guix/build-system/emacs.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'guix/build-system') diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm index 9a46ecfd26..02296829c6 100644 --- a/guix/build-system/emacs.scm +++ b/guix/build-system/emacs.scm @@ -17,6 +17,8 @@ ;;; along with GNU Guix. If not, see . (define-module (guix build-system emacs) + #:use-module ((guix build emacs-build-system) + #:select (%default-include %default-exclude)) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix packages) @@ -28,7 +30,10 @@ #:use-module (srfi srfi-26) #:export (%emacs-build-system-modules emacs-build - emacs-build-system)) + emacs-build-system) + #:re-export (%default-include ;for convenience + %default-exclude)) + ;; Commentary: ;; @@ -83,8 +88,8 @@ (phases '(@ (guix build emacs-build-system) %standard-phases)) (outputs '("out")) - (include ''("^[^/]*\\.el$" "^[^/]*\\.info$" "^doc/.*\\.info$")) - (exclude ''("^\\.dir-locals\\.el$" "-pkg\\.el$" "^[^/]*tests?\\.el$")) + (include (quote %default-include)) + (exclude (quote %default-exclude)) (search-paths '()) (system (%current-system)) (guile #f) -- cgit v1.2.3