<commit_before>#
# Cookbook:: build_cookbook
# Recipe:: perform_build.rb
#
# Copyright:: 2017, <NAME>, All Rights Reserved.

include_recipe 'build_cookbook::setup_build' ## Just to be sure we don't accidently forget to include the setup phase
## Steps to actually build/compile apache
build_config = ab_load_config(node['apache_build']['config_file']) # Load and parse the config file
dev_null = '2>&1>/dev/null' if build_config['less_output']
src_dir = "#{workflow_workspace_repo}/httpd" # Root source directory
bash 'Clean up old builds if needed' do
  code "make clean #{dev_null}"
  only_if { File.exist? "#{src_dir}/Makefile" }
  cwd src_dir
end
bash "Running configure with options: #{build_config['configure_options'].join(', ')}" do
  code "#{src_dir}/configure #{build_config['configure_options'].map { |opt| "--#{opt}" }.join ' '} #{dev_null}"
  cwd src_dir
end

bash 'Running Make' do
  code 'make #{dev_null}'
  cwd src_dir
end<commit_msg>Fix quotes<commit_after>#
# Cookbook:: build_cookbook
# Recipe:: perform_build.rb
#
# Copyright:: 2017, <NAME>, All Rights Reserved.

include_recipe 'build_cookbook::setup_build' ## Just to be sure we don't accidently forget to include the setup phase
## Steps to actually build/compile apache
build_config = ab_load_config(node['apache_build']['config_file']) # Load and parse the config file
dev_null = '2>&1>/dev/null' if build_config['less_output']
src_dir = "#{workflow_workspace_repo}/httpd" # Root source directory
bash 'Clean up old builds if needed' do
  code "make clean #{dev_null}"
  only_if { File.exist? "#{src_dir}/Makefile" }
  cwd src_dir
end
bash "Running configure with options: #{build_config['configure_options'].join(', ')}" do
  code "#{src_dir}/configure #{build_config['configure_options'].map { |opt| "--#{opt}" }.join ' '} #{dev_null}"
  cwd src_dir
end

bash 'Running Make' do
  code "make #{dev_null}"
  cwd src_dir
end
{'fraction_non_alphanumeric': 0.14007372301211163, 'fraction_numerical': 0.00631911532385466, 'mean_word_length': 5.785714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4885302', 'n_tokens_mistral': 636, 'n_tokens_neox': 617, 'n_words': 186}