[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/6] Don't use implicit rules for Makefile
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 5/6] Don't use implicit rules for Makefile |
Date: |
Tue, 6 Oct 2009 21:11:14 +0200 |
This remove implicit rules + implicit variables.
Explicit rules like the generation of %.h and %.c from %.hx still works
as expected.
As an added bonus, now the output of make -d is readable.
As another added bonus, time spend on Makefiles is way smaller.
We run make -j3 in a fully compiled tree, and results are:
Before:
$ time make -j3
real 0m1.225s
user 0m1.660s
sys 0m0.253s
After:
$ time make -j3
real 0m0.422s
user 0m0.393s
sys 0m0.248s
Signed-off-by: Juan Quintela <address@hidden>
---
rules.mak | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/rules.mak b/rules.mak
index 54ac88a..b380903 100644
--- a/rules.mak
+++ b/rules.mak
@@ -1,4 +1,16 @@
+# Don't use implicit rules or variables
+# we have explicit rules for everything
+MAKEFLAGS += -rR
+
+# Files with this suffixes are final, don't try to generate them
+# using implicit rules
+%.d:
+%.h:
+%.c:
+%.m:
+%.mak:
+
%.o: %.c
$(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) -c -o $@ $<," CC
$(TARGET_DIR)$@")
--
1.6.2.5
- [Qemu-devel] [PATCH 0/6] *** SUBJECT HERE ***, Juan Quintela, 2009/10/06
- [Qemu-devel] [PATCH 1/6] AIOLIBS is not used anywhere, Juan Quintela, 2009/10/06
- [Qemu-devel] [PATCH 2/6] optionrom: remove use of implicit RM variable, Juan Quintela, 2009/10/06
- [Qemu-devel] [PATCH 3/6] add build-all to .PHONY rules, Juan Quintela, 2009/10/06
- [Qemu-devel] [PATCH 4/6] optionrom: create .PHONY variable, Juan Quintela, 2009/10/06
- [Qemu-devel] [PATCH 5/6] Don't use implicit rules for Makefile,
Juan Quintela <=
- [Qemu-devel] [PATCH 6/6] configure and Makefile are not generated in qemu, Juan Quintela, 2009/10/06