diff options
| author | Juan Quintela <quintela@redhat.com> | 2009-10-06 21:11:14 +0200 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-06 14:46:10 -0500 |
| commit | 5ab288676522b2be3f2b2b1b32ee11b06e1e2de2 (patch) | |
| tree | 411d2ed69bf4f533b352d1e586cf1afa160f77ab | |
| parent | 4888ec2676ef560260e30a70ec15600fc6a3085e (diff) | |
| download | focaccia-qemu-5ab288676522b2be3f2b2b1b32ee11b06e1e2de2.tar.gz focaccia-qemu-5ab288676522b2be3f2b2b1b32ee11b06e1e2de2.zip | |
Don't use implicit rules for Makefile
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 <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| -rw-r--r-- | rules.mak | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rules.mak b/rules.mak index 54ac88ab35..b380903322 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)$@") |