VirtualBox

Ignore:
Timestamp:
Sep 16, 2010 7:40:20 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65919
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/VBoxNetAdp/linux/Makefile

    r32256 r32537  
    7272        math/gcc/umoddi3.o
    7373endif
     74
     75ifneq ($(MAKECMDGOALS),clean)
    7476
    7577ifeq ($(KERNELRELEASE),)
     
    211213        install -m 0664 $(MODULE).$(MODULE_EXT) $(MODULE_DIR)
    212214
     215else # eq ($(MAKECMDGOALS),clean)
     216
     217 ifndef KERN_DIR
     218  KERN_DIR := /lib/modules/$(shell uname -r)/build
     219  ifeq ($(wildcard $(KERN_DIR)/Makefile),)
     220   KERN_DIR := /usr/src/linux
     221  endif
     222 endif
     223 ifeq ($(wildcard $(KERN_DIR)/Makefile),)
     224
     225clean:
     226        find . \( -name \*.o -o -name \*.cmd \) -print0 | xargs -0 rm -f
     227        rm -rf .tmp_ver* $(MODULE).* Module.symvers Modules.symvers modules.order
     228
     229 else
     230
    213231clean:
    214232        $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -C $(KERN_DIR) clean
     233
     234 endif
     235
     236endif # eq($(MAKECMDGOALS),clean)
Note: See TracChangeset for help on using the changeset viewer.

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