|
Lines 261-266
Link Here
|
| 261 |
kbuild_output="$(getfilevar KBUILD_OUTPUT ${KV_DIR}/Makefile)" |
261 |
kbuild_output="$(getfilevar KBUILD_OUTPUT ${KV_DIR}/Makefile)" |
| 262 |
OUTPUT_DIR="${OUTPUT_DIR:-${kbuild_output}}" |
262 |
OUTPUT_DIR="${OUTPUT_DIR:-${kbuild_output}}" |
| 263 |
|
263 |
|
|
|
264 |
# Using `make kernelrelease' |
| 265 |
if [ -f "${KV_DIR}/.kernelrelease" ] ; then |
| 266 |
# get the info from ${KV_DIR}/.kernelrelease |
| 267 |
KV_MAJOR="$( cat ${KV_DIR}/.kernelrelease | cut -d. -f1 )" |
| 268 |
KV_MINOR="$( cat ${KV_DIR}/.kernelrelease | cut -d. -f2 )" |
| 269 |
KV_PATCH="$( cat ${KV_DIR}/.kernelrelease | cut -d. -f3 )" |
| 270 |
KV_EXTRA="$( cat ${KV_DIR}/.kernelrelease | cut -d. -f4 )" |
| 271 |
else |
| 264 |
# And contrary to existing functions I feel we shouldn't trust the |
272 |
# And contrary to existing functions I feel we shouldn't trust the |
| 265 |
# directory name to find version information as this seems insane. |
273 |
# directory name to find version information as this seems insane. |
| 266 |
# so we parse ${KV_DIR}/Makefile |
274 |
# so we parse ${KV_DIR}/Makefile |
|
Lines 268-273
Link Here
|
| 268 |
KV_MINOR="$(getfilevar PATCHLEVEL ${KV_DIR}/Makefile)" |
276 |
KV_MINOR="$(getfilevar PATCHLEVEL ${KV_DIR}/Makefile)" |
| 269 |
KV_PATCH="$(getfilevar SUBLEVEL ${KV_DIR}/Makefile)" |
277 |
KV_PATCH="$(getfilevar SUBLEVEL ${KV_DIR}/Makefile)" |
| 270 |
KV_EXTRA="$(getfilevar EXTRAVERSION ${KV_DIR}/Makefile)" |
278 |
KV_EXTRA="$(getfilevar EXTRAVERSION ${KV_DIR}/Makefile)" |
|
|
279 |
fi |
| 271 |
|
280 |
|
| 272 |
if [ -z "${KV_MAJOR}" -o -z "${KV_MINOR}" -o -z "${KV_PATCH}" ] |
281 |
if [ -z "${KV_MAJOR}" -o -z "${KV_MINOR}" -o -z "${KV_PATCH}" ] |
| 273 |
then |
282 |
then |