==Name: proper-depends.patch Description: Use proper targets in makefiles A rule in make should produce only what it''s target allows. When it produces side-effects, things like ctrl-c and parallellism break it oddly. DiffStat: xen/Makefile | 9 +++++---- xen/arch/x86/Makefile | 14 ++++++++++---- xen/common/Makefile | 3 ++- xen/drivers/acpi/Makefile | 3 ++- xen/drivers/char/Makefile | 3 ++- xen/drivers/pci/Makefile | 3 ++- 6 files changed, 23 insertions(+), 12 deletions(-) ==Description: Use proper targets in makefiles A rule in make should produce only what it''s target allows. When it produces side-effects, things like ctrl-c and parallellism break it oddly. --- xen-2.0.3.orig/xen/arch/x86/Makefile +++ xen-2.0.3/xen/arch/x86/Makefile @@ -12,12 +12,18 @@ OBJS := $(subst $(TARGET_SUBARCH)/asm-offsets.o,,$(OBJS)) -default: boot/$(TARGET_SUBARCH).o $(OBJS) boot/mkelf32 - $(LD) $(LDFLAGS) -r -o arch.o $(OBJS) - $(LD) $(LDFLAGS) -T $(TARGET_SUBARCH)/xen.lds -N \ - boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $(TARGET)-syms +default: $(TARGET) + +$(TARGET): $(TARGET)-syms boot/mkelf32 ./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000 +$(CURDIR)/arch.o: $(OBJS) + $(LD) $(LDFLAGS) -r -o $@ $(OBJS) + +$(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) $(TARGET_SUBARCH)/xen.lds + $(LD) $(LDFLAGS) -T $(TARGET_SUBARCH)/xen.lds -N \ + boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $@ + asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(CC) $(CFLAGS) -S -o $@ $< --- xen-2.0.3.orig/xen/common/Makefile +++ xen-2.0.3/xen/common/Makefile @@ -19,7 +19,8 @@ OBJS := $(subst trace.o,,$(OBJS)) endif -default: $(OBJS) +default: common.o +common.o: $(OBJS) $(LD) $(LDFLAGS) -r -o common.o $(OBJS) clean: --- xen-2.0.3.orig/xen/drivers/pci/Makefile +++ xen-2.0.3/xen/drivers/pci/Makefile @@ -28,7 +28,8 @@ #obj-y += syscall.o #endif -default: $(OBJS) +default: driver.o +driver.o: $(OBJS) $(LD) $(LDFLAGS) -r -o driver.o $(OBJS) clean: --- xen-2.0.3.orig/xen/drivers/char/Makefile +++ xen-2.0.3/xen/drivers/char/Makefile @@ -1,7 +1,8 @@ include $(BASEDIR)/Rules.mk -default: $(OBJS) +default: driver.o +driver.o: $(OBJS) $(LD) $(LDFLAGS) -r -o driver.o $(OBJS) clean: --- xen-2.0.3.orig/xen/drivers/acpi/Makefile +++ xen-2.0.3/xen/drivers/acpi/Makefile @@ -6,7 +6,8 @@ OBJS := acpi_ksyms.o tables.o -default: $(OBJS) +default: driver.o +driver.o: $(OBJS) $(LD) $(LDFLAGS) -r -o driver.o $(OBJS) clean: --- xen-2.0.3.orig/xen/Makefile +++ xen-2.0.3/xen/Makefile @@ -9,14 +9,15 @@ include Rules.mk -default: $(TARGET) - gzip -f -9 < $(TARGET) > $(TARGET).gz +default: $(TARGET).gz +$(TARGET).gz: $(TARGET) + gzip -f -9 < $< > $@.new + mv $@.new $@ debug: objdump -D -S $(TARGET)-syms > $(TARGET).s -install: $(TARGET) - gzip -f -9 < $(TARGET) > $(TARGET).gz +install: $(TARGET).gz mkdir -p $(prefix)/boot install -m0644 $(TARGET).gz $(prefix)/boot install -m0644 $(TARGET)-syms $(prefix)/boot ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel