Skip to content

Commit

Permalink
Improve PREFIX handling
Browse files Browse the repository at this point in the history
Honor PREFIX both at configure time and during `make install'. Should
make the recent auto{conf,make} replacement more compliant with GNU
standards[1].

While here, shuffle the default choice of PREFIX to configure, like all
other defaults.

Issue raised by Aggelos Avgerinos in #292.

[1] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables
  • Loading branch information
mptre committed Mar 2, 2019
1 parent 7c354f6 commit adcba3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ DISTFILES+= tests/opt-x.t
DISTFILES+= tests/pick-test.c
DISTFILES+= tests/pick-test.sh

PREFIX= /usr/local

all: ${PROG}

${PROG}: ${OBJS}
Expand Down
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ INSTALL=$(makevar INSTALL)
: "${DEBUG:=}"
: "${INSTALL:=install}"
: "${LDFLAGS:=}"
: "${PREFIX:=/usr/local}"

exec 3>&1 4>&2
exec 1>config.log 2>&1
Expand Down Expand Up @@ -224,4 +225,6 @@ DEBUG= $(echo $DEBUG)
INSTALL= $(echo $INSTALL)
LDFLAGS= $(echo $LDFLAGS)
MALLOC_OPTIONS= $(echo $MALLOC_OPTIONS)
PREFIX?= $(echo $PREFIX)
EOF

0 comments on commit adcba3c

Please sign in to comment.