github.com/rkt/rkt@v1.30.1-0.20200224141603-171c416fac02/stage1/stdlibdirs.mk (about)

     1  # This file gets the list of standard library locations and tells make
     2  # to create their counterparts inside the ACI rootfs directory.
     3  #
     4  # Inputs:
     5  #
     6  # SLD_FLAVOR - a flavor which wants the standard library directories
     7  # to be created
     8  
     9  ifeq ($(SLD_INCLUDED),)
    10  
    11  SLD_INCLUDED := x
    12  SLD_LOCATIONS := $(shell ld --verbose | grep SEARCH_DIR | sed -e 's/SEARCH_DIR("=*\([^"]*\)");*/\1/g')
    13  SLD_LOCATIONS += $(foreach l,$(SLD_LOCATIONS),$l/systemd)
    14  
    15  endif
    16  
    17  ifneq ($(SLD_FLAVOR),)
    18  
    19  ifeq ($(SLDKEEP_INCLUDED_$(SLD_FLAVOR)),)
    20  
    21  SLDKEEP_INCLUDED_$(SLD_FLAVOR) := x
    22  SLD_ACIROOTFSDIR := $(STAGE1_ACIROOTFSDIR_$(SLD_FLAVOR))
    23  
    24  INSTALL_DIRS += $(foreach l,$(SLD_LOCATIONS),$(SLD_ACIROOTFSDIR)$l:0755)
    25  
    26  endif
    27  
    28  endif
    29  
    30  # SLD_LOCATIONS is deliberately not cleared, we will use this variable
    31  # to know standard library directories.
    32  # SLD_INCLUDED and SLDKEEP_* variables are not cleared to avoid
    33  # potential problems with including this file more than once.
    34  $(call undefine-namespaces,SLD,SLD_LOCATIONS SLD_INCLUDED)