@@ 18170,6 18170,19 @@ restrict the text width to 80 characters.")
(arguments
`(#:test-command '("make" "test")
#:phases (modify-phases %standard-phases
+ ;; The files auto-generated by `emacs-build-system' cause
+ ;; the Makefile target `compile' to fail (due to missing
+ ;; `lexical-binding' directives in the generated files).
+ ;; Since `emacs-build-system' already byte-compiles the
+ ;; source files (to `.elc' files), `make compile' is not
+ ;; needed anyway. Additionally, the `clean' target must be
+ ;; inhibited as it deletes all `.elc' files in the source
+ ;; directory, which, however, are part of the installation.
+ (add-after 'unpack 'patch-makefile
+ (lambda _
+ (substitute* "Makefile"
+ (("test: compile clean")
+ "test:"))))
;; Set HOME, otherwise tests fail on loading aspell dict.
(add-before 'check 'set-home
(lambda _ (setenv "HOME" (getcwd)))))))