Skip to content

Commit

Permalink
Merge branch 'jn/less-reconfigure'
Browse files Browse the repository at this point in the history
A change made on v1.8.1.x maintenance track had a nasty regression
to break the build when autoconf is used.

* jn/less-reconfigure:
  Makefile: avoid infinite loop on configure.ac change
  • Loading branch information
Junio C Hamano committed Feb 25, 2013
2 parents ef94636 + 7f1b697 commit bb07a3f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1821,12 +1821,14 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh
mv $@+ $@
endif # NO_PYTHON

CONFIGURE_RECIPE = $(RM) configure configure.ac+ && \
sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
configure.ac >configure.ac+ && \
autoconf -o configure configure.ac+ && \
$(RM) configure.ac+

configure: configure.ac GIT-VERSION-FILE
$(QUIET_GEN)$(RM) $@ $<+ && \
sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
$< > $<+ && \
autoconf -o $@ $<+ && \
$(RM) $<+
$(QUIET_GEN)$(CONFIGURE_RECIPE)

ifdef AUTOCONFIGURED
# We avoid depending on 'configure' here, because it gets rebuilt
Expand All @@ -1835,7 +1837,7 @@ ifdef AUTOCONFIGURED
# do want to recheck when the platform/environment detection logic
# changes, hence this depends on configure.ac.
config.status: configure.ac
$(QUIET_GEN)$(MAKE) configure && \
$(QUIET_GEN)$(CONFIGURE_RECIPE) && \
if test -f config.status; then \
./config.status --recheck; \
else \
Expand Down

0 comments on commit bb07a3f

Please sign in to comment.