summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Stefano Lattarini <stefano.lattarini@gmail.com>2012-07-19 09:50:02 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-19 10:30:26 -0700
commit8242ff470f2a34b5c0f193c4010cbf3d9b57f9bd (patch)
treeee5a3c7d54d8768388522d421c234b27bf4e6d7a /Makefile
parentbuild: "make clean" should not remove configure-generated files (diff)
downloadtgif-8242ff470f2a34b5c0f193c4010cbf3d9b57f9bd.tar.xz
build: reconfigure automatically if configure.ac changes
This provides a reduced but still useful sibling of the Automake's "automatic Makefile rebuild" feature. It's important to note that we take care to enable the new rules only if the tree that has already be configured with './configure', so that users relying on manual configuration won't be negatively impacted. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 88a76a398c..f4e8fac491 100644
--- a/Makefile
+++ b/Makefile
@@ -2158,6 +2158,18 @@ configure: configure.ac GIT-VERSION-FILE
autoconf -o $@ $<+ && \
$(RM) $<+
+ifdef AUTOCONFIGURED
+config.status: configure
+ $(QUIET_GEN)if test -f config.status; then \
+ ./config.status --recheck; \
+ else \
+ ./configure; \
+ fi
+reconfigure config.mak.autogen: config.status
+ $(QUIET_GEN)./config.status
+.PHONY: reconfigure # This is a convenience target.
+endif
+
XDIFF_OBJS += xdiff/xdiffi.o
XDIFF_OBJS += xdiff/xprepare.o
XDIFF_OBJS += xdiff/xutils.o