Message ID | e6bcfa87-aa12-97dd-23f4-d2f085e2e4f6@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | tools/x86: adjust populating of tools/include/xen/ | expand |
Jan Beulich writes ("[PATCH v2 2/2] tools/x86: move arch-specific include/xen/ population into arch-specific rule"): > There's no need for the common "xen-dir" rule to have an arch-specific > part when there already is a arch-specific rule where this can be taken > care of (arguably instead of all-y this might better be xendir-y > anyway). Thanks, but I do not like this change. IMO make commands should be primarily organised by their logical function and role in the file. If that means that multiple targets have arch-specific parts, so be it. IMO it is not right to move something from xen-dir to all just to reduce the number of different targets with arch-specific parts. Ian.
--- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -29,14 +29,12 @@ xen-dir: ln -s ../xen-foreign xen/foreign ln -s $(XEN_ROOT)/xen/include/acpi/platform acpi/ ln -s $(XEN_ROOT)/xen/include/acpi/ac*.h acpi/ -ifeq ($(CONFIG_X86),y) + +all-$(CONFIG_X86): xen-dir ln -s $(XEN_ROOT)/xen/include/asm-x86 xen/asm mkdir -p xen/lib/x86 - ln -s $(filter-out %autogen.h,$(wildcard $(XEN_ROOT)/xen/include/xen/lib/x86/*.h)) xen/lib/x86/ + ln -s $(filter-out %-autogen.h,$(wildcard $(XEN_ROOT)/xen/include/xen/lib/x86/*.h)) xen/lib/x86/ ln -s $(XEN_ROOT)/xen/include/xen/lib/x86/Makefile xen/lib/x86/ -endif - -all-$(CONFIG_X86): xen-dir $(MAKE) -C xen/lib/x86 all XEN_ROOT=$(XEN_ROOT) PYTHON=$(PYTHON) # Not xen/xsm as that clashes with link to
There's no need for the common "xen-dir" rule to have an arch-specific part when there already is a arch-specific rule where this can be taken care of (arguably instead of all-y this might better be xendir-y anyway). Also change the pattern from *autogen.h to *-autogen.h. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- v2: Insert dash in pattern. Re-base over changed earlier patch. --- I was tempted to move the "xen-dir" dependency from all-$(CONFIG_X86) to the general all-y, but perhaps that's less related and hence should really be a separate change (and there may also be arguments against that).