From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Subject: [PATCH v2 7/7] build: reconfigure automatically if configure.ac changes
Date: Thu, 19 Jul 2012 09:50:02 +0200 [thread overview]
Message-ID: <173104dd1ddba55bca09e89ba090ebb852bdf1b7.1342683786.git.stefano.lattarini@gmail.com> (raw)
In-Reply-To: <cover.1342683786.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1342683786.git.stefano.lattarini@gmail.com>
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>
---
Makefile | 12 ++++++++++++
configure.ac | 2 ++
2 files changed, 14 insertions(+)
diff --git a/Makefile b/Makefile
index 88a76a3..f4e8fac 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
diff --git a/configure.ac b/configure.ac
index a63fe77..df7e376 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,6 +148,8 @@ AC_CONFIG_SRCDIR([git.c])
config_file=config.mak.autogen
config_in=config.mak.in
+GIT_CONF_SUBST([AUTOCONFIGURED], [YesPlease])
+
# Directories holding "saner" versions of common or POSIX binaries.
AC_ARG_WITH([sane-tool-path],
[AS_HELP_STRING(
--
1.7.10.2.1067.g553d16e
next prev parent reply other threads:[~2012-07-19 7:50 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 22:34 [PATCH 0/7] build system: support automatic reconfiguration for autotools user Stefano Lattarini
2012-07-18 22:34 ` [PATCH 1/7] autoconf: GIT_CONF_APPEND_LINE: change signature Stefano Lattarini
2012-07-18 22:34 ` [PATCH 2/7] autoconf: GIT_CONF_APPEND_LINE -> GIT_CONF_SUBST Stefano Lattarini
2012-07-19 0:13 ` Junio C Hamano
2012-07-19 7:32 ` Stefano Lattarini
2012-07-18 22:34 ` [PATCH 3/7] autoconf: remove some redundant shell indirections Stefano Lattarini
2012-07-19 0:29 ` Junio C Hamano
2012-07-19 7:30 ` Stefano Lattarini
2012-07-19 17:24 ` Junio C Hamano
2012-07-19 17:50 ` Stefano Lattarini
2012-07-18 22:34 ` [PATCH 4/7] autoconf: remove few redundant semicolons Stefano Lattarini
2012-07-18 22:35 ` [PATCH 5/7] autoconf: use AC_CONFIG_COMMANDS instead of ad-hoc 'config.mak.append' Stefano Lattarini
2012-07-18 22:35 ` [PATCH 6/7] build: "make clean" should not remove configure-generated files Stefano Lattarini
2012-07-19 6:56 ` Matthieu Moy
2012-07-19 7:30 ` Stefano Lattarini
2012-07-19 7:43 ` Matthieu Moy
2012-07-19 7:59 ` Stefano Lattarini
2012-07-19 17:27 ` Junio C Hamano
2012-07-18 22:35 ` [PATCH 7/7] build: reconfigure automatically if configure.ac changes Stefano Lattarini
2012-07-19 0:36 ` [PATCH 0/7] build system: support automatic reconfiguration for autotools user Junio C Hamano
2012-07-19 7:49 ` [PATCH v2 " Stefano Lattarini
2012-07-19 7:49 ` [PATCH v2 1/7] autoconf: GIT_CONF_APPEND_LINE: change signature Stefano Lattarini
2012-07-19 7:49 ` [PATCH v2 2/7] autoconf: GIT_CONF_APPEND_LINE -> GIT_CONF_SUBST Stefano Lattarini
2012-07-19 7:49 ` [PATCH v2 3/7] autoconf: remove some redundant shell indirections Stefano Lattarini
2012-07-19 7:49 ` [PATCH v2 4/7] autoconf: remove few redundant semicolons Stefano Lattarini
2012-07-19 7:50 ` [PATCH v2 5/7] autoconf: use AC_CONFIG_COMMANDS instead of ad-hoc 'config.mak.append' Stefano Lattarini
2012-07-19 7:50 ` [PATCH v2 6/7] build: "make clean" should not remove configure-generated files Stefano Lattarini
2012-07-23 23:15 ` Stefano Lattarini
2012-07-23 23:28 ` Junio C Hamano
2012-07-19 7:50 ` Stefano Lattarini [this message]
2012-07-23 23:16 ` [PATCH v2 7/7] build: reconfigure automatically if configure.ac changes Stefano Lattarini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=173104dd1ddba55bca09e89ba090ebb852bdf1b7.1342683786.git.stefano.lattarini@gmail.com \
--to=stefano.lattarini@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).