diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-09-29 04:45:14 -0500 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-09-29 04:45:14 -0500 |
| commit | 62c299d799ad404298317df64767288ca5fe1d9b (patch) | |
| tree | 1be4532cb1eec5f08cf884aa57955dcc7b8ac0a2 /Rules.make | |
| parent | 8c83fc55de409400c330d6c817bf62d587c5a941 (diff) | |
kbuild: Make KBUILD_VERBOSE=0 work better under emacs
(slightly modified to unconditionally add the relative path to the subdir)
Rusty Russel wrote:
"M-x compile" in emacs stars a compilation and can jump to the next
error. With KBUILD_VERSBOSE=0 (as I have in my env, great work Kai)
it can't figure out the directory, since it doesn't see the make[XXX]
markers.
This makes it work.
Diffstat (limited to 'Rules.make')
| -rw-r--r-- | Rules.make | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Rules.make b/Rules.make index 443ae6a90ce5..79e4ef291c24 100644 --- a/Rules.make +++ b/Rules.make @@ -517,6 +517,13 @@ ifneq ($(cmd_files),) include $(cmd_files) endif +# Emacs compile mode works best with relative paths to find files (OK +# if verbose, as it tracks the make[1] entries and exits, etc.) + +ifneq ($(KBUILD_VERBOSE),1) + filter-output = 2>&1 | sed 's \(^[^/][A-Za-z0-9_./-]*:[ 0-9]\) $(RELDIR)/\1 ' +endif + # function to only execute the passed command if necessary if_changed = $(if $(strip $? \ @@ -536,7 +543,7 @@ if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ $(filter-out $(cmd_$@),$(cmd_$(1)))),\ @set -e; \ $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ - $(cmd_$(1)); \ + $(cmd_$(1)) $(filter-output); \ $(TOPDIR)/scripts/fixdep $(depfile) $@ $(TOPDIR) '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \ rm -f $(depfile); \ mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) |
