Skip to contentSkip to conversation

Set INSTALL_HDR_PATH on command line

DISCUSSION Jonas Bonn 2 participants 2 messages Apr 22, 2010 Kbuild

lore
Share & tools
lore

Jonas Bonn

author
#0 lore raw

In the toplevel Linux Makefile, INSTALL_HDR_PATH is hardcoded as follows:

# Kernel headers

#Default location for installed headers
export INSTALL_HDR_PATH = $(objtree)/usr

Should this not be done with ?= so that the install path can be overridden on the command line?

export INSTALL_HDR_PATH ?= $(objtree)/usr

This would make installation of headers for cross-build environments simpler. Or am I missing something else?

Regards,
Jonas

#1 lore raw
Quoted 5 lines · Jonas Bonn

In the toplevel Linux Makefile, INSTALL_HDR_PATH is hardcoded as follows:

# Kernel headers

Quoted 7 lines

#Default location for installed headers
export INSTALL_HDR_PATH = $(objtree)/usr

Should this not be done with ?= so that the install path can be overridden on the command line?

export INSTALL_HDR_PATH ?= $(objtree)/usr

What you can do today is:

make INSTALL_HDR_PATH=/my/dir

Difference between "=" and "?=" is that the latter only assign a new value if the variables was not defined.

Sam