diff --git a/configure b/configure index 856d590..5644912 100755 --- a/configure +++ b/configure @@ -1,3 +1,21 @@ #!/bin/sh -e -cp config.mk.in config.mk +ENV="$1" + +if [ -z "$ENV" ]; then + ENV='build' +fi + +CONFIG="env/$ENV.mk" + +if [ ! -f "$CONFIG" ]; then + echo >&2 "ERROR: file "$CONFIG" does not exist" + exit 1 +fi + +if [ -f 'config.mk' ]; then + echo >&2 "ERROR: file 'config.mk' already exist" + exit 1 +fi + +cp "$CONFIG" 'config.mk' diff --git a/config.mk.in b/env/build.mk similarity index 100% rename from config.mk.in rename to env/build.mk diff --git a/env/test.mk b/env/test.mk new file mode 100644 index 0000000..3175952 --- /dev/null +++ b/env/test.mk @@ -0,0 +1 @@ +export CCPREFIX =