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}
|
||||
|
||||
# Special
|
||||
.PHONY: clean distclean check_config
|
||||
.PHONY: clean distclean check_config reconfigure
|
||||
|
||||
# Check configure output is valid
|
||||
check_config:
|
||||
|
@ -236,6 +236,10 @@ check_config:
|
|||
|| echo "./configure output is old, please re-run"
|
||||
@test $(CURDIR)/.config.mk -nt $(CURDIR)/configure
|
||||
|
||||
# Recreate configuration
|
||||
reconfigure:
|
||||
$(CURDIR)/configure $(CONFIGURE_ARGS)
|
||||
|
||||
# Binary
|
||||
${PROG}: check_config $(OBJS) $(ALLDEPS)
|
||||
$(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
|
||||
|
|
|
@ -456,6 +456,7 @@ function write_config
|
|||
CONFIG_MK=${ROOTDIR}/.config.mk
|
||||
cat > ${CONFIG_MK} <<EOF
|
||||
# Automatically generated by configure - DO NOT EDIT!
|
||||
CONFIGURE_ARGS = ${BASH_ARGV[*]}
|
||||
ROOTDIR ?= ${ROOTDIR}
|
||||
BUILDDIR ?= ${ROOTDIR}/build.${PLATFORM}
|
||||
OSENV ?= ${OSENV}
|
||||
|
|
Loading…
Add table
Reference in a new issue