emacs-diffs
[Top][All Lists]
Advanced

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

scratch/elisp-benchmarks 3f2c77539bf 53/54: Add "make elisp-benchmarks"


From: Pip Cet
Subject: scratch/elisp-benchmarks 3f2c77539bf 53/54: Add "make elisp-benchmarks" target
Date: Sat, 4 Jan 2025 12:26:38 -0500 (EST)

branch: scratch/elisp-benchmarks
commit 3f2c77539bf68798abb50aa7079ae3029ec90cac
Author: Pip Cet <pipcet@protonmail.com>
Commit: Pip Cet <pipcet@protonmail.com>

    Add "make elisp-benchmarks" target
    
    * benchmarks/Makefile.in: New file.
    * Makefile.in: New 'elisp-benchmarks' target.
    * configure.ac: Build Makefile in 'benchmarks' directory.
---
 Makefile.in            |  7 ++++-
 benchmarks/Makefile.in | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac           |  8 +++++
 3 files changed, 94 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 342bec11d81..72f86710be3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1012,7 +1012,7 @@ endef
 ###      target for GCC does not delete 'libgcc.a', because recompiling it
 ###      is rarely necessary and takes a lot of time.
 mostlyclean_dirs = src oldXMenu lwlib lib lib-src nt doc/emacs doc/misc \
-  doc/lispref doc/lispintro test
+  doc/lispref doc/lispintro test benchmarks
 
 ### Add the libexec directory to mostlyclean_dirs if its Makefile has
 ### been created.
@@ -1398,3 +1398,8 @@ ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes)
        $(MKDIR_P) $(@D)
        touch $@
 endif
+
+.PHONY: elisp-benchmarks
+
+elisp-benchmarks:
+       $(MAKE) -C benchmarks $@
diff --git a/benchmarks/Makefile.in b/benchmarks/Makefile.in
new file mode 100644
index 00000000000..4967184fe0f
--- /dev/null
+++ b/benchmarks/Makefile.in
@@ -0,0 +1,80 @@
+### @configure_input@
+
+# Copyright (C) 2010-2024 Free Software Foundation, Inc.
+
+# This file is part of GNU Emacs.
+
+# GNU Emacs is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU Emacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+### Commentary:
+
+## Target:
+## elisp-benchmarks: run benchmarks with default settings
+
+### Code:
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+abs_top_srcdir = @abs_top_srcdir@
+top_builddir = @top_builddir@
+VPATH = $(srcdir)
+
+FIND_DELETE = @FIND_DELETE@
+SEPCHAR = @SEPCHAR@
+
+-include ${top_builddir}/src/verbose.mk
+
+# We never change directory before running Emacs, so a relative file
+# name is fine, and makes life easier.  If we need to change
+# directory, we can use emacs --chdir.
+EMACS = ../src/emacs
+
+EMACS_EXTRAOPT =
+
+# Command line flags for Emacs.
+# Apparently MSYS bash would convert "-L :" to "-L ;" anyway,
+# but we might as well be explicit.
+EMACSOPT = --no-init-file --no-site-file --no-site-lisp -L 
"$(SEPCHAR)$(srcdir)" $(EMACS_EXTRAOPT)
+
+# Prevent any settings in the user environment causing problems.
+unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH GREP_OPTIONS 
XDG_CONFIG_HOME
+
+# The actual Emacs command run in the targets below.
+# Prevent locales influencing the text of the errors we expect to receive.
+emacs = LANG=C \
+ $(GDB) "$(EMACS)" $(MODULES_EMACSOPT) $(EMACSOPT)
+
+.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
+
+mostlyclean:
+       @true
+
+clean:
+       @true
+
+bootstrap-clean: clean
+       find $(srcdir) -name '*.elc' $(FIND_DELETE)
+
+distclean: clean
+       rm -f Makefile
+
+maintainer-clean: distclean bootstrap-clean
+
+.PHONY: elisp-benchmarks
+
+elisp-benchmarks:
+       $(emacs) --batch -l elisp-benchmarks.el -f elisp-benchmarks-run
+
+.PHONY: subdirs subdir-targets generate-test-jobs
diff --git a/configure.ac b/configure.ac
index f78997ede24..929e6bf32b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7897,6 +7897,14 @@ if test -f "$srcdir/$opt_makefile.in"; then
   ARCH_INDEPENDENT_CONFIG_FILES([test/infra/Makefile])
 fi
 
+opt_makefile=benchmarks/Makefile
+if test -f "$srcdir/$opt_makefile.in"; then
+  SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
+  dnl Again, it's best not to use a variable.  Though you can add
+  dnl ", [], [opt_makefile='$opt_makefile']" and it should work.
+  ARCH_INDEPENDENT_CONFIG_FILES([benchmarks/Makefile])
+fi
+
 if test "$ANDROID" = "yes"; then
   SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES java/Makefile cross/Makefile"
 fi



reply via email to

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