#!/bin/sh while test -n "$1"; do case "$1" in (--*=*) val=${1#--} name=${val%%=*} val=${val#*=} export "$(printf "%s\n" "$name"|tr '[:lower:]-' '[:upper:]_')=$val" ;; esac shift done ( # Variables that the makefile uses and that are meant to be configurable awk '/ \?=/ {print($1)}' Makefile # Variables that GNU Make uses for the implicit rules cat <