mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 01:14:53 +01:00
build: Save configure options and re-use them for automatic runs of configure
This supports the case of a user running "configure --prefix=/foo" then later updating the soruce (including the configure script) and re-running make. In this case, the make invocation will re-run configure. Before this change, this run of configure would lose the user's carefully chosen prefix. This is now fixed so that configrue is re-run with the user's options.
This commit is contained in:
parent
c430265612
commit
2d6718b837
2 changed files with 8 additions and 1 deletions
4
Makefile
4
Makefile
|
@ -25,13 +25,15 @@ srcdir ?= .
|
|||
|
||||
include Makefile.config
|
||||
Makefile.config: $(srcdir)/configure
|
||||
ifeq ($(configure_options),)
|
||||
@echo ""
|
||||
@echo "Note: Calling ./configure with no command-line arguments. This is often fine,"
|
||||
@echo " but if you want to specify any arguments (such as an alternate prefix"
|
||||
@echo " into which to install), call ./configure explicitly and then make again."
|
||||
@echo " See \"./configure --help\" for more details."
|
||||
@echo ""
|
||||
./configure
|
||||
endif
|
||||
$(srcdir)/configure $(configure_options)
|
||||
|
||||
# Finally, include all of the Makefile.local fragments where all the
|
||||
# real work is done.
|
||||
|
|
5
configure
vendored
5
configure
vendored
|
@ -529,8 +529,13 @@ cat > Makefile.config <<EOF
|
|||
# changes, (and this could happen by simply calling "make" if the
|
||||
# configure script is updated).
|
||||
|
||||
# The top-level directory for the source, (the directory containing
|
||||
# the configure script). This may be different than the build
|
||||
# directory (the current directory at the time configure was run).
|
||||
srcdir = ${srcdir}
|
||||
|
||||
configure_options = $@
|
||||
|
||||
# We use vpath directives (rather than the VPATH variable) since the
|
||||
# VPATH variable matches targets as well as prerequisites, (which is
|
||||
# not useful since then a target left-over from a srcdir build would
|
||||
|
|
Loading…
Reference in a new issue