romanpitak / configure

A semi-universal ./configure script.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

./configure

A semi-universal ./configure script.

This script can configure your Makefile and then help your Makefile configure other sources.

Usage as a project ./configure script

Inside the ./configure script:

cfg__variables['INSTALL_PATH']="${HOME}/bin"
cfg__variables['INTERPRETER']="python3.4"
cfg__variables['VERSION']='0.10.33'

Before invoking make && sudo make install:

./configure --install-path=/usr/bin --interpreter=python3.5

The ./configure script also prints some nice --help messages based on the variables array and other custom configuration.

Usage from a Makefile:

gh-pages.sh: src/gh-pages.sh
    ./configure \
        --silent \
        --variable-VERSION="$(VERSION)" \
        --preprocessor-suffix=' # <<< configure' \
        --in-file="$<" \
        --out-file="$@"
    chmod a+x gh-pages.sh

Input src/gh-pages.sh:

VERSION=0.0.0 # <<< configure

Output ./gh-pages.sh:

VERSION=0.10.33 # <<< configure

About

A semi-universal ./configure script.

License:MIT License


Languages

Language:Shell 98.9%Language:Makefile 1.1%