Improve configurator

This commit is contained in:
Braiden Vasco 2017-11-04 07:00:44 +00:00
parent eec868aaf9
commit 8daba7581f
3 changed files with 20 additions and 1 deletions

20
configure vendored
View File

@ -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'

View File

1
env/test.mk vendored Normal file
View File

@ -0,0 +1 @@
export CCPREFIX =