mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-23 18:19:39 +00:00
The problem with --no-print-directory set by default is when we run :make from vim and compilation performed by a sub-make fails, vim can't figure out the correct path to a file with error, so instead of jumping to the position of the first error, it opens a new empty file. When make prints "Entering directory ..." and "Leaving directory ..." messages, vim :make works as intended. [Alternatively, we could add -w to $(MAKE) invocations where needed, but the problem is --no-print-directory overrides -w even if -w comes later in the options list, so -w is not working. I was also thinking about detecting whether we are running from vim, but when we'll need to add detection for emacs etc., so let's keep things simple.] Cc: Andrey Vagin <avagin@openvz.org> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
58 lines
1.4 KiB
Makefile
58 lines
1.4 KiB
Makefile
ifndef ____nmk_defined__include
|
|
|
|
ifndef ____nmk_defined__msg
|
|
include $(__nmk_dir)msg.mk
|
|
endif
|
|
|
|
#
|
|
# Common vars.
|
|
SUBARCH := $(shell uname -m | sed \
|
|
-e s/i.86/x86/ \
|
|
-e s/x86_64/x86/ \
|
|
-e s/sun4u/sparc64/ \
|
|
-e s/arm.*/arm/ \
|
|
-e s/sa110/arm/ \
|
|
-e s/s390x/s390/ \
|
|
-e s/parisc64/parisc/ \
|
|
-e s/ppc64.*/ppc64/ \
|
|
-e s/mips.*/mips/ \
|
|
-e s/sh[234].*/sh/ \
|
|
-e s/aarch64.*/arm64/)
|
|
|
|
ARCH ?= $(SUBARCH)
|
|
SRCARCH := $(ARCH)
|
|
|
|
export SUBARCH ARCH SRCARCH
|
|
|
|
ifndef ____nmk_defined__tools
|
|
include $(__nmk_dir)tools.mk
|
|
endif
|
|
|
|
# Do not use make's built-in rules and variables
|
|
# (this increases performance and avoids hard-to-debug behaviour).
|
|
MAKEFLAGS += -rR
|
|
export MAKEFLAGS
|
|
|
|
# Avoid funny character set dependencies.
|
|
unexport LC_ALL
|
|
LC_COLLATE=C
|
|
LC_NUMERIC=C
|
|
export LC_COLLATE LC_NUMERIC
|
|
|
|
# Avoid interference with shell env settings.
|
|
unexport GREP_OPTIONS
|
|
|
|
# Shorthand for build.
|
|
build := -r -R -f $(__nmk_dir)main.mk makefile=Makefile obj
|
|
export build
|
|
|
|
# With specified Makefile
|
|
build-as := -r -R -f $(__nmk_dir)main.mk makefile=$$(1) obj=$$(2)
|
|
export build-as
|
|
|
|
#
|
|
# Footer.
|
|
$(__nmk_dir)scripts/include.mk:
|
|
@true
|
|
____nmk_defined__include = y
|
|
endif
|