From nobody Fri Nov 29 14:35:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1637847662; cv=none; d=zohomail.com; s=zohoarc; b=ile3RKPahALSgo+dDYkJifrdjoL2hMvfrCUsZpN6bG0mdo7bGfL6Ha//uMaCQbSmjvTijG+GvLmKTWX/Pd5Qa+Cf3HPP7gCAKcKQSfYKqrA7HFfK3+ehbjLjIITTlPfFwH75OQCqk3JjWkDMpY0FLaiIt1g4NkLHmPntMAzABo0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847662; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0oDL4h2Em9ERU9g8kzR9wKy/6yBo2SHuviNVl/wMmeA=; b=VJzp71PwslI7Fc+BSz4Rl9BCQa5teoHad8i87n0S2VjEH2VhDjLJwDh5ngEA910OyHwrwNJGudzBWYm3SNpTj0PL09CzImDxObJM1QjiG75vHE45jISb2DA8lhBTA6YaGgeBBAaiQNR9/M4NlAsixg4ZpWPxBYk331BP2D3TTEw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1637847662652163.96250310237076; Thu, 25 Nov 2021 05:41:02 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231216.400014 (Exim 4.92) (envelope-from ) id 1mqEzX-0001Ng-JO; Thu, 25 Nov 2021 13:40:47 +0000 Received: by outflank-mailman (output) from mailman id 231216.400014; Thu, 25 Nov 2021 13:40:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzX-0001NV-FM; Thu, 25 Nov 2021 13:40:47 +0000 Received: by outflank-mailman (input) for mailman id 231216; Thu, 25 Nov 2021 13:40:46 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzV-0007NX-Pl for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:46 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 489119eb-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:40:43 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 489119eb-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847643; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+DoWpOrefy3bHbiRl5UkcJKrpDvZ4sPNeqaYR9dgkv4=; b=WSwm5w6TDp7FLQxhr/edNBrRlwO/jFdGWVuQ9DrF8qwl1A3PNKz7dWvM hr/VkKpbeZjUa/jH1ok7bgS/ufeYSZ+oLRN/SoVbtgHZygyM78Z1AwVoi yEmfsGLNwphIAHXxDRzHJlkwiVTrS/rwAtCFNxc17nCwhODBdG9cFJe9j 8=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 5SAE3Vdl+VXpcPW9+Tcu0tse76XkPGg7nmppH5xQjGlyzo8CWDvUh5KhCI1YkpWKvwxXU6NYOm zheUzYseNFauf97cUhDaJrG9Yuoa5g9LJ37icMMdnpxaH6VrFbJo9PY9sK/K+cJLUk1l9XFjY7 OWuXxNGs0fyVlv2cGWsdWZtGF8v3sllIeypFnZgCQB4i5qCz6/UhbcMw/Li+xQfOtEgPrK0iWz PiykNjzE81XebA1g6rXRWTsN4yW2ZaF/Pj3L5Ny03noHhRDT+FzttF3O3ThkZF509nrWsE2yLm 2IoF8/le0beND+pFaUgpLKEx X-SBRS: 5.1 X-MesageID: 60634096 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:li7D1awx9xALB9RWkl96t+dRwCrEfRIJ4+MujC+fZmUNrF6WrkUDz jcZCGnXafzYYWPxctslaYiyphtVusfRm9FnTApqrSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAuLeNYYH1500s6wrRk2tQAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt8ksw vZJnML3cxw0EKzuyfUNSRh1NAgraMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVors0lMMnsOpJZonx6xCvVJf0nXYrCU+PB4towMDIY2JgQRqqGN pRxhTxHRTDLUyZNOE0sEbkmkOa1iX7bdz1EgQfAzUYwyzeKl1EguFT3C/LrfdiNSdRQj1yvj GvM9GTkATkXLNWajzGC9xqEmevnjS79HoUIG9WQ/PNwnEeawGBVDRQMTEa6utGwkEv4UNVaQ 2QY4jErrLQy3EWzQ8PhQgajp3qZoh8bXcEWGOo/gCmBxabZ7ByQLnQVRT5GLto9vYk5QiJC/ l2Dks7tBDdvmKaIUn/b/bCRxRuiNC5QIWIcaCssSQoe/8KlsIw1lgjITNtoDOiylNKdMTDvw RiaoS4mnbIRgMUXkaKh8jjvmCmwr5LESgo04AT/XW+/6A59Iom/aOSA60Xf7PtGBJaUSB+Gp ndspiSFxLlQV9fXznXLGbhTWuHyjxqYDNHCqUcyFbol3mrqwWW+U4FysSBuPkZEFe9RLFcFf 3TvkQ9W4ZZSOl6jYql2f5+9BqwW8ETwKTj2fquKN4QTO/CdYCfCpXgzPhDIgwgBhWB1yflnU ap3Z/pAGprz5U5P6DOtD9kQ3rYwrszV7TOCHMurp/hLPFf3WZJ0dVvnGAfRBgzaxPndyOkwz zq4H5HXoyizqMWkPkHqHXc7dDjm10QTC5HssNBwfeWeOAdgE2xJI6aPmux+JN01z/UPyLagE pSBtqhwkgSXuJE6AV/SNiALhE3HAf6TUk7XzQRzZA31ihDPkK6k7bsFdotfQFXU3LcL8BKAd NFcI5/oKq0WElzvom1BBbGg/N0KXEn63mqmYnv6CAXTirY9HmQlDPe/JVCxnMTPZwLq3fYDT 0qIilmGHMFdHls6V647qpuHljuMgJTUo8oqN2OgHzWZUByEHFFCJ3Ojg/kpDdsLLBmflDKW2 xzPWUUTpPXXop9z+97M3PjWo4CsGup4P0xbA2iEsurmaXiEpjKukd1aTeKFXTHBT2eoqq+sU vpYkqPnO/odkVcU74clS+R3zbgz7sfErqNBylg2B23CalmmU+syInSP0cRVmLdKw7tV5Vm/V k6Vo4EIMrSVIsL1VlUWIVN9POiE0PgVnBjU7Og0fxqmtHMmouLfXBwLbReWiSFbIL9kC68fw L8s6JwM9giyqhs2KdLa3CpawHuBcy4bWKI9u5BEXIKy0lg3yktPaID3AzPt5M3dcM1FN0QnL 2PGhKfGgLgAlEPOf2BqSCrI1OtZw58PpApL3BkJIFHQwojJgfo+3Rtw9zUrT1sKkkUbgrwrY mU7ZVdoIaiu/itzgJkRVm+hLAhNGRmF9xGj0FAOjmDYExGlW2GlwLfR4gpREJT1K15hQwU= IronPort-HdrOrdr: A9a23:ZHX7Q61A/aZmQnHHy9KgcQqjBTdyeYIsimQD101hICG9Lfbo9f xGzc5rtiMc1gxwZJh5o6H/BEBEewKvyXcH2/hhAV7CZmfbUQSTXftfBOfZslrd8mjFh5FgPM RbAudD4b/LfCVHZK/BiWHSeblAsbz3lJxEnd2z854ud3AXV0gJ1XY7Nu/xKDwOeOAyP+tDKH Pq3Ls+m9PPQwVwUu2LQlMCUuT/uduOsJ79exYJCz4LgTP+zA+A2frRFRWV4wkZaihIy7s562 TJ+jaJpplLh8vLiCM0mlWjt6i/V7Pau5d+Lf3JrvJQBiTniw6uaogkc7qevAotqOXq01oumM mkmWZqAywmgUm9QkiF5T/WnyXw2jcn7HHvjXWCh2H4nMD/TDUmT+JcmINwaHLimhsdleA59J gO83OStpJRAx+Ftj/6/cL0WxZjkVfxiWY+kNQUk2dUXeIlGeFsRLQkjRNo+ao7bX7HAcEcYb RT5fjnlaxrmIahHi/kVmoG+q3lYp18JGbJMxs/Ugr86UkSoJkz9Tpp+CUlpAZ1yHrmI6M0o9 gsep4Y542mbvVmK56VV91xGPde/AT2MF/x2Fz7GyWQKEnxU0i94aIfpo9Fv92CeJsGyoY/kp WEUF4wjx90R6veM7zG4HQQyGG5fIyUZ0Wb9v1j X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634096" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v8 08/47] build: prepare to always invoke $(MAKE) from xen/, use $(obj) Date: Thu, 25 Nov 2021 13:39:27 +0000 Message-ID: <20211125134006.1076646-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847663393100003 Content-Type: text/plain; charset="utf-8" In a future patch, when building a subdirectory, we will set "obj=3D$subdir" rather than change directory. Before that, we add "$(obj)" and "$(src)" in as many places as possible where we will need to know which subdirectory is been built. "$(obj)" is for files been generated during the build, and "$(src)" is for files present in the source tree. For now, we set both to "." in Rules.mk and Makefile.clean. A few places don't tolerate the addition of "./", this is because make remove the leading "./" in targets and dependencies in rules, so these will be change later. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Acked-by: Julien Grall --- Notes: v8: - acked - rebased xen/Rules.mk | 5 ++- xen/arch/arm/Makefile | 14 ++++---- xen/arch/x86/Makefile | 48 ++++++++++++------------- xen/arch/x86/boot/Makefile | 14 ++++---- xen/arch/x86/efi/Makefile | 6 ++-- xen/common/Makefile | 8 ++--- xen/common/libelf/Makefile | 4 +-- xen/common/libfdt/Makefile | 6 ++-- xen/include/Makefile | 44 +++++++++++------------ xen/scripts/Makefile.clean | 5 ++- xen/xsm/flask/Makefile | 36 +++++++++---------- xen/xsm/flask/policy/mkaccess_vector.sh | 7 ++-- 12 files changed, 103 insertions(+), 94 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 77d359bedaf8..60d1d6c4f583 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -3,6 +3,9 @@ # Makefile and are consumed by Rules.mk # =20 +obj :=3D . +src :=3D $(obj) + -include $(BASEDIR)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk @@ -21,7 +24,7 @@ SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16,= \ $(foreach r,rel rel.ro,data.$(r).local) =20 # The filename build.mk has precedence over Makefile -include $(firstword $(wildcard build.mk) Makefile) +include $(firstword $(wildcard $(src)/build.mk) $(src)/Makefile) =20 # Linking # ------------------------------------------------------------------------= --- diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 14952275772b..c993ce72a341 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -90,18 +90,18 @@ ifeq ($(CONFIG_ARM_64),y) ln -sf $(@F) $@.efi endif =20 -$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ +$(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ @@ -111,13 +111,13 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds .PHONY: include include: =20 -xen.lds: xen.lds.S FORCE +$(obj)/xen.lds: $(src)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) =20 -dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) +$(obj)/dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) =20 .PHONY: clean clean:: - rm -f xen.lds + rm -f $(obj)/xen.lds rm -f $(BASEDIR)/.xen-syms.[0-9]* rm -f $(TARGET).efi diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index b469ec8f2452..f9af39ba6138 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -81,7 +81,7 @@ extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 ifneq ($(CONFIG_HVM),y) -x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label +$(obj)/x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label endif =20 efi-y :=3D $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \ @@ -112,8 +112,8 @@ syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNIN= GS) :=3D syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) :=3D --error-dup =20 $(TARGET): TMP =3D $(@D)/.$(@F).elf32 -$(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 - ./boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET) \ +$(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32 + $(obj)/boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET= ) \ `$(NM) $(TARGET)-syms | sed -ne 's/^\([^ ]*\) . __2M_rwdat= a_end$$/0x\1/p'` od -t x4 -N 8192 $(TMP) | grep 1badb002 > /dev/null || \ { echo "No Multiboot1 header found" >&2; false; } @@ -123,27 +123,27 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 =20 CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 -$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ +$(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ >$(@D)/$(@F).map rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* =20 -note.o: $(TARGET)-syms +$(obj)/note.o: $(TARGET)-syms $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 \ --rename-section=3D.data=3D.note.gnu.build-id -S $@.bin $@ @@ -162,25 +162,25 @@ ifdef SOURCE_DATE_EPOCH EFI_LDFLAGS +=3D --no-insert-timestamp endif =20 -$(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n '= s, A VIRT_START$$,,p') +$(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | s= ed -n 's, A VIRT_START$$,,p') ifeq ($(MKRELOC),:) relocs-dummy :=3D $(TARGET).efi: ALT_BASE :=3D else -relocs-dummy :=3D efi/relocs-dummy.o -$(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's= , A ALT_START$$,,p') +relocs-dummy :=3D $(obj)/efi/relocs-dummy.o +$(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | se= d -n 's, A ALT_START$$,,p') endif =20 ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) CFLAGS-y +=3D -DBUILD_ID_EFI EFI_LDFLAGS +=3D $(build_id_linker) -note_file :=3D efi/buildid.o +note_file :=3D $(obj)/efi/buildid.o # NB: this must be the last input in the linker call, because inputs follo= wing # the -b option will all be treated as being in the specified format. note_file_option :=3D -b pe-x86-64 $(note_file) else -note_file :=3D note.o +note_file :=3D $(obj)/note.o endif else note_file :=3D @@ -189,25 +189,25 @@ note_file_option ?=3D $(note_file) =20 ifeq ($(XEN_BUILD_PE),y) extra-y +=3D efi.lds -$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) efi.lds efi/relocs-dummy.= o efi/mkreloc +$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) $(obj)/efi.lds $(obj)/efi= /relocs-dummy.o $(obj)/efi/mkreloc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" endif $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< $(relocs-dum= my) \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< $(rel= ocs-dummy) \ $(BASEDIR)/common/symbols-dummy.o $(note_file_option) -o = $(@D)/.$(@F).$(base).0 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0= ) >$(@D)/.$(@F).0r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s= .S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s= .o $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -= o $(@D)/.$(@F).$(base).1 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1= ) >$(@D)/.$(@F).1r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s= .S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s= .o - $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \ + $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file_option) -= o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort >$(@D)/= $(@F).map @@ -219,14 +219,14 @@ $(TARGET).efi: FORCE endif =20 # These should already have been rebuilt when building the prerequisite of= "prelink.o" -efi/buildid.o efi/relocs-dummy.o: ; +$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: ; =20 .PHONY: include include: $(BASEDIR)/arch/x86/include/asm/asm-macros.h =20 -asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P +$(obj)/asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 -$(BASEDIR)/arch/x86/include/asm/asm-macros.h: asm-macros.i Makefile +$(BASEDIR)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/M= akefile echo '#if 0' >$@.new echo '.if 0' >>$@.new echo '#endif' >>$@.new @@ -240,14 +240,14 @@ $(BASEDIR)/arch/x86/include/asm/asm-macros.h: asm-mac= ros.i Makefile echo '#endif' >>$@.new $(call move-if-changed,$@.new,$@) =20 -efi.lds: AFLAGS-y +=3D -DEFI -xen.lds efi.lds: xen.lds.S FORCE +$(obj)/efi.lds: AFLAGS-y +=3D -DEFI +$(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) =20 -boot/mkelf32: boot/mkelf32.c +$(obj)/boot/mkelf32: $(src)/boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< =20 -efi/mkreloc: efi/mkreloc.c +$(obj)/efi/mkreloc: $(src)/efi/mkreloc.c $(HOSTCC) $(HOSTCFLAGS) -g -o $@ $< =20 .PHONY: clean diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index d2eb277d428f..0aec8a464364 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -1,8 +1,8 @@ obj-bin-y +=3D head.o =20 -DEFS_H_DEPS =3D defs.h $(BASEDIR)/include/xen/stdbool.h +DEFS_H_DEPS =3D $(src)/defs.h $(BASEDIR)/include/xen/stdbool.h =20 -CMDLINE_DEPS =3D $(DEFS_H_DEPS) video.h \ +CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(src)/video.h \ $(BASEDIR)/include/xen/kconfig.h \ $(BASEDIR)/include/generated/autoconf.h =20 @@ -14,10 +14,10 @@ RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(BASEDIR)/include/xen/const.h \ $(BASEDIR)/include/public/arch-x86/hvm/start_info.h =20 -head.o: cmdline.S reloc.S +$(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S =20 -cmdline.S: cmdline.c $(CMDLINE_DEPS) build32.lds - $(MAKE) -f build32.mk $@ CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" +$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) $(src)/build32.lds + $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" =20 -reloc.S: reloc.c $(RELOC_DEPS) build32.lds - $(MAKE) -f build32.mk $@ RELOC_DEPS=3D"$(RELOC_DEPS)" +$(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) $(src)/build32.lds + $(MAKE) -f build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(RELOC_DEPS)" diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index 87b927ed865b..ac815f02cb5e 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -3,16 +3,16 @@ CFLAGS-y +=3D -fshort-wchar quiet_cmd_objcopy_o_ihex =3D OBJCOPY $@ cmd_objcopy_o_ihex =3D $(OBJCOPY) -I ihex -O binary $< $@ =20 -%.o: %.ihex FORCE +$(obj)/%.o: $(src)/%.ihex FORCE $(call if_changed,objcopy_o_ihex) =20 -boot.init.o: buildid.o +$(obj)/boot.init.o: $(obj)/buildid.o =20 EFIOBJ-y :=3D boot.init.o pe.init.o ebmalloc.o runtime.o EFIOBJ-$(CONFIG_COMPAT) +=3D compat.o =20 $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary= =3D4) -$(EFIOBJ-y): CFLAGS-stack-boundary :=3D $(cflags-stack-boundary) +$(addprefix $(obj)/,$(EFIOBJ-y)): CFLAGS-stack-boundary :=3D $(cflags-stac= k-boundary) =20 obj-y :=3D stub.o obj-$(XEN_BUILD_EFI) :=3D $(filter-out %.init.o,$(EFIOBJ-y)) diff --git a/xen/common/Makefile b/xen/common/Makefile index 141d7d40d3dc..ca839118e4d1 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -75,13 +75,13 @@ obj-$(CONFIG_NEEDS_LIBELF) +=3D libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) +=3D libfdt/ =20 CONF_FILE :=3D $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(BASEDIR)/)$(KCONFI= G_CONFIG) -config.gz: $(CONF_FILE) +$(obj)/config.gz: $(CONF_FILE) gzip -n -c $< >$@ =20 -config_data.o: config.gz +$(obj)/config_data.o: $(obj)/config.gz =20 -config_data.S: $(BASEDIR)/tools/binfile FORCE - $(call if_changed,binfile,config.gz xen_config_data) +$(obj)/config_data.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile,$(obj)/config.gz xen_config_data) targets +=3D config_data.S =20 clean:: diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index a92326c982e9..8a4522e4e141 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -7,10 +7,10 @@ OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-sectio= n .$(s)=3D.init.$(s)) =20 CFLAGS-y +=3D -Wno-pointer-sign =20 -libelf.o: libelf-temp.o FORCE +$(obj)/libelf.o: $(obj)/libelf-temp.o FORCE $(call if_changed,objcopy) =20 -libelf-temp.o: $(libelf-objs) FORCE +$(obj)/libelf-temp.o: $(addprefix $(obj)/,$(libelf-objs)) FORCE $(call if_changed,ld) =20 extra-y +=3D libelf-temp.o $(libelf-objs) diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index 6bd207cf8ffa..6708af12e583 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -1,4 +1,4 @@ -include Makefile.libfdt +include $(src)/Makefile.libfdt =20 SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$= (s)) @@ -8,10 +8,10 @@ nocov-y +=3D libfdt.o =20 CFLAGS-y +=3D -I$(BASEDIR)/include/xen/libfdt/ =20 -libfdt.o: libfdt-temp.o FORCE +$(obj)/libfdt.o: $(obj)/libfdt-temp.o FORCE $(call if_changed,objcopy) =20 -libfdt-temp.o: $(LIBFDT_OBJS) FORCE +$(obj)/libfdt-temp.o: $(addprefix $(obj)/,$(LIBFDT_OBJS)) FORCE $(call if_changed,ld) =20 extra-y +=3D libfdt-temp.o $(LIBFDT_OBJS) diff --git a/xen/include/Makefile b/xen/include/Makefile index 95daa8a28975..d2f5a956a11a 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -39,57 +39,57 @@ cppflags-$(CONFIG_X86) +=3D -m32 =20 endif =20 -public-$(CONFIG_X86) :=3D $(wildcard public/arch-x86/*.h public/arch-x86/*= /*.h) -public-$(CONFIG_ARM) :=3D $(wildcard public/arch-arm/*.h public/arch-arm/*= /*.h) +public-$(CONFIG_X86) :=3D $(wildcard $(src)/public/arch-x86/*.h $(src)/pub= lic/arch-x86/*/*.h) +public-$(CONFIG_ARM) :=3D $(wildcard $(src)/public/arch-arm/*.h $(src)/pub= lic/arch-arm/*/*.h) =20 .PHONY: all -all: $(headers-y) +all: $(addprefix $(obj)/,$(headers-y)) =20 -compat/%.h: compat/%.i Makefile $(BASEDIR)/tools/compat-build-header.py - $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $@ >>$@.new; \ +$(obj)/compat/%.h: $(obj)/compat/%.i $(src)/Makefile $(BASEDIR)/tools/comp= at-build-header.py + $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $(patsubst $(obj)/%= ,%,$@) >>$@.new; \ mv -f $@.new $@ =20 -compat/%.i: compat/%.c Makefile +$(obj)/compat/%.i: $(obj)/compat/%.c $(src)/Makefile $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CF= LAGS)) $(cppflags-y) -o $@ $< =20 -compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-sou= rce.py +$(obj)/compat/%.c: $(src)/public/%.h $(src)/xlat.lst $(src)/Makefile $(BAS= EDIR)/tools/compat-build-source.py mkdir -p $(@D) - $(PYTHON) $(BASEDIR)/tools/compat-build-source.py xlat.lst <$< >$@.new + $(PYTHON) $(BASEDIR)/tools/compat-build-source.py $(src)/xlat.lst <$< >$@= .new mv -f $@.new $@ =20 -compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-field= s.sh Makefile +$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(BAS= EDIR)/tools/get-fields.sh $(src)/Makefile export PYTHON=3D$(PYTHON); \ while read what name; do \ $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ done <$(patsubst compat/%,compat/.xlat/%,$(basename $<)).lst >$@.new mv -f $@.new $@ =20 -.PRECIOUS: compat/.xlat/%.lst -compat/.xlat/%.lst: xlat.lst Makefile +.PRECIOUS: $(obj)/compat/.xlat/%.lst +$(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile mkdir -p $(@D) grep -v '^[[:blank:]]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re '= s,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new $(call move-if-changed,$@.new,$@) =20 -xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' xlat.lst | uniq) +xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(src)/xlat.lst | uniq) xlat-y :=3D $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y)) =20 -compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) config/auto.conf Makef= ile +$(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) $(obj)/c= onfig/auto.conf $(src)/Makefile cat $(filter %.h,$^) >$@.new mv -f $@.new $@ =20 ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) =20 -all: headers.chk headers99.chk headers++.chk +all: $(obj)/headers.chk $(obj)/headers99.chk $(obj)/headers++.chk =20 -PUBLIC_HEADERS :=3D $(filter-out public/arch-% public/dom0_ops.h, $(wildca= rd public/*.h public/*/*.h) $(public-y)) +PUBLIC_HEADERS :=3D $(filter-out $(src)/public/arch-% $(src)/public/dom0_o= ps.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h) $(public-y)) =20 -PUBLIC_C99_HEADERS :=3D public/io/9pfs.h public/io/pvcalls.h -PUBLIC_ANSI_HEADERS :=3D $(filter-out public/%ctl.h public/xsm/% public/%h= vm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) +PUBLIC_C99_HEADERS :=3D $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h +PUBLIC_ANSI_HEADERS :=3D $(filter-out $(src)/public/%ctl.h $(src)/public/x= sm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) =20 public/io/9pfs.h-prereq :=3D string public/io/pvcalls.h-prereq :=3D string =20 -headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile +$(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makefile for i in $(filter %.h,$^); do \ $(CC) -x c -ansi -Wall -Werror -include stdint.h \ -S -o /dev/null $$i || exit 1; \ @@ -97,7 +97,7 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile done >$@.new mv $@.new $@ =20 -headers99.chk: $(PUBLIC_C99_HEADERS) Makefile +$(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(src)/Makefile rm -f $@.new $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ @@ -107,7 +107,7 @@ headers99.chk: $(PUBLIC_C99_HEADERS) Makefile || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ =20 -headers++.chk: $(PUBLIC_HEADERS) Makefile +$(obj)/headers++.chk: $(PUBLIC_HEADERS) $(src)/Makefile rm -f $@.new if ! $(CXX) -v >/dev/null 2>&1; then \ touch $@.new; \ @@ -116,7 +116,7 @@ headers++.chk: $(PUBLIC_HEADERS) Makefile $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ | $(CXX) -x c++ -std=3Dgnu++98 -Wall -Werror -D__XEN_TOOLS__ \ - -include stdint.h -include public/xen.h \ + -include stdint.h -include $(src)/public/xen.h \ $(foreach j, $($(i)-prereq), -include c$(j)) -S -o /dev/null - \ || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ @@ -126,7 +126,7 @@ endif ifeq ($(XEN_TARGET_ARCH),x86_64) .PHONY: lib-x86-all lib-x86-all: - $(MAKE) -C xen/lib/x86 all + $(MAKE) -C $(obj)/xen/lib/x86 all =20 all: lib-x86-all endif diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 8582ec35e4da..c3b0681611da 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -3,11 +3,14 @@ # Cleaning up # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 +obj :=3D . +src :=3D $(obj) + clean:: =20 include $(BASEDIR)/scripts/Kbuild.include =20 -include Makefile +include $(src)/Makefile =20 # Figure out what we need to clean from the various variables # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 11c530dcf458..51fd37f6c4d5 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -4,46 +4,46 @@ obj-y +=3D flask_op.o =20 obj-y +=3D ss/ =20 -CFLAGS-y +=3D -I./include +CFLAGS-y +=3D -I$(obj)/include =20 AWK =3D awk =20 -FLASK_H_DEPEND =3D policy/security_classes policy/initial_sids -AV_H_DEPEND =3D policy/access_vectors +FLASK_H_DEPEND :=3D $(addprefix $(src)/policy/,security_classes initial_si= ds) +AV_H_DEPEND =3D $(src)/policy/access_vectors =20 -FLASK_H_FILES =3D include/flask.h include/class_to_string.h include/initia= l_sid_to_string.h -AV_H_FILES =3D include/av_perm_to_string.h include/av_permissions.h -ALL_H_FILES =3D $(FLASK_H_FILES) $(AV_H_FILES) +FLASK_H_FILES :=3D flask.h class_to_string.h initial_sid_to_string.h +AV_H_FILES :=3D av_perm_to_string.h av_permissions.h +ALL_H_FILES :=3D $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES)) =20 -$(obj-y) ss/built_in.o: $(ALL_H_FILES) +$(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix $(obj)/,$(= ALL_H_FILES)) extra-y +=3D $(ALL_H_FILES) =20 -mkflask :=3D policy/mkflask.sh +mkflask :=3D $(src)/policy/mkflask.sh quiet_cmd_mkflask =3D MKFLASK $@ -cmd_mkflask =3D $(SHELL) $(mkflask) $(AWK) include $(FLASK_H_DEPEND) +cmd_mkflask =3D $(SHELL) $(mkflask) $(AWK) $(obj)/include $(FLASK_H_DEPEND) =20 -$(subst include/,%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE +$(addprefix $(obj)/%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE $(call if_changed,mkflask) =20 -mkaccess :=3D policy/mkaccess_vector.sh +mkaccess :=3D $(src)/policy/mkaccess_vector.sh quiet_cmd_mkaccess =3D MKACCESS VECTOR $@ -cmd_mkaccess =3D $(SHELL) $(mkaccess) $(AWK) $(AV_H_DEPEND) +cmd_mkaccess =3D $(SHELL) $(mkaccess) $(AWK) $(obj)/include $(AV_H_DEPEND) =20 -$(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE +$(addprefix $(obj)/%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE $(call if_changed,mkaccess) =20 obj-bin-$(CONFIG_XSM_FLASK_POLICY) +=3D flask-policy.o -flask-policy.o: policy.bin +$(obj)/flask-policy.o: $(obj)/policy.bin =20 -flask-policy.S: BINFILE_FLAGS :=3D -i -flask-policy.S: $(BASEDIR)/tools/binfile FORCE - $(call if_changed,binfile,policy.bin xsm_flask_init_policy) +$(obj)/flask-policy.S: BINFILE_FLAGS :=3D -i +$(obj)/flask-policy.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile,$(obj)/policy.bin xsm_flask_init_policy) targets +=3D flask-policy.S =20 FLASK_BUILD_DIR :=3D $(CURDIR) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) =20 -policy.bin: FORCE +$(obj)/policy.bin: FORCE $(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common \ -C $(XEN_ROOT)/tools/flask/policy \ FLASK_BUILD_DIR=3D$(FLASK_BUILD_DIR) POLICY_FILENAME=3D$(POLICY_S= RC) diff --git a/xen/xsm/flask/policy/mkaccess_vector.sh b/xen/xsm/flask/policy= /mkaccess_vector.sh index 942ede4713f1..ad9772193bff 100755 --- a/xen/xsm/flask/policy/mkaccess_vector.sh +++ b/xen/xsm/flask/policy/mkaccess_vector.sh @@ -8,9 +8,12 @@ set -e awk=3D$1 shift =20 +output_dir=3D$1 +shift + # output files -av_permissions=3D"include/av_permissions.h" -av_perm_to_string=3D"include/av_perm_to_string.h" +av_permissions=3D"$output_dir/av_permissions.h" +av_perm_to_string=3D"$output_dir/av_perm_to_string.h" =20 cat $* | $awk " BEGIN { --=20 Anthony PERARD