diff options
author | P. J. McDermott <pjm@nac.net> | 2012-02-20 20:26:12 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-02-20 20:26:12 (EST) |
commit | 697fb3053991c5fd03e0d89f1a739c1917d160c2 (patch) | |
tree | ecd22b21511ebf9be348b204845d9dc74a34ffa2 | |
parent | e5220b4c6834471bc085e002280f4c3b16e3b6e0 (diff) |
Add DATADIR to build system.
-rw-r--r-- | Makefile.in | 2 | ||||
-rwxr-xr-x | configure | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 5289caf..eb6d8de 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,6 +25,7 @@ SRCDIR = @srcdir@ PREFIX = @prefix@ BINDIR = @bindir@ LIBDIR = @libdir@ +DATADIR = @datadir@ MANDIR = @mandir@ PACKAGE = @package@ @@ -48,6 +49,7 @@ all: sedscript sedscript: @printf 'Writing sed script...\n' @echo 's&@@BINDIR@@&$(BINDIR)&' > sedscript + @echo 's&@@DATADIR@@&$(DATADIR)&' >> sedscript @echo 's&@@LIBDIR@@&$(LIBDIR)&' >> sedscript .PHONY: clean @@ -48,6 +48,8 @@ Installation directories: default: PREFIX/bin --libdir=LIBDIR install library scripts in LIBDIR default: PREFIX/lib + --datadir=DATADIR expect to find data in DATADIR + default: PREFIX/share --mandir=MANDIR install manual pages in MANDIR default: PREFIX/share/man EOF @@ -105,6 +107,11 @@ while true; do LIBDIR="\${PREFIX}/${2}" shift 2 ;; + --datadir) + # Leave PREFIX unexpanded for now, in case it isn't set yet. + DATADIR="\${PREFIX}/${2}" + shift 2 + ;; --mandir) # Leave PREFIX unexpanded for now, in case it isn't set yet. MANDIR="\${PREFIX}/${2}" @@ -139,12 +146,16 @@ fi if [ -z "${LIBDIR}" ]; then LIBDIR=${PREFIX}/lib fi +if [ -z "${DATADIR}" ]; then + DATADIR=${PREFIX}/share +fi if [ -z "${MANDIR}" ]; then MANDIR=${PREFIX}/share/man fi # Expand PREFIX if it's there. eval "BINDIR=${BINDIR}" eval "LIBDIR=${LIBDIR}" +eval "DATADIR=${DATADIR}" eval "MANDIR=${MANDIR}" find_dependency() @@ -189,6 +200,7 @@ s&@srcdir@&${SRCDIR}& s&@prefix@&${PREFIX}& s&@bindir@&${BINDIR}& s&@libdir@&${LIBDIR}& +s&@datadir@&${DATADIR}& s&@mandir@&${MANDIR}& s&@package@&${PACKAGE}& s&@version@&${VERSION}&" |