<commit_before>use std::process::Command;
use std::env::var as getenv;
use std::path::Path;

fn main() {
    let destdir = getenv("OUT_DIR").unwrap();

    let mut cmd = Command::new("make");
    cmd.current_dir(&Path::new(&getenv("CARGO_MANIFEST_DIR").unwrap()));

    cmd.arg(format!("DESTDIR={}/", destdir));

    if let Some(j) = getenv("NUM_JOBS").ok() {
        cmd.arg(format!("-j{}", j));
    }

    cmd.arg(format!("{}/libdssim.a", destdir));

    if !cmd.status().unwrap().success() {
        panic!("Script failed");
    }

    println!("cargo:rustc-flags=-L {} -l static=dssim", destdir);
    println!("cargo:root={}", destdir);
}<commit_msg>Fixed framework linking on OS X<commit_after>use std::process::Command;
use std::env::var as getenv;
use std::path::Path;

fn main() {
    let destdir = getenv("OUT_DIR").unwrap();

    let mut cmd = Command::new("make");
    cmd.current_dir(&Path::new(&getenv("CARGO_MANIFEST_DIR").unwrap()));

    cmd.arg(format!("DESTDIR={}/", destdir));

    if let Some(j) = getenv("NUM_JOBS").ok() {
        cmd.arg(format!("-j{}", j));
    }

    cmd.arg(format!("{}/libdssim.a", destdir));

    if !cmd.status().unwrap().success() {
        panic!("Script failed");
    }

    println!("cargo:rustc-flags=-L {} {} -l static=dssim", destdir, getframework());
    println!("cargo:root={}", destdir);
}

#[cfg(target_os = "macos")]
fn getframework() -> &'static str {
    "-l framework=Accelerate"
}

#[cfg(not(target_os = "macos"))]
fn getframework() -> &'static str {
    ""
}
{'fraction_non_alphanumeric': 0.23076923076923078, 'fraction_numerical': 0.0, 'mean_word_length': 3.973856209150327, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6028521', 'n_tokens_mistral': 559, 'n_tokens_neox': 556, 'n_words': 96}