Skip to content

Commit c054ef9

Browse files
committed
Merge branch 'jn/less-reconfigure' into maint
* jn/less-reconfigure: Makefile: avoid infinite loop on configure.ac change
2 parents 31e54bb + 7f1b697 commit c054ef9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,12 +2272,14 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh
22722272
mv $@+ $@
22732273
endif # NO_PYTHON
22742274

2275+
CONFIGURE_RECIPE = $(RM) configure configure.ac+ && \
2276+
sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
2277+
configure.ac >configure.ac+ && \
2278+
autoconf -o configure configure.ac+ && \
2279+
$(RM) configure.ac+
2280+
22752281
configure: configure.ac GIT-VERSION-FILE
2276-
$(QUIET_GEN)$(RM) $@ $<+ && \
2277-
sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
2278-
$< > $<+ && \
2279-
autoconf -o $@ $<+ && \
2280-
$(RM) $<+
2282+
$(QUIET_GEN)$(CONFIGURE_RECIPE)
22812283

22822284
ifdef AUTOCONFIGURED
22832285
# We avoid depending on 'configure' here, because it gets rebuilt
@@ -2286,7 +2288,7 @@ ifdef AUTOCONFIGURED
22862288
# do want to recheck when the platform/environment detection logic
22872289
# changes, hence this depends on configure.ac.
22882290
config.status: configure.ac
2289-
$(QUIET_GEN)$(MAKE) configure && \
2291+
$(QUIET_GEN)$(CONFIGURE_RECIPE) && \
22902292
if test -f config.status; then \
22912293
./config.status --recheck; \
22922294
else \

0 commit comments

Comments
 (0)