]> xenbits.xensource.com Git - xen.git/commitdiff
[XEN] Allow quick building of individual files.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 2 Aug 2006 14:06:29 +0000 (15:06 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 2 Aug 2006 14:06:29 +0000 (15:06 +0100)
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 <jbeulich@novell.com>
xen/Makefile
xen/Rules.mk

index d9f5322eb648f3b1cca5463da29af575e5f864e9..cad1dc1407a76d973dde3b3925e52008f89e6a8d 100644 (file)
@@ -146,3 +146,15 @@ _cscope:
 .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
index 17a0eb04aaa0ff371d549e7b69dbfe3774f542a4..15c0af3cc11491af1ff1b83b0802e1cee8b7619a 100644 (file)
@@ -105,3 +105,9 @@ _clean_%/: FORCE
 
 %.o: %.S $(HDRS) Makefile
        $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@
+
+%.i: %.c $(HDRS) Makefile
+       $(CPP) $(CFLAGS) $< -o $@
+
+%.s: %.S $(HDRS) Makefile
+       $(CPP) $(CFLAGS) $(AFLAGS) $< -o $@