aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-11-17 17:52:41 +0100
committerKarel Kočí <cynerd@email.cz>2016-11-17 17:56:33 +0100
commitad2a23815a49245117cadbfcb6a59dfd6fc95483 (patch)
tree0342f46b1e92ccfce96a6650b5250d3fafd73cfa /configure
parent3e3af1dab62cac49c72143dddfbe097b43c2bba2 (diff)
downloadgeml-ad2a23815a49245117cadbfcb6a59dfd6fc95483.tar.gz
geml-ad2a23815a49245117cadbfcb6a59dfd6fc95483.tar.bz2
geml-ad2a23815a49245117cadbfcb6a59dfd6fc95483.zip
Implement install and uninstall target and manual template
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure b/configure
index 9f29180..6f8044b 100755
--- a/configure
+++ b/configure
@@ -14,6 +14,8 @@ CPREFIX:::T:F
CC:cc::T:F
CFLAGS:::T:F
LFLAGS:::T:F
+INSTALL:install::T:F
+GZIP:gzip::T:F
DOT:dot::T:F
MKDOCS:mkdocs::T:F"
############################################################################
@@ -40,6 +42,8 @@ print_help() {
echo " CC C compiler command."
echo " CFLAGS C compiler flags."
echo " LDFLAGS C Linker flags."
+ echo " INSTALL Copy files and set attributes."
+ echo " GZIP Compress file."
echo " DOT Directed graphs drawing program."
echo " MKDOCS Project documentation generator."
echo
@@ -51,7 +55,7 @@ CONFIG_FILE=.config
CONFIGURED_FILE=.configured # TODO
# Backup variables from environment
-ENVVARS="CPREFIX CC CFLAGS LDFLAGS DOT MKDOCS"
+ENVVARS="CPREFIX CC CFLAGS LDFLAGS INSTALL GZIP DOT CPPCHECK VALGRIND MKDOCS"
for E in $ENVVARS; do
eval "[ -n \"\${$E+y}\" ]" && eval "BACKUP_$E=\$$E"
done
@@ -79,10 +83,21 @@ while [ "$#" -gt 0 ]; do
;;
--prefix)
PREFIX=$2
+ [ -z "$EPREFIX_USER" ] && EPREFIX="$PREFIX"
shift
;;
--prefix=*)
PREFIX=${1#--prefix=}
+ [ -z "$EPREFIX_USER" ] && EPREFIX="$PREFIX"
+ ;;
+ --exec-prefix)
+ EPREFIX=$2
+ EPREFIX_USER=y
+ shift
+ ;;
+ --exec-prefix=*)
+ EPREFIX=${1#--exec-prefix=}
+ EPREFIX_USER=y
;;
-d|--debug)
DEBUG=yes