VirtualBox

Ignore:
Timestamp:
Sep 16, 2010 7:40:20 AM (14 years ago)
Author:
vboxsync
Message:

Linux host drivers: another fix for the clean rule (the kernel directory is not necessarily available)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/Makefile

    r32256 r32537  
    7676        math/gcc/umoddi3.o
    7777endif
     78
     79ifneq ($(MAKECMDGOALS),clean)
    7880
    7981ifeq ($(KERNELRELEASE),)
     
    215217        install -m 0664 $(MODULE).$(MODULE_EXT) $(MODULE_DIR)
    216218
     219else # eq ($(MAKECMDGOALS),clean)
     220
     221 ifndef KERN_DIR
     222  KERN_DIR := /lib/modules/$(shell uname -r)/build
     223  ifeq ($(wildcard $(KERN_DIR)/Makefile),)
     224   KERN_DIR := /usr/src/linux
     225  endif
     226 endif
     227 ifeq ($(wildcard $(KERN_DIR)/Makefile),)
     228
     229clean:
     230        find . \( -name \*.o -o -name \*.cmd \) -print0 | xargs -0 rm -f
     231        rm -rf .tmp_ver* $(MODULE).* Module.symvers Modules.symvers modules.order
     232
     233 else
     234
    217235clean:
    218236        $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -C $(KERN_DIR) clean
     237
     238 endif
     239
     240endif # eq($(MAKECMDGOALS),clean)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette