<commit_before>class Steps::Installer < LBT::StepsFabricator
	class MakeInstall < LBT::Step
		def run
			Dir.chdir "#{@library.work_dir}/#{@library.build_subdir}"
			Exec.run("make", "install")
		end
	end

	class CopyHeaders < LBT::Step
		def run
			Dir.chdir "#{@library.work_dir}/#{@library.build_subdir}"
			FileUtils.mkdir_p "#{@library.options.install_dir.join}/include"
			headers = []
			headers += Dir.glob('**/*.h')
			headers += Dir.glob('**/**.hpp')
			headers.each do |header|
				dest = "#{@library.options.install_dir.join}/include/#{header}"
				FileUtils.mkdir_p File.dirname dest
				FileUtils.rm dest if File.exist? dest
				FileUtils.cp header, dest
			end
		end
	end
end<commit_msg>Documentation: Installers.<commit_after># Steps generally used to install software or libraries.
class Steps::Installer < LBT::StepsFabricator

	# Installs using the common +make install+.
	#
	# It simply calls +make install+
	# Proper configuration for +make install+ should be done in a prior +Step+,
	# generally +Builder::ConfigureMake+
	#
	# @see Builder::ConfigureMake
	class MakeInstall < LBT::Step
		def run
			Dir.chdir "#{@library.work_dir}/#{@library.build_subdir}"
			Exec.run("make", "install")
		end
	end

	# Installs by copying +.h + and +.hpp+ files to the +install_dir+, keeping
	# the subtree structure
	#
	# Uses +library.options.install_dir+ as the target path.
	#
	class CopyHeaders < LBT::Step
		def run
			Dir.chdir "#{@library.work_dir}/#{@library.build_subdir}"
			FileUtils.mkdir_p "#{@library.options.install_dir.join}/include"
			headers = []
			headers += Dir.glob('**/*.h')
			headers += Dir.glob('**/**.hpp')
			headers.each do |header|
				dest = "#{@library.options.install_dir.join}/include/#{header}"
				FileUtils.mkdir_p File.dirname dest
				FileUtils.rm dest if File.exist? dest
				FileUtils.cp header, dest
			end
		end
	end
end
{'fraction_non_alphanumeric': 0.14698022447888828, 'fraction_numerical': 0.0, 'mean_word_length': 3.978723404255319, 'pattern_counts': {'":': 0, '<': 9, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4289476', 'n_tokens_mistral': 716, 'n_tokens_neox': 635, 'n_words': 152}