On Tue, Jan 13, 2015 at 11:52 AM, Nick Fitzgerald <nfitzger...@mozilla.com>
wrote:

> For those of us using Emacs:
>
> I use M-x shell as my terminal, and when combined with
> compilation-shell-minor-mode, I get the following goodies:


FYI, you can use M-x compile (or at least a wrapper around it) with a bit
of cleverness:

(defun froydnj-build-mozilla-with-mozconfig (mozconfig target)
  (let* ((objdir (shell-command-to-string
                  (format "grep MOZ_OBJDIR %s | cut -f 2 -d =" mozconfig)))
         ;; Use the first cd command so compile's intelligent setting of
         ;; default-directory works to our advantage.  Use the second cd
         ;; command so mach is invoked from the correct directory.
         (compile-command (format "cd %s; cd %s; env MOZCONFIG=%s mach
--log-no-times build %s"
                                  (remove-if #'(lambda (x) (char-equal x
?\n))
                                             objdir :from-end t :count 1)
                                  froydnj-mozilla-srcdir
                                  mozconfig
                                  target)))
    (compile compile-command)))

This gets invoked from some machinery to choose which mozconfig (six
different mozconfigs so far, full builds or "binaries" builds), but the
idea should be clear.  By setting compilation-buffer-name-function
appropriately, separate mozconfigs produce their compilation output in
separate buffers, and one can avoid cluttering up shells with compilation
output.

-Nathan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to