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/Support/linux/Makefile

    r32504 r32537  
    145145endif
    146146
     147ifneq ($(MAKECMDGOALS),clean)
     148
    147149ifeq ($(KERNELRELEASE),)
    148150
     
    275277        install -m 0664 $(MODULE).$(MODULE_EXT) $(MODULE_DIR)
    276278
     279else # eq ($(MAKECMDGOALS),clean)
     280
     281 ifndef KERN_DIR
     282  KERN_DIR := /lib/modules/$(shell uname -r)/build
     283  ifeq ($(wildcard $(KERN_DIR)/Makefile),)
     284   KERN_DIR := /usr/src/linux
     285  endif
     286 endif
     287 ifeq ($(wildcard $(KERN_DIR)/Makefile),)
     288
     289clean:
     290        find . \( -name \*.o -o -name \*.cmd \) -print0 | xargs -0 rm -f
     291        rm -rf .tmp_ver* $(MODULE).* Module.symvers Modules.symvers modules.order
     292
     293 else
     294
    277295clean:
    278296        $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -C $(KERN_DIR) clean
     297
     298 endif
     299
     300endif # 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