github.com/blixtra/rkt@v0.8.1-0.20160204105720-ab0d1add1a43/stage1/makelib/aci_install_bin.mk (about) 1 # Inputs: 2 # 3 # AIB_FLAVORS - a list of flavors which want this binary to be 4 # installed in their ACI rootfs 5 # 6 # AIB_BINARY - a binary to install 7 # 8 # AIB_BUILD_STAMP - a stamp used to build the go binary and generate 9 # the deps file in the meantime 10 11 # In detail for each flavor - generate a stamp which depends on a 12 # binary in the ACI rootfs directory. The binary will be copied to the 13 # ACI rootfs only after the initial /usr contents are prepared. 14 15 # The path of this file. This file is included (or at least it should 16 # be) with a standard include directive instead of our inc-one (or 17 # inc-many), so the MK_PATH, MK_FILENAME and MK_SRCDIR are set to 18 # values specific to the parent file (that is - including this one). 19 _AIB_PATH_ := $(lastword $(MAKEFILE_LIST)) 20 21 $(foreach flavor,$(AIB_FLAVORS), \ 22 $(call setup-stamp-file,_AIB_STAMP_,$(flavor)) \ 23 $(eval _AIB_NAME_ := $(notdir $(AIB_BINARY))) \ 24 $(eval _AIB_ACI_BINARY_ := $(STAGE1_ACIROOTFSDIR_$(flavor))/$(_AIB_NAME_)) \ 25 $(eval STAGE1_SECONDARY_STAMPS_$(flavor) += $(_AIB_STAMP_)) \ 26 $(eval STAGE1_INSTALL_FILES_$(flavor) += $(AIB_BINARY):$(_AIB_ACI_BINARY_):-) \ 27 $(call add-dependency,$(_AIB_ACI_BINARY_),$(MK_PATH) $(_AIB_PATH_) $(AIB_BUILD_STAMP)) \ 28 $(call generate-stamp-rule,$(_AIB_STAMP_),$(_AIB_ACI_BINARY_),,,)) 29 30 $(call undefine-namespaces,AIB _AIB)