xen/Makefile: remove all temporary files for every architecture
PATCH 1/1 xen/Makefile: remove all temporary files for every architecture
Execute the clean target for both arm and x86 architecture.
When trying to build Xen for a different architecture in the same
tree, the command make clean will only remove temporary files for
the host architecture.
This will lead a compilation error when trying to build ARM64 and
ARM32 Xen in the same tree.
(See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)
--- xen/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/Makefile +2 -1
@@ -115,7 +115,8 @@ _clean: delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 clean $(MAKE) -f $(BASEDIR)/Rules.mk -C test clean $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) clean find . \( -name "*.o" -o -name ".*.d" -o -name "*.gcno" \) -exec rm -f {} \;
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 19 lines · Luca Miccio
Execute the clean target for both arm and x86 architecture.
When trying to build Xen for a different architecture in the same
tree, the command make clean will only remove temporary files for
the host architecture.
This will lead a compilation error when trying to build ARM64 and
ARM32 Xen in the same tree.
(See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)Signed-off-by Luca Miccio <[email protected]>--- xen/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)xen/Makefile +0
-0
xen/Makefile _clean: delete-unfresh-files · line 119
Quoted 6 lines
xen/Makefile +2
-1@@ -115,7 +115,8 @@ _clean: delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 clean
A more future-proof way of doing this is to use find to collect a list of directory under arch/ and iterate.
But I don't see a new architecture support coming any time soon, so this is just a suggestion.
Quoted 6 lines
xen/Makefile +0
-0$(MAKE) -f $(BASEDIR)/Rules.mk -C test clean $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) clean find . \( -name "*.o" -o -name ".*.d" -o -name "*.gcno" \) -exec rm -f {} \;Signature · 1 line
2.11.0
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 30 lines · Wei Liu
Quoted 19 lines · Luca Miccio
Execute the clean target for both arm and x86 architecture.
When trying to build Xen for a different architecture in the same
tree, the command make clean will only remove temporary files for
the host architecture.
This will lead a compilation error when trying to build ARM64 and
ARM32 Xen in the same tree.
(See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)Signed-off-by Luca Miccio <[email protected]>--- xen/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)xen/Makefile +0
-0xen/Makefile _clean: delete-unfresh-files · line 119
Quoted 6 lines
xen/Makefile +2
-1@@ -115,7 +115,8 @@ _clean: delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 cleanA more future-proof way of doing this is to use find to collect a list of directory under
arch/and iterate.
Quoted 3 lines
But I don't see a new architecture support coming any time soon, so this is just a suggestion.
Also, you seem to have missed overriding TARGET_ARCH and TARGET_SUBARCH. I believe there are references to them in arch-specific Makefiles.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 37 lines
Il giorno 23 mar 2017, alle ore 12:20, Wei Liu <[email protected]> ha scritto:
Quoted 33 lines · Wei Liu
Quoted 19 lines · Luca Miccio
Execute the clean target for both arm and x86 architecture.
When trying to build Xen for a different architecture in the same
tree, the command make clean will only remove temporary files for
the host architecture.
This will lead a compilation error when trying to build ARM64 and
ARM32 Xen in the same tree.
(See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)Signed-off-by Luca Miccio <[email protected]>---
xen/Makefile | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)xen/Makefile +0
-0xen/Makefile _clean: delete-unfresh-files · line 119
Quoted 6 lines
xen/Makefile +2
-1@@ -115,7 +115,8 @@ _clean: delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 cleanA more future-proof way of doing this is to use find to collect a list of directory under
arch/and iterate.But I don't see a new architecture support coming any time soon, so this is just a suggestion.
I had the same doubt, but, as you said there is no new architecture support coming soon. However i could add this option.
Quoted 5 lines
Also, you seem to have missed overriding
TARGET_ARCHandTARGET_SUBARCH. I believe there are references to them in arch-specific Makefiles.Wei.
I don’t get your point/suggestion. When we use “make clean”, with my patch applied, we simply execute the clean target for every architecture supported for now.
I took a look at the clean target used both from the arm and the x86 Makefile and i didn’t find any references to TARGET_ARCH and TARGET_SUBARCH.
Also, with the current command:
$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
The target clean is called only for the $TARGET_ARCH architecture, which, if it’s not set ( "make clean | distclean" at the xen root directory), is the host one.
Maybe i’m missing something.
Luca.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 41 lines · Luca Miccio
Quoted 37 lines
Il giorno 23 mar 2017, alle ore 12:20, Wei Liu <[email protected]> ha scritto:
Quoted 33 lines · Wei Liu
Quoted 19 lines · Luca Miccio
Execute the clean target for both arm and x86 architecture.
When trying to build Xen for a different architecture in the same
tree, the command make clean will only remove temporary files for
the host architecture.
This will lead a compilation error when trying to build ARM64 and
ARM32 Xen in the same tree.
(See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)Signed-off-by Luca Miccio <[email protected]>---
xen/Makefile | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)xen/Makefile +0
-0xen/Makefile _clean: delete-unfresh-files · line 119
Quoted 6 lines
xen/Makefile +2
-1@@ -115,7 +115,8 @@ _clean: delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 cleanA more future-proof way of doing this is to use find to collect a list of directory under
arch/and iterate.But I don't see a new architecture support coming any time soon, so this is just a suggestion.
I had the same doubt, but, as you said there is no new architecture support coming soon. However i could add this option.
Quoted 1 line
Quoted 9 lines
Quoted 4 lines
Also, you seem to have missed overriding
TARGET_ARCHandTARGET_SUBARCH. I believe there are references to them in arch-specific Makefiles.Wei.
I don’t get your point/suggestion. When we use “make clean”, with my patch applied, we simply execute the clean target for every architecture supported for now.
I took a look at the clean target used both from the arm and the x86Makefileand i didn’t find any references toTARGET_ARCHandTARGET_SUBARCH.
OK. I think this is fine then.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 10 lines · Luca Miccio
Execute the clean target for both arm and x86 architecture.
When trying to build Xen for a different architecture in the same
tree, the command make clean will only remove temporary files for
the host architecture.
This will lead a compilation error when trying to build ARM64 and
ARM32 Xen in the same tree.
(See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)Signed-off-by Luca Miccio <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel