Skip to content

Instantly share code, notes, and snippets.

@rrs42
rrs42 / build-amiga-gcc.sh
Last active May 7, 2023 22:47
Script to build the amiga-gcc cross compiler on Mac OS. Assumes being run from the parent directory of where you checked out bebbo/amiga-gcc. Assumes gcc, texinfo, bison, GNU make, bash etc have been installed via Homebrew. Tested on Ventura 13.3.1. Edit the PREFIX line to point to the desired install path. Also assumes you want NDK 3.9, if you …
#!/usr/bin/env bash
set -x
PREFIX="ADD YOUR PREFIX HERE"
PATH=$(brew --prefix bison)/bin:$(brew --prefix texinfo)/bin:${PATH}
export PATH
brew unlink isl
brew link isl@0.18
  • Include crate metadata in program
const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION");

// ...

println!("MyProgram v{}", VERSION.unwrap_or("unknown"));