unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re-running configure automatically
@ 2013-04-17 18:36 Eli Zaretskii
  2013-04-17 18:50 ` Paul Eggert
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2013-04-17 18:36 UTC (permalink / raw)
  To: emacs-devel

We have a GNUmakefile file in the top-level directory, which makes it
easy to automatically reconfigure the tree when needed.

However, the Windows build needs to point the configure script at a
custom site file in nt/mingw-cfg.site.  So I'd like to arrange for
GNUmakefile and the subsequent invocation of Makefile, if it exists,
to honor that.

Is the following a correct and clean way of achieving that goal?

=== modified file 'GNUmakefile'
--- GNUmakefile	2013-01-01 09:11:05 +0000
+++ GNUmakefile	2013-04-17 18:29:42 +0000
@@ -32,6 +32,11 @@
 # run "configure" by hand.  But run autogen.sh first, if the source
 # was checked out directly from the repository.
 
+ifneq ($(MSYSTEM),)
+CFG = CONFIG_SITE=$(CURDIR)/nt/mingw-cfg.site
+else
+CFG =
+endif
 
 # If a Makefile already exists, just use it.
 
@@ -70,7 +75,7 @@ configure:
 Makefile: configure
 	@echo >&2 'There seems to be no Makefile in this directory.'
 	@echo >&2 'Running ./configure ...'
-	./configure
+	$(CFG) ./configure
 	@echo >&2 'Makefile built.'
 
 endif

=== modified file 'Makefile.in'
--- Makefile.in	2013-04-17 17:51:31 +0000
+++ Makefile.in	2013-04-17 18:32:10 +0000
@@ -393,9 +393,9 @@ $(MAKEFILE_NAME): config.status $(srcdir
 
 config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
 	if [ -x ./config.status ]; then	\
-	    ./config.status --recheck;	\
+	    $(CFG) ./config.status --recheck;	\
 	else				\
-	    $(srcdir)/configure $(CONFIGURE_FLAGS); \
+	    $(CFG) $(srcdir)/configure $(CONFIGURE_FLAGS); \
 	fi
 
 AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re-running configure automatically
  2013-04-17 18:36 Re-running configure automatically Eli Zaretskii
@ 2013-04-17 18:50 ` Paul Eggert
  2013-04-17 19:46   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2013-04-17 18:50 UTC (permalink / raw)
  To: emacs-devel

On 04/17/13 11:36, Eli Zaretskii wrote:
> Is the following a correct and clean way of achieving that goal?

Looks OK to me....



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re-running configure automatically
  2013-04-17 18:50 ` Paul Eggert
@ 2013-04-17 19:46   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2013-04-17 19:46 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

> Date: Wed, 17 Apr 2013 11:50:05 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> 
> On 04/17/13 11:36, Eli Zaretskii wrote:
> > Is the following a correct and clean way of achieving that goal?
> 
> Looks OK to me....

Thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-17 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-17 18:36 Re-running configure automatically Eli Zaretskii
2013-04-17 18:50 ` Paul Eggert
2013-04-17 19:46   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).