<commit_before>#!/usr/bin/env bash

# Capstone Disassembler Engine
# By <NAME> <<EMAIL>>, 2013>

# Note: to cross-compile "nix32" on Linux, package gcc-multilib is required.


# build iOS lib for all iDevices, or only specific device
function build_iOS {
	${MAKE} clean
	SDK=`xcrun --sdk iphoneos --show-sdk-path`
	GCC_BIN=`xcrun --sdk iphoneos -f gcc`
	GCC_BASE="$GCC_BIN -Os -Wimplicit -isysroot $SDK"
	if (( $# == 0 )); then
		# build for all iDevices
		GCC="$GCC_BASE -arch armv7 -arch armv7s -arch arm64"
	else
		GCC="$GCC_BASE -arch $1"
	fi
	${MAKE} CC="$GCC"
}

function build {
	${MAKE} clean

	if [ ${CC}x != x ]; then
		${MAKE} CC=$CC
	else
		${MAKE}
	fi
}

function install {
	# Mac OSX needs to find the right directory for pkgconfig
	if [ "$(uname)" == "Darwin" ]; then
		# find the directory automatically, so we can support both Macport & Brew
		PKGCFGDIR="$(pkg-config --variable pc_path pkg-config | cut -d ':' -f 1)"
		if [ ${PKGCFGDIR}x != x ]; then
			if [ ${CC}x != x ]; then
				${MAKE} CC=$CC PKGCFGDIR=$PKGCFGDIR install
			else
				${MAKE} PKGCFGDIR=$PKGCFGDIR install
			fi
		else
			if [ ${CC}x != x ]; then
				${MAKE} CC=$CC install
			else
				${MAKE} install
			fi
		fi
	else	# not OSX
		if test -d /usr/lib64; then<commit_msg>make.sh: only handle special pkgconfig install for OSX if we are not installing in Brew env<commit_after>#!/usr/bin/env bash

# Capstone Disassembler Engine
# By <NAME> <<EMAIL>>, 2013>

# Note: to cross-compile "nix32" on Linux, package gcc-multilib is required.


# build iOS lib for all iDevices, or only specific device
function build_iOS {
	${MAKE} clean
	SDK=`xcrun --sdk iphoneos --show-sdk-path`
	GCC_BIN=`xcrun --sdk iphoneos -f gcc`
	GCC_BASE="$GCC_BIN -Os -Wimplicit -isysroot $SDK"
	if (( $# == 0 )); then
		# build for all iDevices
		GCC="$GCC_BASE -arch armv7 -arch armv7s -arch arm64"
	else
		GCC="$GCC_BASE -arch $1"
	fi
	${MAKE} CC="$GCC"
}

function build {
	${MAKE} clean

	if [ ${CC}x != x ]; then
		${MAKE} CC=$CC
	else
		${MAKE}
	fi
}

function install {
	# Mac OSX needs to find the right directory for pkgconfig
	if [ "$(uname)" == "Darwin" ]; then
		# find the directory automatically, so we can support both Macport & Brew
		PKGCFGDIR="$(pkg-config --variable pc_path pkg-config | cut -d ':' -f 1)"
		# set PKGCFGDIR only in non-Brew environment & pkg-config is available
		if [ "$HOMEBREW_CAPSTONE" != "1" ] && [ ${PKGCFGDIR}x != x ]; then
			if [ ${CC}x != x ]; then
				${MAKE} CC=$CC PKGCFGDIR=$PKGCFGDIR install
			else
				${MAKE} PKGCFGDIR=$PKGCFGDIR install
			fi
		else
			if [ ${CC}x != x ]; then
				${MAKE} CC=$CC install
			else
				${MAKE} install
			fi
		fi
	else	# not OSX
		if test -d /usr/lib64; then
{'fraction_non_alphanumeric': 0.1461880088823094, 'fraction_numerical': 0.01147298297557365, 'mean_word_length': 3.276898734177215, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '5113431', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1001, 'n_words': 333}