Skip to content

Commit 5f3f214

Browse files
committed
Refactored so extra flags are used everywhere
1 parent 4e2fefb commit 5f3f214

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2024-12-27 Mats Lidell <[email protected]>
2+
3+
* Makefile (EXTRA_COMP_FLAGS): Macro for extra flags to Emacs for byte and
4+
native compilation.
5+
16
2024-12-27 Bob Weiner <[email protected]>
27

38
* test/hywiki-tests.el (hywiki-tests--add-activity,

Makefile

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Author: Bob Weiner
44
#
55
# Orig-Date: 15-Jun-94 at 03:42:38
6-
# Last-Mod: 27-Dec-24 at 18:23:33 by Mats Lidell
6+
# Last-Mod: 27-Dec-24 at 20:27:26 by Mats Lidell
77
#
88
# Copyright (C) 1994-2023 Free Software Foundation, Inc.
99
# See the file HY-COPY for license information.
@@ -195,8 +195,13 @@ PRELOADS = $(SITE_PRELOADS) -l ./hload-path.el -l ./hversion.el -l ./hyperbole.e
195195
BATCHFLAGS = --batch --quick --eval "(progn (setq backtrace-line-length 0) \
196196
(message \" emacs-version = %s\n system-configuration = %s\n emacs = %s%s\n load-path = %s\" emacs-version system-configuration invocation-directory invocation-name load-path))"
197197

198-
EMACS_BATCH=$(EMACS) $(BATCHFLAGS) $(PRELOADS)
199-
EMACS_PLAIN_BATCH=$(EMACS) $(BATCHFLAGS)
198+
# Extra flags for byte and native compilation
199+
EXTRA_COMP_FLAGS = --eval "(progn \
200+
(put 'if-let 'byte-obsolete-info nil) \
201+
(put 'when-let 'byte-obsolete-info nil))"
202+
203+
EMACS_BATCH=$(EMACS) $(BATCHFLAGS) $(EXTRA_COMP_FLAGS) $(PRELOADS)
204+
EMACS_PLAIN_BATCH=$(EMACS) $(BATCHFLAGS) $(EXTRA_COMP_FLAGS)
200205

201206
# Directories other than the current directory in which to find files.
202207
# This doesn't seem to work in all versions of make, so we also add kotl/
@@ -333,11 +338,6 @@ else ifeq ($(origin HYPB_WARNINGS), environment)
333338
HYPB_BIN_WARN = --eval "(setq-default byte-compile-warnings '(${HYPB_WARNINGS}))"
334339
endif
335340

336-
# Extra flags for byte and native compilation
337-
EXTRA_COMP_FLAGS = --eval "(progn \
338-
(put 'if-let 'byte-obsolete-info nil) \
339-
(put 'when-let 'byte-obsolete-info nil))"
340-
341341
curr_dir = $(shell pwd)
342342
ifeq ($(HYPB_NATIVE_COMP),yes)
343343
%.elc: %.el
@@ -351,7 +351,7 @@ else
351351
@printf "Compiling $<\n"
352352
@$(EMACS) --batch --quick \
353353
--eval "(progn (add-to-list 'load-path \"$(curr_dir)\") (add-to-list 'load-path \"$(curr_dir)/kotl\"))" \
354-
${HYPB_BIN_WARN} ${EXTRA_COMP_FLAGS} \
354+
${HYPB_BIN_WARN} ${EXTRA_COMP_FLAGS} \
355355
-f batch-byte-compile $<
356356
endif
357357

0 commit comments

Comments
 (0)