if test -d "${SOURCE_DIRECTORY}/INSTALL_ROOT"; then
  cd "${SOURCE_DIRECTORY}/INSTALL_ROOT" &&
  find . | cpio --pass-through --make-directories --verbose --unconditional \
    "${INSTALL_ROOT}/"
else
  # for libressl >= 3.5.x
  CFLAGS+=" -DHAVE_OPAQUE_STRUCTS=1" &&
  CXXFLAGS+=" -DHAVE_OPAQUE_STRUCTS=1" &&

  export CFLAGS CXXFLAGS &&

  export CARGO_HOME="$SOURCE_DIRECTORY/cargo_home" &&
	DESTDIR="${INSTALL_ROOT}/" python3 ./x.py install --config="${SOURCE_DIRECTORY}/config.toml" \
  -j $((${#DISTCC_HOSTS[*]} * JOBS_PER_HOST + MAKE_NJOBS))
fi
