linux/debian/patches/features/all/xen/hardcode-xen-makefile.patch

51 lines
1.7 KiB
Diff

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index e89ae81..302d893 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -74,12 +74,6 @@ $(warning kbuild: Makefile.build is included improperly)
endif
ifeq ($(CONFIG_XEN),y)
-$(objtree)/scripts/Makefile.xen: $(srctree)/scripts/Makefile.xen.awk $(srctree)/scripts/Makefile.build
- @echo ' Updating $@'
- $(if $(shell echo a | $(AWK) '{ print gensub(/a/, "AA", "g"); }'),\
- ,$(error 'Your awk program does not define gensub. Use gawk or another awk with gensub'))
- @$(AWK) -f $< $(filter-out $<,$^) >$@
-
xen-src-single-used-m := $(patsubst $(srctree)/%,%,$(wildcard $(addprefix $(srctree)/,$(single-used-m:.o=-xen.c))))
xen-single-used-m := $(xen-src-single-used-m:-xen.c=.o)
single-used-m := $(filter-out $(xen-single-used-m),$(single-used-m))
diff --git a/scripts/Makefile.xen b/scripts/Makefile.xen
new file mode 100644
index 0000000..c1cf128
--- /dev/null
+++ b/scripts/Makefile.xen
@@ -0,0 +1,27 @@
+$(obj)/%.s: $(src)/%-xen.c FORCE
+ $(call if_changed_dep,cc_s_c)
+
+$(obj)/%.i: $(src)/%-xen.c FORCE
+ $(call if_changed_dep,cc_i_c)
+
+$(obj)/%.symtypes : $(src)/%-xen.c FORCE
+ $(call if_changed_dep,cc_symtypes_c)
+
+$(obj)/%.o: $(src)/%-xen.c FORCE
+ $(call cmd,force_checksrc)
+ $(call if_changed_rule,cc_o_c)
+
+$(xen-single-used-m): $(obj)/%.o: $(src)/%-xen.c FORCE
+ $(call cmd,force_checksrc)
+ $(call if_changed_rule,cc_o_c)
+ @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
+
+$(obj)/%.lst: $(src)/%-xen.c FORCE
+ $(call if_changed_dep,cc_lst_c)
+
+$(obj)/%.s: $(src)/%-xen.S FORCE
+ $(call if_changed_dep,as_s_S)
+
+$(obj)/%.o: $(src)/%-xen.S FORCE
+ $(call if_changed_dep,as_o_S)
+