kbuild: add modules_sign to no-{compiler,sync-config}-targets
[linux-2.6-block.git] / scripts / depmod.sh
CommitLineData
fc4da9a3 1#!/bin/sh
b2441318 2# SPDX-License-Identifier: GPL-2.0
fc4da9a3
MM
3#
4# A depmod wrapper used by the toplevel Makefile
5
5a144a1a
MY
6if test $# -ne 2; then
7 echo "Usage: $0 /sbin/depmod <kernelrelease>" >&2
fc4da9a3
MM
8 exit 1
9fi
10DEPMOD=$1
11KERNELRELEASE=$2
12
934193a6 13if ! test -r System.map ; then
f0b0d88a 14 echo "Warning: modules_install: missing 'System.map' file. Skipping depmod." >&2
fc4da9a3
MM
15 exit 0
16fi
8937e897 17
cedd1862
LT
18# legacy behavior: "depmod" in /sbin, no /sbin in PATH
19PATH="$PATH:/sbin"
934193a6 20if [ -z $(command -v $DEPMOD) ]; then
914b087f 21 echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
934193a6 22 echo "This is probably in the kmod package." >&2
914b087f 23 exit 0
934193a6
RD
24fi
25
fc4da9a3
MM
26set -- -ae -F System.map
27if test -n "$INSTALL_MOD_PATH"; then
28 set -- "$@" -b "$INSTALL_MOD_PATH"
29fi
4d15c9fa 30exec "$DEPMOD" "$@" "$KERNELRELEASE"