Skip to contentSkip to conversation

allow building of individual files or sub-directories

PATCH New Jan Beulich 1 participant 1 message Aug 2, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 allow building of individual files or sub-directories

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.

xen/Makefile +12 -0
@@ -150,3 +150,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
xen/Rules.mk +6 -0
@@ -106,3 +106,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 $@

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel