as errors.
(fail-on-warning): Use it.
* lisp/Makefile.in (fail-on-warning): New rule to compile with warnings as
errors.
* dgnushack.el (dgnushack-compile-error-on-warn): New function to call
dgnushack-compile with error-on-warn enabled, and to signal an error if
clean compilation failed.
(dgnushack-compile): New argument 'error-on-warn'. If non-nil, compile
with `byte-compile-error-on-warn'. Return nil if errors occured.
+2011-04-06 David Engster <dengste@eml.cc>
+
+ * Makefile.in (lick-fail-on-warning): New rule to compile with warnings
+ as errors.
+ (fail-on-warning): Use it.
+
2011-03-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
* Makefile.in (warn): Add a dummy "warn" target.
all: lick info
-fail-on-warning: all
+fail-on-warning: lick-fail-on-warning info
lick:
cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" all
+lick-fail-on-warning:
+ cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" fail-on-warning
+
install:
cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" install
cd texi && $(MAKE) EMACS="$(EMACS)" install
+2011-04-06 David Engster <dengste@eml.cc>
+
+ * Makefile.in (fail-on-warning): New rule to compile with warnings as
+ errors.
+
+ * dgnushack.el (dgnushack-compile-error-on-warn): New function to call
+ dgnushack-compile with error-on-warn enabled, and to signal an error if
+ clean compilation failed.
+ (dgnushack-compile): New argument 'error-on-warn'. If non-nil, compile
+ with `byte-compile-error-on-warn'. Return nil if errors occured.
+
2011-04-06 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el: Don't use ERT if it's not available. Load it
warn: clean-some gnus-load.el
$(EMACS_COMP) --eval '(dgnushack-compile t)' 2>&1 | egrep -v "variable G|inhibit-point-motion-hooks|coding-system|temp-results|variable gnus|variable nn|scroll-in-place|deactivate-mark|filladapt-mode|byte-code-function-p|print-quoted|ps-right-header|ps-left-header|article-inhibit|print-escape|ssl-program-arguments|message-log-max"
+fail-on-warning: clean-some gnus-load.el
+ $(EMACS_COMP) -f dgnushack-compile-error-on-warn
+
# The "clever" rule is unsafe, since redefined macros are loaded from
# .elc files, and not the .el file.
clever some l: gnus-load.el
dgnushack-compile."
(dgnushack-compile t))
-(defun dgnushack-compile (&optional warn)
+(defun dgnushack-compile-error-on-warn ()
+ "Call dgnushack-compile with minimal warnings, but with error-on-warn ENABLED.
+This means that every warning will be reported as an error."
+ (unless (dgnushack-compile nil t)
+ (error "Error during byte compilation (warnings were reported as errors!).")))
+
+(defun dgnushack-compile (&optional warn error-on-warn)
;;(setq byte-compile-dynamic t)
(unless warn
(setq byte-compile-warnings
'(free-vars unresolved callargs redefine suspicious)))
(let ((files (directory-files srcdir nil "^[^=].*\\.el$"))
+ (compilesuccess t)
;;(byte-compile-generate-call-tree t)
file elc)
;; Avoid barfing (from gnus-xmas) because the etc directory is not yet
(when (or (not (file-exists-p
(setq elc (concat (file-name-nondirectory file) "c"))))
(file-newer-than-file-p file elc))
- (ignore-errors
- (byte-compile-file file))))))
+ (if error-on-warn
+ (let ((byte-compile-error-on-warn t))
+ (unless (ignore-errors
+ (byte-compile-file file))
+ (setq compilesuccess nil)))
+ (ignore-errors
+ (byte-compile-file file)))))
+ compilesuccess))
(defun dgnushack-recompile ()
(require 'gnus)