]> git.neil.brown.name Git - history.git/commitdiff
kbuild: Handle the "no modules" case
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Mon, 10 Feb 2003 15:07:25 +0000 (09:07 -0600)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Mon, 10 Feb 2003 15:07:25 +0000 (09:07 -0600)
When the user selects CONFIG_MODVERSIONS but doesn't build anything
modular, the post-processing step does nothing (right, as there is
nothing to be done), but it also gave an error, which it shouldn't.

scripts/Makefile.modver

index 0c2a5df8fc87862a3b18a0fa17b874dfc1ab760f..73b0da7b8f9623f2fb1d7e23f0bc6c99644c6e5d 100644 (file)
@@ -9,11 +9,12 @@ include scripts/Makefile.lib
 
 #
 
-__modules := $(shell cd $(MODVERDIR); cat *.mod)
+__modules := $(shell cat /dev/null $(wildcard $(MODVERDIR)/*.mod))
 modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))
 
 ifneq ($(filter-out $(modules),$(__modules)),)
-  $(warning *** Uh-oh, you have stale module entries. You messed with SUBDIRS, don't complain if something goes wrong.)
+  $(warning *** Uh-oh, you have stale module entries. You messed with SUBDIRS,)
+  $(warning     do not complain if something goes wrong.)
 endif
 
 __modversions: $(modules)