docs: Add note on a better M-x compile for chrome.
We usually want to run the compile from the top directory, so here's a snippet to allow you to do it. Probably needs some customization on the targets etc but it's a start. BUG=None TEST=eval in emacs and M-x chromium-compile Change-Id: I144db9f9e67a69643672b89f9719d1e4bd216830 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2954680 Reviewed-by: Benoit L <lizeb@chromium.org> Commit-Queue: Junichi Uekawa <uekawa@chromium.org> Cr-Commit-Position: refs/heads/master@{#892445}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
149c7c4fb5
commit
75d91cadfa
@ -286,7 +286,17 @@ for details.
|
||||
|
||||
See [ErcIrc](erc_irc.md).
|
||||
|
||||
## TODO
|
||||
## Compilation with M-x compile
|
||||
|
||||
* Figure out how to make `M-x compile` default to
|
||||
`cd /path/to/chrome/root; make -r chrome`.
|
||||
It's usually useful to first find the top directory with locate-dominating-file,
|
||||
and run `M-x compile`
|
||||
|
||||
```lisp
|
||||
(defun chromium-compile ()
|
||||
"Run compile for chromium."
|
||||
(interactive)
|
||||
(let ((chrome-dir (locate-dominating-file "." "chrome/BUILD.gn")))
|
||||
(when chrome-dir
|
||||
(let* ((default-directory chrome-dir))
|
||||
(compile "ninja -C out/Debug chrome chrome_sandbox ")))))
|
||||
```
|
||||
|
Reference in New Issue
Block a user