VirtualBox

Ignore:
Timestamp:
Apr 10, 2017 4:56:21 PM (8 years ago)
Author:
vboxsync
Message:

bugref:8834: Makeself installers/Linux: indicate problems better in the exit codes
allow specifying a kernel version to build kernel modules against in our make files with the make file variable KERN_VER.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/Makefile.include.header

    r56299 r66503  
    1414# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1515#
     16
     17# Testing:
     18# * Building with KERN_VER set to an installed but non-current kernel works and
     19#   installs to the right location.
     20# * Building with KERN_DIR and/or MODULE_DIR set uses the value specified and
     21#   the default value for the unspecified one if any.
    1622
    1723#
     
    8995 #
    9096
     97 # target kernel version
     98 ifndef KERN_VER
     99  KERN_VER := $(shell uname -r)
     100 else
     101  ifneq ($(shell if test -d /lib/modules/$(KERN_VER)/build; then echo yes; fi),yes)
     102   KERN_VER := $(shell uname -r)
     103  endif
     104 endif
     105
    91106 # kernel base directory
    92107 ifndef KERN_DIR
    93   KERN_DIR := /lib/modules/$(shell uname -r)/build
     108  KERN_DIR := /lib/modules/$(KERN_VER)/build
    94109  ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
    95110   KERN_DIR := /usr/src/linux
     
    120135 ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),)
    121136  ifndef MODULE_DIR
    122    MODULE_DIR_TST := /lib/modules/$(shell uname -r)
     137   MODULE_DIR_TST := /lib/modules/$(KERN_VER)
    123138   ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes)
    124139    MODULE_DIR := $(MODULE_DIR_TST)/misc
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette