Commit Graph

16 Commits (6f10e74fc7dbda67d049bd7e700d48470f849cf3)

Author SHA1 Message Date
Christopher Baines 4cb036d604
emacs-build-system: Change how patch-el-files substitutes commands.
Previously the regex would match from /bin/ to a closing quote. However, this
is greedy, so will match up until the last ". This causes problems when there
are several quotes on the same line, for example:

org-effectiveness.el:
196:      (call-process "/bin/bash" nil t nil "-c" strplot)

Therefore, change . to \S so that it doesn't include whitespace
characters. Changing to a lazy quantifier would be an option, if that were
supported.

* guix/build/emacs-build-system.scm (patch-el-files): Change the regular
  expression used.
2017-10-15 19:02:44 +01:00
Christopher Baines dd2de28423
emacs-build-system: Handle missing programs when patching.
Previously the string-append here would error, which isn't useful as it
doesn't tell you which command couldn't be found. To make the error
actionable, catch it earlier, and explicitly error.

* guix/build/emacs-build-system.scm (patch-el-files): Handle (which cmd)
  returning #f.
2017-10-15 19:02:43 +01:00
Christopher Baines 4363767394
build: Fix helpful output for emacs-build-system install phase.
Detecting when no files were installed was broken when switching to use
cond. Test with (not (null? ...)) to fix this.

* guix/build/emacs-build-system.scm (install): Fix detecting when no files
  were installed.
2017-09-03 19:39:11 +01:00
Christopher Baines 81fe131e0f
build: emacs-build-system: Make the install phase more helpful.
Modify the install phase to detect when nothing has been installed, and error
if this happens. This is preferable to continuing, and allowing the next phase
to fail.

Also, when nothing can be found to be installed, print out each file that was
considered, along with the regular expressions that were used to include and
exclude it.

* gnu/build/emacs-build-system.scm (install-file?): Add additional error
  checking and logging.
2017-09-01 22:00:44 +01:00
Maxim Cournoyer df34f47894
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 <arunisaac@systemreboot.net>
2017-06-08 19:45:27 +05:30
Arun Isaac d879685176
build-system: emacs: Install only a subset of files.
* 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.
2017-05-23 06:12:43 +05:30
Arun Isaac d0a26f3a68
build: emacs: Fix `store-file->elisp-source-file'.
This prevents a ".el.el" extension for source files with no version number in
their file name.

* guix/build/emacs-build-system.scm (store-file->elisp-source-file): Remove
  ".el" extension from file name before splitting to name and version.
2017-05-23 04:35:06 +05:30
Alex Kost 2831675bfd
build: emacs: Search for elisp in "share/emacs/site-lisp".
* guix/build/emacs-build-system.scm (emacs-inputs-el-directories):
Add ".../share/emacs/site-lisp" directory to the returned result as
elisp files can also be placed there.
2016-06-22 11:15:28 +03:00
David Thompson 578b96af69 build: emacs: Handle sources that are a single elisp file.
* guix/build/emacs-build-system.scm (gnu:unpack)
(store-file->elisp-source-file, unpack): New procedures.
(%standard-phases): Use the new unpack procedure.
2016-05-30 10:48:44 -04:00
Mark H Weaver a05c06720a emacs-build-system: Fix 'package-name-version->elpa-name-version'.
Fixes a regression introduced in b7c7c03eb5.

* guix/build/emacs-build-system.scm (package-name-version->elpa-name-version):
  Remove unused 'name' binding.  Do not abuse 'strip-store-file-name' to
  remove the "emacs-" prefix, which worked before b7c7c03eb5 but not after.
2015-09-23 17:38:47 -04:00
Ludovic Courtès 75710da667 Merge branch 'master' into core-updates 2015-09-13 21:28:01 +02:00
Alex Kost 6480fcae24 emacs-build-system: Fix a file name of info directory.
* guix/build/emacs-build-system.scm (move-doc): Adjust to use
  "/share/info" instead of its sub-directory.
2015-09-06 12:15:51 +03:00
Ludovic Courtès 8c578a6094 utils: Move 'package-name->name+version' to (guix build utils).
* guix/utils.scm (package-name->name+version): Move to...
* guix/build/utils.scm (package-name->name+version): ... here.  New
  procedure.
* guix/build/emacs-build-system.scm (package-name->name+version):
  Remove.
2015-08-30 18:38:08 +02:00
Ludovic Courtès b7c7c03eb5 utils: Add 'strip-store-file-name'.
* guix/build/utils.scm (strip-store-file-name): New procedure.
* guix/build/emacs-build-system.scm (store-directory->name-version):
  Remove.  Update callers to use 'strip-store-file-name'.
* gnu/packages/gcc.scm (make-libstdc++-doc)[arguments]: Use
  'strip-store-file-name' instead of 'string-drop'.
2015-08-30 18:38:08 +02:00
Federico Beffa 40aee1a133 build: emacs: Fix bug and improvement robustness.
* guix/build/emacs-build-system.scm (emacs-inputs): Fix matching pattern.
  (patch-el-files): Improve regexp pattern.
2015-08-01 12:37:13 +02:00
Federico Beffa e9137a5310 build: Add 'emacs-build-system'.
* Makefile.am (MODULES): Add 'guix/build-system/emacs.scm' and
  'guix/build/emacs-build-system.scm'.
* guix/build-system/emacs.scm: New file.
* guix/build/emacs-build-system.scm: New file.
* doc/guix.texi (Build Systems): Document it.
2015-07-08 10:53:05 +02:00