Search Linux Wireless

[PATCH 7/7] compat: optimize building by extending .PHONY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxx>

I've started reading make -d output to realize that GNU Make
is pretty simple but darn stupid and needs a little help in
direction. Traditionally GNU Make will try to see if it needs
Makefile* generation. I can count 18 variations of Makefile it
looks for:

Makefile
Makefile.c
Makefile.C
Makefile.cc
Makefile.cpp
Makefile.f
Makefile.F
Makefile.l
Makefile.mod
Makefile.o
Makefile.p
Makefile.r
Makefile.s
Makefile.S
Makefile.sh
Makefile.w
Makefile.web
Makefile.y

GNU Make will look for targets in the Makefile for each of these...

GNU Make will also look for these 18 variations of files for each
target that it does not a target rule for. There are two ways to
help GNU Make do the right thing, write a simple empty target rule [0]
or just extend the target into the .PHONY target. Lets just extend
the .PHONY target with the items we see in make -d are not needed.
This simple change forces GNU Make to skip 36 lookups of false
targets.

[0] Makefile : ;

Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxx>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 9e676ed..82d4cbb 100644
--- a/Makefile
+++ b/Makefile
@@ -69,4 +69,4 @@ clean:
 clean-files := Module.symvers modules.order Module.markers compat/modules.order
 clean-files += modules $(COMPAT_CONFIG) $(COMPAT_AUTOCONF)
 
-.PHONY: all install clean
+.PHONY: all install clean modules Makefile
-- 
1.7.4.15.g7811d

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux