diff --git a/.gitignore b/.gitignore index beac034784..c94c51ade3 100644 --- a/.gitignore +++ b/.gitignore @@ -295,7 +295,6 @@ xen/include/xen/acm_policy.h xen/include/xen/compile.h xen/include/xen/hypercall-defs.h xen/include/xen/lib/x86/cpuid-autogen.h -xen/source xen/test/livepatch/config.h xen/test/livepatch/expect_config.h xen/test/livepatch/*.livepatch diff --git a/xen/Makefile b/xen/Makefile index 745a3fadab..e89fc461fc 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -310,7 +310,6 @@ cmd_makefile = { \ } > Makefile outputmakefile: - $(Q)ln -fsn $(srctree) source ifdef building_out_of_srctree $(Q)if [ -f $(srctree)/.config -o \ -d $(srctree)/include/config -o \ @@ -321,6 +320,7 @@ ifdef building_out_of_srctree echo >&2 "***"; \ false; \ fi + $(Q)ln -fsn $(srctree) source $(call cmd,makefile) $(Q)test -e .gitignore || \ { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore diff --git a/xen/common/efi/efi-common.mk b/xen/common/efi/efi-common.mk index 53fdb81583..23cafcf20c 100644 --- a/xen/common/efi/efi-common.mk +++ b/xen/common/efi/efi-common.mk @@ -5,11 +5,16 @@ CFLAGS-y += -fshort-wchar CFLAGS-y += -iquote $(srctree)/common/efi CFLAGS-y += -iquote $(srcdir) +source := +ifneq ($(abs_objtree),$(abs_srctree)) +source := source/ +endif + # Part of the command line transforms $(obj) # e.g.: It transforms "dir/foo/bar" into successively # "dir foo bar", ".. .. ..", "../../.." $(obj)/%.c: $(srctree)/common/efi/%.c FORCE - $(Q)ln -nfs $(subst $(space),/,$(patsubst %,..,$(subst /, ,$(obj))))/source/common/efi/$(