# Copyright 2014-2020 VMware, Inc. All Rights Reserved. VMware Confidential. # Common makefile for inclusion of boilerplate macros and rules. # nvdk.inc # # Please do not edit this file. Any customizations should be done # in the per-project Makefiles. # # It is assumed that DEV_* and DESC_* variables are set by the calling # Makefile before including this file. # # Basic naming convention: # VMW_ variables defined by the devkit's infrastructure # DEV_ variables defined by the user's makefile # # We'll default various DEV_ variables if they don't have useful # values upon entry. # <<>> # These are substituted at devkit assembly time. They expand into a # set of _DIR = assignments and # a series of = settings. The latter will # refer to the former if the utility comes from a component, otherwise # it will be a reference into /build/toolchain. # # The list of components and utilities are maintained in nvdk-devtools.sc. # <<>> CAYMAN_ESX_GDB_DIR = $(shell /bin/rpm -q --qf "%{instprefixes}\n" vmware-esx-cayman_esx_gdb-1af75dbb095cc2348c35c6708c8b326ac1661974-toolchain) export GOBUILD_CAYMAN_ESX_GDB_ROOT = $(CAYMAN_ESX_GDB_DIR) CAYMAN_ESX_TOOLCHAIN_GCC6_DIR = $(shell /bin/rpm -q --qf "%{instprefixes}\n" vmware-esx-cayman_esx_toolchain_gcc6-978272870a6446e021754e84f5d75e0c6c53a9b7-toolchain) export GOBUILD_CAYMAN_ESX_TOOLCHAIN_GCC6_ROOT = $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR) CAYMAN_ESX_NCURSES_DIR = $(shell /bin/rpm -q --qf "%{instprefixes}\n" vmware-esx-cayman_esx_ncurses-9bf45330b538505c6325906c08c4ecf834184b5c-toolchain) export GOBUILD_CAYMAN_ESX_NCURSES_ROOT = $(CAYMAN_ESX_NCURSES_DIR) CAYMAN_ESX_GLIBC_2_17_DIR = $(shell /bin/rpm -q --qf "%{instprefixes}\n" vmware-esx-cayman_esx_glibc_2_17-a4e2ce5256b2142af6e1ebb001efc1c1223adcbc-toolchain) export GOBUILD_CAYMAN_ESX_GLIBC_2_17_ROOT = $(CAYMAN_ESX_GLIBC_2_17_DIR) CAYMAN_PYTHON_DIR = $(shell /bin/rpm -q --qf "%{instprefixes}\n" vmware-esx-cayman_python-99788ba0a9e40ea80ae7b05efb941377abfb31e4-toolchain) export GOBUILD_CAYMAN_PYTHON_ROOT = $(CAYMAN_PYTHON_DIR) VMW_COMPONENTS = cayman_esx_gdb cayman_esx_toolchain_gcc6 cayman_esx_ncurses cayman_esx_glibc_2_17 cayman_python VMW_COMPONENT_DIRS = $(CAYMAN_ESX_GDB_DIR) $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR) $(CAYMAN_ESX_NCURSES_DIR) $(CAYMAN_ESX_GLIBC_2_17_DIR) $(CAYMAN_PYTHON_DIR) VMW_VERSION := 7.0.1 VMW_BUILD := 16850804 VMW_BUILDTYPE := release # ARCHBITS gets defined by the including Makefile. # Given the complexity of dynamic variable naming used here, making # sure that there aren't any typos or unexpected combinations is important. # The make option --warn-undefined-variables is very useful for this, # but requires that everything be initialized. So, that's what we're # doing here. Not beautiful, but definitely worthwhile. # # Note that this is only being done for variables that we expect to be # set before we read them. If we explicitly set them in this file # before they are ever read, then there's no need to do a throw-away # initialization here. An additional quirk is that for variables # initially assigned using '=', their values aren't expanded until # they are actually needed, so it can look like we set a variable by # referencing another variable's value before that one is set, but # since the variable we're setting doesn't get expanded until later, # the referenced variable will get set before it is actually needed. # # Since there are no restrictions we can place on the user, we can't # directly test external Makefiles that include this file. The best # we can do is verify that the samples we provide are valid, and # encourage users to use make's --warn-undefined-variables for # occasional sanity checking. # Currently-supported simple variables: VMW_simpleVars = \ BUNDLE_DIR SCRATCH_DIR STAGE_DIR VIB_DIR \ \ DEV_APP DEV_BULLETIN_XML DEV_ESX_VERSION \ DEV_BUILDTYPE DEV_PROJECT DEV_PROJECT_VERSION \ DEV_VIB_BASENAME DEV_VIB_XML DEV_UW_BIN \ DESC_CONFLICTS DESC_DEPENDS \ DESC_DESCRIPTION DESC_LIVE_INSTALL_ALLOWED \ DESC_LIVE_REMOVE_ALLOWED DESC_MAINT DESC_NAME DESC_PROVIDES \ DESC_RELEASE_DATE DESC_REPLACES DESC_STATELESS_READY \ DESC_SUMMARY DESC_URLS DESC_VENDOR DESC_VENDOR_EMAIL \ DESC_VERSION \ \ BULL_KBURL BULL_VENDOR_CODE \ \ PRODUCED_VIB_NAME VIB_BULLETIN_ID VIB_BULLETIN_TEMPLATE \ # Deprecated simple variables: VMW_simpleVars += \ DESC_ESX_VERSION MODULE MODULE_VERSION $(foreach varName,$(VMW_simpleVars),$(eval $(varName) ?=)) # Variables with calculated names: VMW_typedVars = \ DEV_$(DEV_BUILDTYPE)_UW_OBJECTS # Typically, this should either be the version of ESX that this # devkit came from, or its major number followed by ".*" (such as # 5.*). The safer default is the full version, so that's what # we use if not told otherwise. ifeq ($(strip $(DEV_ESX_VERSION)),) ifneq ($(strip $(DESC_ESX_VERSION)),) $(warning WARNING: "DESC_ESX_VERSION" is being deprecated in favour of "DEV_ESX_VERSION".) override DEV_ESX_VERSION = $(DESC_ESX_VERSION) else override DEV_ESX_VERSION = $(VMW_VERSION) $(warning NOTE: Defaulting DEV_ESX_VERSION to $(DEV_ESX_VERSION) as no value was specified for it or DESC_ESX_VERSION.) endif else ifneq ($(strip $(DESC_ESX_VERSION)),) $(warning WARNING: Both "DESC_ESX_VERSION" and "DEV_ESX_VERSION" defined.) $(warning WARNING: "DESC_ESX_VERSION" is being deprecated in favour of "DEV_ESX_VERSION".) $(warning WARNING: Ignoring "DESC_ESX_VERSION".) endif # DEV_PROJECT is a more general term, since we support producing # vmkernel modules and userworld binaries. Provide backwards # compatibility during the transition period. ifeq ($(strip $(DEV_PROJECT)),) ifneq ($(strip $(MODULE)),) $(warning WARNING: "MODULE" is being deprecated in favour of "DEV_PROJECT".) override DEV_PROJECT = $(MODULE) else $(error ERROR: No value for DEV_PROJECT or MODULE specified.) endif else ifneq ($(strip $(MODULE)),) $(warning WARNING: Both "MODULE" and "DEV_PROJECT" defined.) $(warning WARNING: "MODULE" is being deprecated in favour of "DEV_PROJECT".) $(warning WARNING: Ignoring "MODULE" setting.) endif # Similarly, DEV_PROJECT_VERSION is replacing MODULE_VERSION. ifeq ($(strip $(DEV_PROJECT_VERSION)),) ifneq ($(strip $(MODULE_VERSION)),) $(warning WARNING: "MODULE_VERSION" deprecated, please use "DEV_PROJECT_VERSION".) override DEV_PROJECT_VERSION=$(MODULE_VERSION) else $(error ERROR: No value for DEV_PROJECT_VERSION or MODULE_VERSION specified.) endif else ifneq ($(strip $(MODULE_VERSION)),) $(warning WARNING: Both "MODULE_VERSION" and "DEV_PROJECT_VERSION" defined.) $(warning WARNING: "MODULE_VERSION" is being deprecated in favour of "DEV_PROJECT_VERSION".) $(warning WARNING: Ignoring "MODULE_VERSION" setting.) endif # VMW_TARGET is the kind of binary we're going to produce, such as # uw64_beta or uw64_release. DEV_TARGET_CONTEXT is "uw", # which is set as part of the binaries-related targets. DEV_TARGET_CONTEXT ?= uw VMW_TARGET = $(DEV_TARGET_CONTEXT)$(ARCHBITS)_$(DEV_BUILDTYPE) _VMW_RPM_PREFIX := vmware-esx NVDKROOT := $(shell /bin/rpm -q --qf "%{INSTPREFIXES}\n" vmware-esx-nvdk-devtools-7.0.1-0.0.16850804) # Package versions # Note that this set of compiler definitions only allows for userworld # compilation of shared objects. The flags needed for kernel # compilations are much more ornate. # Note that we link against this, but do not use it for our own runtime. GLIBC := $(shell /bin/rpm -q --qf '%{INSTPREFIXES}\n' $(_VMW_RPM_PREFIX)-cayman_esx_glibc-a4e2ce5256b2142af6e1ebb001efc1c1223adcbc-toolchain)/sysroot AWK = /build/toolchain/lin64/gawk-3.1.5/bin/awk CHMOD = /build/toolchain/lin64/coreutils-5.97/bin/chmod CP = /build/toolchain/lin64/coreutils-8.6/bin/cp ECHO = /build/toolchain/lin64/coreutils-8.6/bin/echo GREP = /build/toolchain/lin64/grep-2.5.1a/bin/grep MAKE = /build/toolchain/lin64/make-3.81/bin/make MKDIR = /build/toolchain/lin64/coreutils-8.6/bin/mkdir MV = /build/toolchain/lin64/coreutils-8.6/bin/mv RM = /build/toolchain/lin64/coreutils-8.6/bin/rm SED = /build/toolchain/lin64/sed-4.1.5/bin/sed TR = /build/toolchain/lin64/coreutils-8.6/bin/tr OBJCOPY = $(VMW_$(VMW_TARGET)_CCDIR)/x86_64-linux5.0/bin/objcopy # ARCH_SPEC is not used in the tool definitions above, because we # want to use 64-bit aware tools no matter what size object we're # working on. ifeq ($(ARCH),x86) ARCH_SPEC := i686-linux5.0 BIT_SUFFIX := else ARCH_SPEC := x86_64-linux5.0 BIT_SUFFIX := 64 endif EPK_BASE := $(shell $(NVDKROOT)/tools/find_rpm_install_dir.sh $(_VMW_RPM_PREFIX)-packaging-kit) # This is for backwards compatibility. The EPKPATH variable is # being deprecated. EPKPATH := $(EPK_BASE) # <<>> # The VMW_$context_$objtype_$parameter settings below are collected # from the corresponding SCons environments when the devkit is being # assembled. The @@name@@ instances are text-substituted as part of # the assembly process. The result is that we always use the same # compilers and flags that are used to build the ESX product, without # any manual updating. # # This comment is removed during devkit assembly, as there are no # @@name@@ substitutions left to do once the devkit is installed on # a partner's development host. No point in being unnecessarily # confusing. # <<>> VMW_uw64_beta_CCBIN = $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR)/usr/bin/x86_64-vmk-linux-gnu-gcc VMW_uw64_beta_OBJCOPYBIN = $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR)/usr/bin/x86_64-vmk-linux-gnu-objcopy VMW_uw64_beta_CPPBIN = $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR)/usr/bin/x86_64-vmk-linux-gnu-cpp VMW_uw64_beta_COMPILEFLAGS = -fno-working-directory -fno-strict-aliasing -funwind-tables -fasynchronous-unwind-tables -Wall -Werror -O2 -fno-omit-frame-pointer -pthread -fwrapv -pipe -fno-strict-aliasing -Wno-unused-but-set-variable -g -fPIC -fstack-protector -fstack-protector-all -DUSE_GOBUILD_TOOLS_VERSION -std=gnu90 -Wno-unused-value -Wno-pointer-sign -Wno-strict-prototypes -Wno-enum-compare --sysroot=$(CAYMAN_ESX_GLIBC_2_17_DIR)/sysroot -m64 -isystem $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR)/usr/lib/gcc/x86_64-vmk-linux-gnu/6.4.0/include -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=600 -D_SVID_SOURCE -DVMX86_DEBUG -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_USE_CXX11_ABI=0 -D_BSD_SOURCE -Dlinux -DVMX86_BETA VMW_uw64_release_CCBIN = $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR)/usr/bin/x86_64-vmk-linux-gnu-gcc VMW_uw64_release_OBJCOPYBIN = $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR)/usr/bin/x86_64-vmk-linux-gnu-objcopy VMW_uw64_release_CPPBIN = $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR)/usr/bin/x86_64-vmk-linux-gnu-cpp VMW_uw64_release_COMPILEFLAGS = -fno-working-directory -fno-strict-aliasing -funwind-tables -fasynchronous-unwind-tables -Wall -Werror -DNDEBUG -O2 -fno-omit-frame-pointer -pthread -fwrapv -pipe -fno-strict-aliasing -Wno-unused-but-set-variable -g -fPIC -fstack-protector -DUSE_GOBUILD_TOOLS_VERSION -std=gnu90 -Wno-unused-value -Wno-pointer-sign -Wno-strict-prototypes -Wno-enum-compare --sysroot=$(CAYMAN_ESX_GLIBC_2_17_DIR)/sysroot -m64 -isystem $(CAYMAN_ESX_TOOLCHAIN_GCC6_DIR)/usr/lib/gcc/x86_64-vmk-linux-gnu/6.4.0/include -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=600 -D_SVID_SOURCE -DVMX86_RELEASE -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_USE_CXX11_ABI=0 -D_BSD_SOURCE -Dlinux VMW_common_COMPILEFLAGS := -I $(NVDKROOT)/include VMW_common_COMPILEFLAGS += -DUSERLEVEL CNS=componentNameSpec CVS=componentVersionSpec DESC_PAYLOAD_NAME := $(shell echo $(DESC_PAYLOAD_NAME) | $(SED) -e 's/[_-]//g' | $(TR) A-Z a-z | head -c 8) COMPONENT_BASENAME=VMW-esx-$(DEV_ESX_VERSION)-$(BULL_CNS_NAME)-$(BULL_CVS_VERSION) # Usage: # objects: sources # $(CC_CMD) # The $* and $@ references take care of the grungy details as long as # the objects/sources mapping is valid. CC_CMD = $(VMW_$(VMW_TARGET)_CCBIN) -c -o $@ \ $(VMW_$(VMW_TARGET)_COMPILEFLAGS) \ $(VMW_common_COMPILEFLAGS) \ $(DEV_$(DEV_BUILDTYPE)_COMPILEFLAGS) \ $< # Usage (userworld): # deliverable: objects # $(LINK_UW_CMD) # # These assume that $(DEV_$(DEV_BUILDTYPE)_UW_OBJECTS) lists all # the object files that are to be linked to produce "deliverable". # That is, in fact, the semantic definition of those variables. LINK_UW_CMD = set -e; \ $(VMW_$(VMW_TARGET)_CCBIN) -o $@ \ $(VMW_$(VMW_TARGET)_COMPILEFLAGS) \ $(DEV_$(DEV_BUILDTYPE)_UW_OBJECTS) \ $(DEV_$(DEV_BUILDTYPE)_PRE_LIBS) \ $(LDFLAGS) \ $(DEV_$(DEV_BUILDTYPE)_POST_LIBS); \ $(VMW_$(VMW_TARGET)_OBJCOPYBIN) -g $@ $@-stripped # VIB specific paths VIBAUTHOR = $(EPK_BASE)/bin/vibauthor PARTNER_DEPOT_AUTHOR = $(EPK_BASE)/bin/partnerDepotAuthor VIB_BULLETIN_TEMPLATE = $(EPK_BASE)/sample/bulletin-template.xml VIB_DESCRIPTOR_TEMPLATE = $(EPK_BASE)/sample/descriptor-template.xml PRODUCED_VIB_NAME = $(DEV_VIB_BASENAME).vib TEMP_DIR = $(SCRATCH_DIR)/tempDir # The default acceptance level for nvdk is "accepted" DESC_ACCEPTANCE_LEVEL ?= accepted KEYPATH ?= $(EPK_BASE)/testcerts/accepted.key CERTPATH ?= $(EPK_BASE)/testcerts/accepted.cert DESC_EDITOR_PATH = $(NVDKROOT)/tools/descriptor-editor.sh ifdef DEV_SIGNING_PREFIX # The user can define KEYPATH and CERTPATH directly, or ask us to # figure it out given a basename. ifeq ($(strip $(DEV_SIGNING_PREFIX)),$(notdir $(strip $(DEV_SIGNING_PREFIX)))) # Is it a simple filename prefix? If so, assume that it's for a # test key/cert pair in vib-suite. KEYPATH=$(EPK_BASE)/testcerts/$(DEV_SIGNING_PREFIX).key CERTPATH=$(EPK_BASE)/testcerts/$(DEV_SIGNING_PREFIX).cert else # Otherwise, assume it's a usable path that just needs ".key" # and ".cert" appended. KEYPATH=$(DEV_SIGNING_PREFIX).key CERTPATH=$(DEV_SIGNING_PREFIX).cert endif endif ifneq ($(strip $(KEYPATH)),) ifneq ($(strip $(CERTPATH)),) SIGNOPTS = \ $(if $(wildcard $(KEYPATH)),,$(error Could not find $(KEYPATH).)) \ $(if $(wildcard $(CERTPATH)),,$(error Could not find $(CERTPATH).)) \ --sign --key=$(strip $(KEYPATH)) --cert=$(strip $(CERTPATH)) else $(error KEYPATH defined but no CERTPATH defined.) endif endif # The following code is copied from kmdk/samples/common/kmdk.inc, and should # be refactored to remove the redundancy. Since kmdk.inc is aimed at kernel # modules, and this is aimed at userworld apps/plugins, they can't just # be shared (different C flags, if nothing else) without some analysis. # (See devkits/esxcli/samples/common/esxcli.inc as well). # Make sure that the default target is the usual one. Since we're included # by "real" Makefiles, we don't want to make the default target be # something we define here. The targets and rules after this are all # intended as deduplicated code extracted from the various samples. all: userworld: DEV_TARGET_BITNESS = $(ARCHBITS) userworld: build-prep $(DEV_UW_BIN) $(BUILD_DIR)/obj-$(ARCH)/%.o: %.c @echo '** Compiling userworld binary $@' $(MKDIR) -p $(dir $@) $(CHMOD) a+rwx $(dir $@) $(call CC_CMD) $(DEV_UW_BIN): $(DEV_$(DEV_BUILDTYPE)_UW_OBJECTS) @echo '** Linking $@' $(call LINK_UW_CMD) # Assumes DESC_* and DEV_VIB_XML are defined in calling Makefile. DESC_RELEASE_DATE ?= $(shell date --iso-8601=sec | $(SED) -e 's,\(..\)$$,:\1,') # xxx Not including keys with URLs at this time. They are required, though. # xxx Currently have a hack in descriptor-editor.sh to force-insert a key. # xxx It assumes only one instance. minimal-descriptor: if [ ! -s $(DEV_VIB_XML) ]; then \ DESC_URLS="$(DESC_URLS)" DESC_DEPENDS="$(DESC_DEPENDS)" \ DESC_CONFLICTS="$(DESC_CONFLICTS)" DESC_REPLACES="$(DESC_REPLACES)" \ DESC_PROVIDES="$(DESC_PROVIDES)" \ DESC_TYPE="$(DESC_TYPE)" \ DESC_NAME="$(DESC_NAME)" DESC_VERSION="$(DESC_VERSION)" \ DESC_VENDOR="$(BULL_VENDOR_CODE)" DESC_SUMMARY="$(DESC_SUMMARY)" \ DESC_DESCRIPTION="$(DESC_DESCRIPTION)" \ DESC_RELEASE="$(DESC_RELEASE_DATE)" DESC_MAINT="$(DESC_MAINT)" \ DESC_ESX_VERSION="$(DESC_ESX_VERSION)" DESC_VENDOR_EMAIL="$(DESC_VENDOR_EMAIL)" \ DESC_LIVE_INSTALL_ALLOWED="$(DESC_LIVE_INSTALL_ALLOWED)" \ DESC_LIVE_REMOVE_ALLOWED="$(DESC_LIVE_REMOVE_ALLOWED)" \ DESC_STATELESS_READY="$(DESC_STATELESS_READY)" \ DESC_ACCEPTANCE_LEVEL="$(DESC_ACCEPTANCE_LEVEL)" \ DESC_PAYLOAD_NAME="$(DESC_PAYLOAD_NAME)" \ $(DESC_EDITOR_PATH) $(VIB_DESCRIPTOR_TEMPLATE) $(DEV_VIB_XML) verbose; \ fi # Import the bulletin-template.xml and fill in valid fields. fill-bulletin: if [ ! -s $(DEV_BULLETIN_XML) ]; then \ $(CP) -f $(VIB_BULLETIN_TEMPLATE) $(DEV_BULLETIN_XML); \ $(SED) -i -e 's##$(DEV_PROJECT): $(DESC_SUMMARY)#g' $(DEV_BULLETIN_XML); \ $(SED) -i -e 's##$(VIB_BULLETIN_ID)#g' $(DEV_BULLETIN_XML); \ $(SED) -i -e 's##$(DESC_VENDOR)#g' $(DEV_BULLETIN_XML); \ $(SED) -i -e 's##$(DESC_DESCRIPTION)#g' $(DEV_BULLETIN_XML); \ $(SED) -i -e 's##$(BULL_KBURL)#g' $(DEV_BULLETIN_XML); \ $(SED) -i -e 's##$(DESC_VENDOR_EMAIL)#g' $(DEV_BULLETIN_XML); \ $(SED) -i -e 's#should not be directly edited, but copied first. It##g' $(DEV_BULLETIN_XML); \ $(SED) -i -e 's##\n\t\t#' $(DEV_BULLETIN_XML); \ $(SED) -i -e \ 's#<$(CNS)/>#<$(CNS) name="$(BULL_CNS_NAME)" uiString="$(BULL_CNS_STRING)" />#g' \ $(DEV_BULLETIN_XML); \ $(SED) -i -e \ 's#<$(CVS)/>#<$(CVS) version="$(BULL_CVS_VERSION)" uiString="$(BULL_CVS_STRING)" />#g' \ $(DEV_BULLETIN_XML); \ fi # DEV_BULLETIN_XML and DEV_VIB_XML are expected to be defined by # the calling Makefile. xml-checks: if [ ! -s $(DEV_VIB_XML) ]; then \ echo Failed to synthesize $(DEV_VIB_XML).; \ exit 1; \ fi if [ ! -s $(DEV_BULLETIN_XML) ]; then \ echo Failed to synthesize $(DEV_BULLETIN_XML).; \ exit 1; \ fi # Here's where we actually generate the VIB and an offline bundle. # All of the variables are defined statically by our caller or earlier # in this file, so nothing gets passed in from the outside world. vib-bundle: $(MKDIR) -p $(SCRATCH_DIR) $(STAGE_DIR) $(VIB_DIR) $(BUNDLE_DIR) $(CP) -f $(DEV_VIB_XML) $(BUILD_DIR)/descriptor.xml $(SED) -i -e 's##$(DESC_RELEASE_DATE)#g' $(DEV_BULLETIN_XML) $(RM) -f $(VIB_DIR)/$(PRODUCED_VIB_NAME) @msg="** Building"; \ if [ -n "$(SIGNOPTS)" ]; then msg="$$msg and signing"; fi; \ msg="$$msg $(DEV_VIB_BASENAME) vib"; \ echo "$$msg" $(VIBAUTHOR) -C \ -t $(BUILD_DIR) \ -v $(VIB_DIR)/$(PRODUCED_VIB_NAME) $(SIGNOPTS) $(MAKE) -f Makefile just-bundle # We expect to have everything set up as the vib-bundle target would # do. There is no requirement to actually use that target, if a # project needs to do something particularly unusual to generate the # vib. See example-oembootoptions for such a case. just-bundle: $(RM) -f $(SCRATCH_DIR)/vib-id-list $(MKDIR) -p $(SCRATCH_DIR) $(VIBAUTHOR) --force -i -v $(VIB_DIR)/$(PRODUCED_VIB_NAME) \ | $(GREP) -w "VIB ID" \ | $(AWK) '{printf("%s", $$3)}' \ > $(SCRATCH_DIR)/vib-id-list if [ -s $(SCRATCH_DIR)/vib-id-list ]; then \ pat="`cat $(SCRATCH_DIR)/vib-id-list`"; \ $(SED) -i -e "s##$$pat#g" $(DEV_BULLETIN_XML); \ fi $(RM) -f $(BUNDLE_DIR)/$(COMPONENT_BASENAME).zip $(RM) -f $(BUNDLE_DIR)/metadata.zip $(RM) -rf $(TEMP_DIR) $(MKDIR) -p $(TEMP_DIR) $(PARTNER_DEPOT_AUTHOR) \ $(BUNDLE_DIR)/$(COMPONENT_BASENAME).zip depot create \ --platformVersion $(VMW_VERSION) \ --vendorName "$(DESC_VENDOR)" \ --vendorCode="$(BULL_VENDOR_CODE)" $(PARTNER_DEPOT_AUTHOR) \ $(BUNDLE_DIR)/$(COMPONENT_BASENAME).zip component create \ --componentxml $(DEV_BULLETIN_XML) \ --vibDirectory $(VIB_DIR)