VirtualBox

Changeset 68044 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Jul 19, 2017 12:04:01 PM (7 years ago)
Author:
vboxsync
Message:

bugref:3809: Linux installer maintenance
Try to fix dependencies on driver sources in Additions installer make file.

This change tries to duplicate the way dependencies on kernel module sources
are handled in the Linux host installer make file to ensure that the
Additions installer is always rebuilt when one of the source files changes.
There are lots of other clean-ups in the host make file which would be
worth copying, but I will put that off for whenever I need to change related
parts of the Additions make file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/Makefile.kmk

    r66191 r68044  
    4545VBOX_LNX_ADD_INST_OTHER_DIR       := $(VBOX_LNX_ADD_INST_OUT_DIR)other/
    4646VBOX_LNX_ADD_INST_KMOD_DIR_BASE   := $(VBOX_LNX_ADD_INST_OUT_DIR)src/
    47 VBOX_LNX_ADD_INST_KMOD_DIR        := $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE)vboxguest-$(VBOX_VERSION_STRING)/
     47# This is a symbolic link, so no trailing slash.
     48VBOX_LNX_ADD_INST_KMOD_PATH       := $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE)vboxguest-$(VBOX_VERSION_STRING)
    4849VBOX_LNX_ADD_INST_INIT_DIR        := $(VBOX_LNX_ADD_INST_OUT_DIR)init/
    4950
     
    5354        $(VBOX_LNX_ADD_INST_SBIN_DIR) \
    5455        $(if $(VBOX_WITH_CROGL),$(VBOX_LNX_ADD_INST_LIB_DIR),) \
    55         $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE) \
    56         $(VBOX_LNX_ADD_INST_KMOD_DIR) \
    5756        $(VBOX_LNX_ADD_INST_INIT_DIR)
    5857
     
    109108OTHER_CLEAN += \
    110109        $(PACKING) \
     110        $(VBOX_LNX_ADD_INST_KMOD_PATH) \
    111111        $(foreach file, $(VBOX_LNX_ADD_ARCHIVES), $(VBOX_LNX_ADD_INST_STAGE_DIR)$(subst -r$(VBOX_SVN_REV),,$(notdir $(file))))
    112112
     
    154154        vboxvideo_drv.o
    155155
    156 VBOX_LNX_ADD_KMOD_FILES = Makefile build_in_tmp
    157 VBOX_LNX_ADD_KMOD_DIRS =  vboxguest/ vboxsf/ vboxvideo/
    158 
    159156VBOX_LNX_ADD_INIT = \
    160157        vboxadd \
     
    173170        $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_MOD)) \
    174171        $(addprefix $(VBOX_LNX_ADD_INST_OTHER_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \
    175         $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_FILES)) \
    176172        $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT))
    177 
    178 ## @todo figure how to clean these... Or maybe rewrite everything here to somehow use install targets?
    179 VBOX_LNX_ADD_INST_DIRS := \
    180         $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_DIRS))
    181173
    182174VBOX_LNX_ADD_DBG_FILES := \
     
    271263endif
    272264
    273 # pattern rules for copying the VBOX_LNX_ADD_KMOD files to the installation directory
    274 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_DIRS)): \
    275                 $(VBOX_LNX_ADD_INST_KMOD_DIR)% : \
    276                 $(PATH_STAGE_BIN)/additions/src/% \
    277                 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*) \
    278                 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*/*) \
    279                 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*/*/*) \
    280                 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*/*/*/*) \
    281                 $(wildcard $(PATH_STAGE_BIN)/additions/src/%*/*/*/*/*) \
    282                 $(VBOX_VERSION_STAMP) $(VBOX_SVN_REV_HEADER) \
    283                 | $$(dir $$(patsubst $$(PERCENT)/,$$(PERCENT),$$@))
    284         $(call MSG_INST_DIR,$<,$@)
    285         $(QUIET)$(RM) -Rf $(filter-out $(VBOX_LNX_ADD_INST_KMOD_DIR),$(wildcard $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE)*/))
    286         $(QUIET)$(CP) -RPf -- $< $@
    287 
    288 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD_FILES)): \
    289                 $(VBOX_LNX_ADD_INST_KMOD_DIR)% : \
    290                 $(PATH_STAGE_BIN)/additions/src/% \
    291                 | $$(dir $$(patsubst $$(PERCENT)/,$$(PERCENT),$$@))
    292         $(call MSG_INST_FILE,$<,$@)
    293         $(QUIET)$(CP) -RPf -- $< $@
     265include $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest
     266VBOX_LNX_ADD_INST_FILES_VBOXGUEST=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxguest/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXGUEST_NOBIN)))))
     267include $(PATH_ROOT)/src/VBox/Additions/linux/sharedfolders/files_vboxsf
     268VBOX_LNX_ADD_INST_FILES_VBOXSF=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxsf/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN)))))
     269include $(PATH_ROOT)/src/VBox/Additions/linux/drm/files_vboxvideo_drv
     270VBOX_LNX_ADD_INST_FILES_VBOXVIDEO=$(patsubst =>%,$(PATH_STAGE_BIN)/additions/src/vboxvideo/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN)))))
     271
     272# special rule for the kernel modules
     273$(VBOX_LNX_ADD_INST_KMOD_DIR_BASE): $(PATH_STAGE_BIN)/additions/src/ | $(dir $@)
     274        $(call MSG_INST_SYM,$<,$@)
     275        $(QUIET)$(RM) -Rf $@
     276        $(QUIET)$(MKDIR) $@
     277        $(QUIET)$(LN_SYMLINK) $< $(VBOX_LNX_ADD_INST_KMOD_PATH)
    294278
    295279INSTALLS += GuestDrivers-src
     
    408392        $(lnx_add_inst-license_2_STAGE_TARGETS) \
    409393        $(VBOX_LNX_ADD_INST_FILES) \
    410         $(VBOX_LNX_ADD_INST_DIRS)
     394        $(VBOX_LNX_ADD_INST_KMOD_DIR_BASE)
     395
     396VBOX_LNX_ADD_INST_ARCH_DEPS := \
     397        $(VBOX_LNX_ADD_ARCH_FILES) \
     398        $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \
     399        $(VBOX_VERSION_STAMP) \
     400        $(VBOX_LNX_ADD_INST_FILES_VBOXGUEST) \
     401        $(VBOX_LNX_ADD_INST_FILES_VBOXSF) \
     402        $(VBOX_LNX_ADD_INST_FILES_VBOXVIDEO)
    411403
    412404#
     
    414406#
    415407$(VBOX_LNX_ADD_ARCHIVE.$(KBUILD_TARGET_ARCH)): \
    416                 $(VBOX_LNX_ADD_ARCH_FILES) \
    417                 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \
    418                 $(VBOX_VERSION_STAMP)
     408                $(VBOX_LNX_ADD_INST_ARCH_DEPS)
    419409        $(call MSG_L1,Packing $@)
    420410        $(QUIET)$(RM) -f -- $(wildcard $(dir $@)VBoxGuestAdditions-*r*.tar.bz2)
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