make: add option to reconfigure with previous options.
This commit is contained in:
parent
11576caf97
commit
8be121f558
2 changed files with 6 additions and 1 deletions
6
Makefile
6
Makefile
|
@ -228,7 +228,7 @@ DEPS = ${OBJS:%.o=%.d}
|
||||||
all: ${PROG}
|
all: ${PROG}
|
||||||
|
|
||||||
# Special
|
# Special
|
||||||
.PHONY: clean distclean check_config
|
.PHONY: clean distclean check_config reconfigure
|
||||||
|
|
||||||
# Check configure output is valid
|
# Check configure output is valid
|
||||||
check_config:
|
check_config:
|
||||||
|
@ -236,6 +236,10 @@ check_config:
|
||||||
|| echo "./configure output is old, please re-run"
|
|| echo "./configure output is old, please re-run"
|
||||||
@test $(CURDIR)/.config.mk -nt $(CURDIR)/configure
|
@test $(CURDIR)/.config.mk -nt $(CURDIR)/configure
|
||||||
|
|
||||||
|
# Recreate configuration
|
||||||
|
reconfigure:
|
||||||
|
$(CURDIR)/configure $(CONFIGURE_ARGS)
|
||||||
|
|
||||||
# Binary
|
# Binary
|
||||||
${PROG}: check_config $(OBJS) $(ALLDEPS)
|
${PROG}: check_config $(OBJS) $(ALLDEPS)
|
||||||
$(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
|
$(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
|
||||||
|
|
|
@ -456,6 +456,7 @@ function write_config
|
||||||
CONFIG_MK=${ROOTDIR}/.config.mk
|
CONFIG_MK=${ROOTDIR}/.config.mk
|
||||||
cat > ${CONFIG_MK} <<EOF
|
cat > ${CONFIG_MK} <<EOF
|
||||||
# Automatically generated by configure - DO NOT EDIT!
|
# Automatically generated by configure - DO NOT EDIT!
|
||||||
|
CONFIGURE_ARGS = ${BASH_ARGV[*]}
|
||||||
ROOTDIR ?= ${ROOTDIR}
|
ROOTDIR ?= ${ROOTDIR}
|
||||||
BUILDDIR ?= ${ROOTDIR}/build.${PLATFORM}
|
BUILDDIR ?= ${ROOTDIR}/build.${PLATFORM}
|
||||||
OSENV ?= ${OSENV}
|
OSENV ?= ${OSENV}
|
||||||
|
|
Loading…
Add table
Reference in a new issue