@@ -230,18 +230,21 @@ include: $(BASEDIR)/arch/x86/include/asm/asm-macros.h
$(obj)/asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P
$(BASEDIR)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/Makefile
- echo '#if 0' >$@.new
- echo '.if 0' >>$@.new
- echo '#endif' >>$@.new
- echo '#ifndef __ASM_MACROS_H__' >>$@.new
- echo '#define __ASM_MACROS_H__' >>$@.new
- echo 'asm ( ".include \"$@\"" );' >>$@.new
- echo '#endif /* __ASM_MACROS_H__ */' >>$@.new
- echo '#if 0' >>$@.new
- echo '.endif' >>$@.new
- cat $< >>$@.new
- echo '#endif' >>$@.new
- $(call move-if-changed,$@.new,$@)
+ $(call filechk,asm-macros.h)
+
+define filechk_asm-macros.h
+ echo '#if 0'; \
+ echo '.if 0'; \
+ echo '#endif'; \
+ echo '#ifndef __ASM_MACROS_H__'; \
+ echo '#define __ASM_MACROS_H__'; \
+ echo 'asm ( ".include \"$@\"" );'; \
+ echo '#endif /* __ASM_MACROS_H__ */'; \
+ echo '#if 0'; \
+ echo '.endif'; \
+ cat $<; \
+ echo '#endif'
+endef
$(obj)/efi.lds: AFLAGS-y += -DEFI
$(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE
@@ -255,7 +258,7 @@ $(obj)/efi/mkreloc: $(src)/efi/mkreloc.c
.PHONY: clean
clean::
- rm -f *.lds *.new boot/*.o boot/*~ boot/core boot/mkelf32
+ rm -f *.lds boot/*.o boot/*~ boot/core boot/mkelf32
rm -f asm-macros.i $(BASEDIR)/arch/x86/include/asm/asm-macros.*
rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d $(BASEDIR)/.xen.elf32
rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc