diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-09 19:27:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-09 19:27:42 -0400 |
commit | 6aecceccf5aa626b0af203e54ca62cbf308c53d8 (patch) | |
tree | 5d4889d531c1a92b38a36ea7a8d4f4e40252082d /Makefile | |
parent | dfb863a714b81848504d3b73ca0ecae90b91cbc0 (diff) | |
parent | 5d61b9fd19d9f3cf653dbba615876e7792eea5ea (diff) |
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
perf: Use make kernelversion instead of parsing the Makefile
kbuild: Hack for depmod not handling X.Y versions
kbuild: Move depmod call to a separate script
kbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL
kbuild: Fix KERNELVERSION for empty SUBLEVEL or PATCHLEVEL
kbuild: silence Nothing to be done for 'all' message
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -378,7 +378,7 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds | |||
378 | 378 | ||
379 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) | 379 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) |
380 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) | 380 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) |
381 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 381 | KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) |
382 | 382 | ||
383 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION | 383 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION |
384 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC | 384 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC |
@@ -1005,7 +1005,7 @@ endef | |||
1005 | 1005 | ||
1006 | define filechk_version.h | 1006 | define filechk_version.h |
1007 | (echo \#define LINUX_VERSION_CODE $(shell \ | 1007 | (echo \#define LINUX_VERSION_CODE $(shell \ |
1008 | expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \ | 1008 | expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ |
1009 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) | 1009 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) |
1010 | endef | 1010 | endef |
1011 | 1011 | ||
@@ -1110,11 +1110,6 @@ modules_install: _modinst_ _modinst_post | |||
1110 | 1110 | ||
1111 | PHONY += _modinst_ | 1111 | PHONY += _modinst_ |
1112 | _modinst_: | 1112 | _modinst_: |
1113 | @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \ | ||
1114 | echo "Warning: you may need to install module-init-tools"; \ | ||
1115 | echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ | ||
1116 | sleep 1; \ | ||
1117 | fi | ||
1118 | @rm -rf $(MODLIB)/kernel | 1113 | @rm -rf $(MODLIB)/kernel |
1119 | @rm -f $(MODLIB)/source | 1114 | @rm -f $(MODLIB)/source |
1120 | @mkdir -p $(MODLIB)/kernel | 1115 | @mkdir -p $(MODLIB)/kernel |
@@ -1531,12 +1526,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) | |||
1531 | 1526 | ||
1532 | # Run depmod only if we have System.map and depmod is executable | 1527 | # Run depmod only if we have System.map and depmod is executable |
1533 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) | 1528 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) |
1534 | cmd_depmod = \ | 1529 | cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE) |
1535 | if [ -r System.map -a -x $(DEPMOD) ]; then \ | ||
1536 | $(DEPMOD) -ae -F System.map \ | ||
1537 | $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) ) \ | ||
1538 | $(KERNELRELEASE); \ | ||
1539 | fi | ||
1540 | 1530 | ||
1541 | # Create temporary dir for module support files | 1531 | # Create temporary dir for module support files |
1542 | # clean it up only when building all modules | 1532 | # clean it up only when building all modules |