criu/scripts/nmk/scripts/include.mk
Kir Kolyshkin d5df3bf2ac nmk: return --no-print-directory
A year ago this flag was removed, as parts of criu were build in
sub-directories (i.e. by using make -C SUBDIR), and therefore
paths printed by make were relevant to a SUBDIR rather than top
source dir, which prevented tools like vim from jumping to a
correct source file with with error (for more details, see
commit XXXXXX "nmk: remove no-print-directory from MAKEFLAGS").

Now, as we have everything (except Documentation and test, which
is rather minor) built from top source directory, we can finally
add the flag back and enjoy cleaner output.

Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-06 20:44:08 +03:00

56 lines
1.3 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 --no-print-directory
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_defined__include = y
endif