Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
kbuild: fix modules_install after a 'make vmlinux'
Browse files Browse the repository at this point in the history
make vmlinux would delete the content of $(MODVERDIR)
equals .tmp_versions. This caused a subsequent
make modules_install to fail.

Fix it so we clean the directory only for the
modules build - but we still unconditionally create it so
we can do:
make dir/file.ko
without a preceeding make modules.

Reported by David Miller <davem@davemloft.net>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Miller <davem@davemloft.net>
  • Loading branch information
sravnborg committed Oct 22, 2007
1 parent 437374e commit ab19f87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1512,8 +1512,9 @@ quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
fi

# Create temporary dir for module support files
cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR); rm -f $(MODVERDIR)/*

# clean it up only when building all modules
cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \
$(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*)

a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \
$(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
Expand Down

0 comments on commit ab19f87

Please sign in to comment.