<commit_before>require 'superenv'
require 'hardware'

module Homebrew extend self
  def __env
    if superenv?
      ENV.deps = ARGV.formulae.map(&:name) unless ARGV.named.empty?
    end
    ENV.setup_build_environment
    ENV.universal_binary if ARGV.build_universal?
    if $stdout.tty?
      dump_build_env ENV
    else
      keys = build_env_keys(ENV) << 'HOMEBREW_BREW_FILE' << 'HOMEBREW_SDKROOT'
      keys.each do |key|
        puts "export #{key}=\"#{ENV[key]}\""
      end
    end
  end

  def build_env_keys env
    %w[ CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS SDKROOT
      CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH MAKEFLAGS
      MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH HOMEBREW_BUILD_FROM_SOURCE
      HOMEBREW_DEBUG HOMEBREW_MAKE_JOBS HOMEBREW_VERBOSE HOMEBREW_USE_CLANG
      HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN HOMEBREW_GIT
      MAKE GIT CPP
      ACLOCAL_PATH OBJC PATH ].select{ |key| env[key] }
  end

  def dump_build_env env
    build_env_keys(env).each do |key|<commit_msg>`brew --env` puts HOMEBREW_SDKROOT<commit_after>require 'superenv'
require 'hardware'

module Homebrew extend self
  def __env
    if superenv?
      ENV.deps = ARGV.formulae.map(&:name) unless ARGV.named.empty?
    end
    ENV.setup_build_environment
    ENV.universal_binary if ARGV.build_universal?
    if $stdout.tty?
      dump_build_env ENV
    else
      keys = build_env_keys(ENV) << 'HOMEBREW_BREW_FILE' << 'HOMEBREW_SDKROOT'
      keys.each do |key|
        puts "export #{key}=\"#{ENV[key]}\""
      end
    end
  end

  def build_env_keys env
    %w[ CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS SDKROOT
      CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH MAKEFLAGS
      MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH HOMEBREW_BUILD_FROM_SOURCE
      HOMEBREW_DEBUG HOMEBREW_MAKE_JOBS HOMEBREW_VERBOSE HOMEBREW_USE_CLANG
      HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN HOMEBREW_GIT
      HOMEBREW_SDKROOT
      MAKE GIT CPP
      ACLOCAL_PATH OBJC PATH ].select{ |key| env[key] }
  end

  def dump_build_env env
    build_env_keys(env).each do |key|
{'fraction_non_alphanumeric': 0.06857142857142857, 'fraction_numerical': 0.0, 'mean_word_length': 3.577342047930283, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4413404', 'n_tokens_mistral': 864, 'n_tokens_neox': 769, 'n_words': 167}