shim: don't let build modify shim.config
authorJuergen Gross <jgross@suse.com>
Fri, 20 Apr 2018 15:47:55 +0000 (17:47 +0200)
committerWei Liu <wei.liu2@citrix.com>
Mon, 23 Apr 2018 13:30:46 +0000 (14:30 +0100)
Currently building the shim will modify shim.config in case some config
option was added or modified in the hypervisor.

Avoid that by copying shim.config to an intermediate file instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/firmware/xen-dir/Makefile

index a7e69ae77707296b21817ac076556f053c76353f..84648c3faf498207da5b7ee6fb4511f392b528e0 100644 (file)
@@ -41,16 +41,12 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
 $(D): linkfarm.stamp
        $(MAKE) -C $(D)/xen distclean
 
-.PHONY: shim-%config
-shim-%config: $(D) FORCE
-       $(MAKE) -C $(D)/xen $*config \
-               XEN_CONFIG_EXPERT=y \
-               KCONFIG_CONFIG=$(CURDIR)/shim.config
-
-xen-shim: $(D) shim-olddefconfig
-       $(MAKE) -C $(D)/xen build \
-               XEN_CONFIG_EXPERT=y \
-               KCONFIG_CONFIG=$(CURDIR)/shim.config
+$(D)/xen/.config: shim.config $(D)
+       cp $< $@
+       $(MAKE) -C $(@D) olddefconfig XEN_CONFIG_EXPERT=y
+
+xen-shim: $(D)/xen/.config
+       $(MAKE) -C $(<D) build XEN_CONFIG_EXPERT=y
        ln -sf $(D)/xen/xen $@
        ln -sf $(D)/xen/xen-syms $@-syms