Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty...
[sfrench/cifs-2.6.git] / scripts / Makefile.modpost
index 2a4d1a176526d33f48695eba3ad422d0befa3fec..002089141df448fa569688a3e5e57b130d68e88b 100644 (file)
@@ -63,7 +63,7 @@ kernelsymfile := $(objtree)/Module.symvers
 modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers
 
 # Step 1), find all modules listed in $(MODVERDIR)/
-__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
+__modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
 modules   := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o)))
 
 # Stop after building .o files if NOFINAL is set. Makes compile tests quicker