| # A depmod wrapper used by the toplevel Makefile |
| echo "Usage: $0 /sbin/depmod <kernelrelease>" >&2 |
| if ! test -r System.map -a -x "$DEPMOD"; then |
| # older versions of depmod require the version string to start with three |
| # numbers, so we cheat with a symlink here |
| tmp_dir=$(mktemp -d ${TMPDIR:-/tmp}/depmod.XXXXXX) |
| mkdir -p "$tmp_dir/lib/modules/$KERNELRELEASE" |
| if "$DEPMOD" -b "$tmp_dir" $KERNELRELEASE 2>/dev/null; then |
| if test -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep" -o \ |
| -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep.bin"; then |
| if $depmod_hack_needed; then |
| symlink="$INSTALL_MOD_PATH/lib/modules/99.98.$KERNELRELEASE" |
| ln -s "$KERNELRELEASE" "$symlink" |
| KERNELRELEASE=99.98.$KERNELRELEASE |
| if test -n "$INSTALL_MOD_PATH"; then |
| set -- "$@" -b "$INSTALL_MOD_PATH" |
| "$DEPMOD" "$@" "$KERNELRELEASE" |
| if $depmod_hack_needed; then |