* bug#51965: [PATCH] Pass options from make to configure
@ 2021-11-19 9:11 Gregory Heytings
2021-11-20 9:53 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Gregory Heytings @ 2021-11-19 9:11 UTC (permalink / raw)
To: 51965
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]
A 'make' in a repository clone builds Emacs with the default configuration
options. It would be useful if those who want to build Emacs with other
configuration options they already know could do that without going
through the three-step ./autogen.sh; ./configure <options>; make. Patch
attached, with which it becomes possible to just say e.g.:
make configure=--with-x-toolkit=lucid
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=Pass-options-from-make-to-configure-through-a-variab.patch, Size: 1951 bytes --]
From ce3fb202ece312958ba1cb8e459dca8046f37daf Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Fri, 19 Nov 2021 09:02:08 +0000
Subject: [PATCH] Pass options from make to configure through a variable.
* GNUmakefile (configure): Use the variable.
* INSTALL.REPO: Mention the variable.
---
GNUmakefile | 4 ++--
INSTALL.REPO | 12 +++++++++---
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index e409628915..8fce2e3172 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -104,8 +104,8 @@ configure:
Makefile: configure
@echo >&2 'There seems to be no Makefile in this directory.'
- @echo >&2 'Running ./configure ...'
- ./configure
+ @echo >&2 'Running ./configure '$(configure)'...'
+ ./configure $(configure)
@echo >&2 'Makefile built.'
# 'make bootstrap' in a fresh checkout needn't run 'configure' twice.
diff --git a/INSTALL.REPO b/INSTALL.REPO
index da56d7611b..9aee48320f 100644
--- a/INSTALL.REPO
+++ b/INSTALL.REPO
@@ -8,9 +8,15 @@ directory on your local machine:
To build the repository code, simply run 'make' in the 'emacs'
directory. This should work if your files are freshly checked out
-from the repository, and if you have the proper tools installed. If
-it doesn't work, or if you have special build requirements, the
-following information may be helpful.
+from the repository, and if you have the proper tools installed; the
+default configuration options will be used. Other configuration
+options can be specified by setting a 'configure' variable, for
+example:
+
+ $ make configure="--prefix=/opt/emacs CFLAGS='-O0 -g3'"
+
+If the above doesn't work, or if you have special build requirements,
+the following information may be helpful.
Building Emacs from the source-code repository requires some tools
that are not needed when building from a release. You will need:
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#51965: [PATCH] Pass options from make to configure
2021-11-19 9:11 bug#51965: [PATCH] Pass options from make to configure Gregory Heytings
@ 2021-11-20 9:53 ` Lars Ingebrigtsen
2021-11-23 10:01 ` Gregory Heytings
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-20 9:53 UTC (permalink / raw)
To: Gregory Heytings; +Cc: 51965
Gregory Heytings <gregory@heytings.org> writes:
> A 'make' in a repository clone builds Emacs with the default
> configuration options. It would be useful if those who want to build
> Emacs with other configuration options they already know could do that
> without going through the three-step ./autogen.sh; ./configure
> <options>; make. Patch attached, with which it becomes possible to
> just say e.g.:
>
> make configure=--with-x-toolkit=lucid
That sounds useful -- but if we add this, perhaps the normal Makefile
should also work this way? That would be useful when doing bootstraps
with new configure options, which currently take two runs through
configure, which is a bore. I.e.,
make configure=--with-x-toolkit=lucid bootstrap
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#51965: [PATCH] Pass options from make to configure
2021-11-20 9:53 ` Lars Ingebrigtsen
@ 2021-11-23 10:01 ` Gregory Heytings
2021-11-24 6:58 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Gregory Heytings @ 2021-11-23 10:01 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 51965
[-- Attachment #1: Type: text/plain, Size: 977 bytes --]
>> A 'make' in a repository clone builds Emacs with the default
>> configuration options. It would be useful if those who want to build
>> Emacs with other configuration options they already know could do that
>> without going through the three-step ./autogen.sh; ./configure
>> <options>; make. Patch attached, with which it becomes possible to
>> just say e.g.:
>>
>> make configure=--with-x-toolkit=lucid
>
> That sounds useful -- but if we add this, perhaps the normal Makefile
> should also work this way? That would be useful when doing bootstraps
> with new configure options, which currently take two runs through
> configure, which is a bore. I.e.,
>
> make configure=--with-x-toolkit=lucid bootstrap
>
Indeed, that makes sense.
I attach a patch with which it is possible to say, with both the
GNUmakefile or the Makefile:
make bootstrap configure=--with-x-toolkit=lucid
and, to go back to the default configuration:
make bootstrap configure=default
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=Pass-options-from-make-to-configure-through-a-variab.patch, Size: 3969 bytes --]
From dc486632e268226d8576fdd61005169497a72168 Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Tue, 23 Nov 2021 09:57:27 +0000
Subject: [PATCH] Pass options from make to configure through a variable.
* GNUmakefile (configure): Use the variable.
* Makefile (bootstrap): Act differently when the variable is set.
* INSTALL.REPO: Document the variable.
---
GNUmakefile | 5 +++++
INSTALL.REPO | 23 +++++++++++++++++++----
Makefile.in | 13 +++++++++++--
3 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 5155487de2..76fd77ba1b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -104,8 +104,13 @@ configure:
Makefile: configure
@echo >&2 'There seems to be no Makefile in this directory.'
+ifeq ($(configure),default)
@echo >&2 'Running ./configure ...'
./configure
+else
+ @echo >&2 'Running ./configure '$(configure)'...'
+ ./configure $(configure)
+endif
@echo >&2 'Makefile built.'
# 'make bootstrap' in a fresh checkout needn't run 'configure' twice.
diff --git a/INSTALL.REPO b/INSTALL.REPO
index da56d7611b..182c2e9534 100644
--- a/INSTALL.REPO
+++ b/INSTALL.REPO
@@ -8,9 +8,15 @@ directory on your local machine:
To build the repository code, simply run 'make' in the 'emacs'
directory. This should work if your files are freshly checked out
-from the repository, and if you have the proper tools installed. If
-it doesn't work, or if you have special build requirements, the
-following information may be helpful.
+from the repository, and if you have the proper tools installed; the
+default configuration options will be used. Other configuration
+options can be specified by setting a 'configure' variable, for
+example:
+
+ $ make configure="--prefix=/opt/emacs CFLAGS='-O0 -g3'"
+
+If the above doesn't work, or if you have special build requirements,
+the following information may be helpful.
Building Emacs from the source-code repository requires some tools
that are not needed when building from a release. You will need:
@@ -58,7 +64,16 @@ To update loaddefs.el (and similar files), do:
If either of the above partial procedures fails, try 'make bootstrap'.
If CPU time is not an issue, 'make bootstrap' is a more thorough way
-to rebuild, avoiding spurious problems.
+to rebuild, avoiding spurious problems. 'make bootstrap' rebuilds
+Emacs with the same configuration options as the previous build; it
+can also be used to rebuild Emacs with other configuration options by
+setting a 'configure' variable, for example:
+
+ $ make bootstrap configure="CFLAGS='-O0 -g3'"
+
+To rebuild Emacs with the default configuration options, you can use:
+
+ $ make bootstrap configure=default
Occasionally, there are changes that 'make bootstrap' won't be able to
handle. The most thorough cleaning can be achieved by 'git clean -fdx'
diff --git a/Makefile.in b/Makefile.in
index 3c092fa63d..4b40d8741d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1145,14 +1145,23 @@ check-info:
.PHONY: bootstrap
-# Bootstrapping does the following:
+# Without a 'configure' variable, bootstrapping does the following:
# * Remove files to start from a bootstrap-clean slate.
# * Run autogen.sh.
# * Rebuild Makefile, to update the build procedure itself.
# * Do the actual build.
-bootstrap: bootstrap-clean
+# With a 'configure' variable, bootstrapping does the following:
+# * Remove files to start from an extraclean slate.
+# * Do the actual build, during which the 'configure' variable is
+# used (see the Makefile goal in GNUmakefile).
+bootstrap:
+ifndef configure
+ $(MAKE) bootstrap-clean
cd $(srcdir) && ./autogen.sh autoconf
$(MAKE) MAKEFILE_NAME=force-Makefile force-Makefile
+else
+ $(MAKE) extraclean
+endif
$(MAKE) all
.PHONY: ChangeLog change-history change-history-commit change-history-nocommit
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#51965: [PATCH] Pass options from make to configure
2021-11-23 10:01 ` Gregory Heytings
@ 2021-11-24 6:58 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-24 6:58 UTC (permalink / raw)
To: Gregory Heytings; +Cc: 51965
Gregory Heytings <gregory@heytings.org> writes:
> I attach a patch with which it is possible to say, with both the
> GNUmakefile or the Makefile:
>
> make bootstrap configure=--with-x-toolkit=lucid
>
> and, to go back to the default configuration:
>
> make bootstrap configure=default
Thanks; seems to work well here, so I've pushed it to Emacs 29.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-24 6:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-19 9:11 bug#51965: [PATCH] Pass options from make to configure Gregory Heytings
2021-11-20 9:53 ` Lars Ingebrigtsen
2021-11-23 10:01 ` Gregory Heytings
2021-11-24 6:58 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.