# HG changeset patch # User kfraser@localhost.localdomain # Date 1154527589 -3600 # Node ID 08415dfc5918b43c79177237362237b2e3b6bca3 # Parent 9a4a560d0a23eb8cc8474ff422b8e3a2735e993a [XEN] Allow quick building of individual files. For the purpose of quick compile testing of (namely smaller) changes, provide a means to build individual pieces underneath the xen dir (could equally be applied to tools, and the top level Makefile could also be made aware of this logic to make things even more consistent). At once, add a way to only pre-process files in case some of the more complicated macros need change and hence inspection of the results. Signed-off-by: Jan Beulich diff -r 9a4a560d0a23 -r 08415dfc5918 xen/Makefile --- a/xen/Makefile Wed Aug 02 15:01:59 2006 +0100 +++ b/xen/Makefile Wed Aug 02 15:06:29 2006 +0100 @@ -146,3 +146,15 @@ endef .PHONY: MAP MAP: $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map + +.PHONY: FORCE +FORCE: + +%.o %.i: %.c FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + +%.o %.s: %.S FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + +%/: FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o diff -r 9a4a560d0a23 -r 08415dfc5918 xen/Rules.mk --- a/xen/Rules.mk Wed Aug 02 15:01:59 2006 +0100 +++ b/xen/Rules.mk Wed Aug 02 15:06:29 2006 +0100 @@ -105,3 +105,9 @@ clean:: $(addprefix _clean_, $(subdir-al %.o: %.S $(HDRS) Makefile $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@ + +%.i: %.c $(HDRS) Makefile + $(CPP) $(CFLAGS) $< -o $@ + +%.s: %.S $(HDRS) Makefile + $(CPP) $(CFLAGS) $(AFLAGS) $< -o $@