#!/bin/sh
#******************************************************************************#
#                                                                              #
#   configure                                                                  #
#   | Project : OMGCLOCK                                                       #
#                                                                              #
#   By: thomas <thomas@touhey.fr>                                              #
#   Last updated: 2016/05/28 16:08:11                                          #
#                                                                              #
#******************************************************************************#
# Help
usage() {
cat <<EOF
Usage: $0 [OPTION]

No options can be configured for now, but ./configure is here for if
options are inserted in the future (so the process doesn't change over time).

EOF
exit 0
}

# Defaults
## None for now

# Args parsing
for arg ; do
case "$arg" in
--help|-h) usage ;;
-*) echo "$0: unknown option $arg" ;;
*) echo "$0: are you drunk ?" ;;
esac
done

# If Makefile configuration already exists, ragequit
if [ -f Makefile.cfg ]; then
	echo "Configuration is already loaded, skipping."
	exit 0
fi

# Create Makefile configuration
exec 3>&1 1>Makefile.cfg

cat <<EOF
#!/usr/bin/make -f
# Makefile configuration generated by ./configure
## Yeah, nothing for now, I know.
## But take this cat ! :)
#
#          __..--''\`\`---....___   _..._    __
#      _.-'    .-/";  \`        \`\`<._  \`\`.''_ \`.
#  _.-' _..--.'_    \                    \`( ) )
# (_..-'    (< _     ;_..__               ; \`'
#            \`-._,_)'      \`\`--...____..-'
EOF

exec 1>&3 3>&-

# We're done
echo "Configuration loaded, you can make now."
