emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re-running configure automatically


From: Eli Zaretskii
Subject: Re-running configure automatically
Date: Wed, 17 Apr 2013 21:36:39 +0300

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]