2007-12-06 15:28:29 +00:00
|
|
|
# QEmacs, tiny but powerful multimode editor
|
|
|
|
|
#
|
2008-04-17 08:42:10 +00:00
|
|
|
# Copyright (c) 2000-2002 Fabrice Bellard.
|
2026-04-30 15:51:52 +02:00
|
|
|
# Copyright (c) 2000-2026 Charlie Gordon.
|
2007-12-06 15:28:29 +00:00
|
|
|
#
|
2023-03-05 02:04:02 +01:00
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
# furnished to do so, subject to the following conditions:
|
2007-12-06 15:28:29 +00:00
|
|
|
#
|
2023-03-05 02:04:02 +01:00
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
|
# all copies or substantial portions of the Software.
|
2007-12-06 15:28:29 +00:00
|
|
|
#
|
2023-03-05 02:04:02 +01:00
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
# THE SOFTWARE.
|
2007-12-06 15:28:29 +00:00
|
|
|
|
2014-01-23 12:56:22 +00:00
|
|
|
DEPTH=.
|
2021-04-18 21:03:45 +02:00
|
|
|
OSNAME:=$(shell uname -s)
|
2014-01-23 12:56:22 +00:00
|
|
|
|
2026-04-30 15:51:52 +02:00
|
|
|
ifeq (,$(wildcard $(DEPTH)/config.mak))
|
|
|
|
|
$(error you should run ./configure prior to make)
|
|
|
|
|
endif
|
|
|
|
|
|
2014-01-23 12:56:22 +00:00
|
|
|
include $(DEPTH)/config.mak
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2014-05-30 21:31:46 +00:00
|
|
|
ifeq (,$(V)$(VERBOSE))
|
2015-11-13 08:31:47 +00:00
|
|
|
echo := @echo
|
|
|
|
|
cmd := @
|
2014-05-30 21:31:46 +00:00
|
|
|
else
|
2015-11-13 08:31:47 +00:00
|
|
|
echo := @:
|
2020-10-21 15:01:52 +00:00
|
|
|
cmd :=
|
2014-05-30 21:31:46 +00:00
|
|
|
endif
|
|
|
|
|
|
2007-12-21 14:24:08 +00:00
|
|
|
ifeq ($(CC),gcc)
|
2020-11-11 19:31:07 +01:00
|
|
|
CFLAGS += -g -O2 -funsigned-char -Wall
|
2007-12-21 14:24:08 +00:00
|
|
|
# do not warn about zero-length formats.
|
2020-10-02 21:32:29 +00:00
|
|
|
CFLAGS += -Wno-format-zero-length
|
|
|
|
|
LDFLAGS += -g
|
2007-12-21 14:24:08 +00:00
|
|
|
endif
|
2006-12-31 19:34:00 +00:00
|
|
|
|
2007-12-21 14:24:08 +00:00
|
|
|
#include local compiler configuration file
|
2014-01-23 12:56:22 +00:00
|
|
|
-include $(DEPTH)/cflags.mk
|
2006-12-31 19:34:00 +00:00
|
|
|
|
2020-10-02 21:32:29 +00:00
|
|
|
ifdef CONFIG_DARWIN
|
|
|
|
|
CFLAGS += -Wno-string-plus-int
|
2022-08-26 12:30:29 +02:00
|
|
|
CFLAGS += -Wint-conversion
|
Various improvements for consistency
* add -Wno-packed compiler option
* add CONFIG_REGEX flag, undefined for tiny build
* disable regex commands in tiny build
* add documentation for some search commands and APIs
* reorder search tags for readability
* add isearch_yank_char
* use emacs names for:
isearch-repeat-backward, isearch-repeat-forward,
isearch-ring-advance, isearch-ring-retreat,
isearch-yank-word-or-char
* add occur alias for list-matching-lines
* add char32_to_utf8()
* restored some macros in cutils.h:
likely(x), unlikely(x), __maybe_unused, BOOL, FALSE, TRUE
* remove max(), min(), maxp(), minp(), clampp()
* add typed arithmetic functions:
min_int(), max_int(), clamp_int(), min3_int(), max3_int()
min_offset(), max_offset(), clamp_offset()
* use typed functions everywhere
* bump version to 5.4.1d
2022-11-21 00:20:18 +01:00
|
|
|
CFLAGS += -Wno-packed
|
2020-10-02 21:32:29 +00:00
|
|
|
else
|
2021-04-18 21:03:45 +02:00
|
|
|
ifneq ($(OSNAME),OpenBSD)
|
2020-10-02 21:32:29 +00:00
|
|
|
CFLAGS += -Wno-unused-result
|
|
|
|
|
endif
|
2021-04-18 21:03:45 +02:00
|
|
|
endif
|
2020-10-02 21:32:29 +00:00
|
|
|
|
2004-05-29 10:17:37 +00:00
|
|
|
ifdef TARGET_GPROF
|
2014-01-23 12:56:22 +00:00
|
|
|
CFLAGS += -p
|
|
|
|
|
LDFLAGS += -p
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
2006-12-31 19:34:00 +00:00
|
|
|
|
2020-11-11 19:31:07 +01:00
|
|
|
CFLAGS+=-I$(DEPTH)
|
|
|
|
|
|
2004-05-29 10:17:37 +00:00
|
|
|
ifdef TARGET_ARCH_X86
|
2007-12-21 14:24:08 +00:00
|
|
|
#CFLAGS+=-fomit-frame-pointer
|
|
|
|
|
ifeq ($(GCC_MAJOR),2)
|
2015-10-14 09:31:20 +00:00
|
|
|
CFLAGS += -m386 -malign-functions=0
|
2007-12-21 14:24:08 +00:00
|
|
|
else
|
2015-10-14 09:31:20 +00:00
|
|
|
CFLAGS += -march=i386 -falign-functions=0
|
2007-12-21 14:24:08 +00:00
|
|
|
endif
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
2006-12-31 19:34:00 +00:00
|
|
|
|
2024-07-28 00:04:20 +02:00
|
|
|
ifeq ($(CC),$(HOST_CC))
|
|
|
|
|
HOST_CFLAGS:=$(CFLAGS)
|
|
|
|
|
endif
|
2021-02-01 20:38:29 +01:00
|
|
|
|
2004-05-29 10:17:37 +00:00
|
|
|
DEFINES=-DHAVE_QE_CONFIG_H
|
|
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
|
# do not modify after this
|
|
|
|
|
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
ifeq ($(CC),clang)
|
|
|
|
|
SANITIZE_CFLAGS := -fno-sanitize-recover=all -fno-omit-frame-pointer
|
|
|
|
|
else
|
|
|
|
|
SANITIZE_CFLAGS := -fno-omit-frame-pointer
|
|
|
|
|
endif
|
|
|
|
|
DEBUG_SUFFIX:=
|
2021-02-01 20:38:29 +01:00
|
|
|
ifdef DEBUG
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
$(info Building with debug info)
|
2021-02-01 20:38:29 +01:00
|
|
|
DEBUG_SUFFIX:=_debug
|
|
|
|
|
ECHO_CFLAGS += -DCONFIG_DEBUG
|
|
|
|
|
CFLAGS += -g -O0
|
|
|
|
|
LDFLAGS += -g -O0
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
endif
|
|
|
|
|
ifdef ASAN
|
|
|
|
|
$(info Building with ASan)
|
|
|
|
|
DEBUG_SUFFIX:=_asan
|
|
|
|
|
ECHO_CFLAGS += -DCONFIG_ASAN
|
|
|
|
|
CFLAGS += -D__ASAN__
|
2024-12-05 12:04:58 +01:00
|
|
|
CFLAGS += -fsanitize=address $(SANITIZE_CFLAGS) -g
|
|
|
|
|
LDFLAGS += -fsanitize=address $(SANITIZE_CFLAGS) -g
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
endif
|
|
|
|
|
ifdef MSAN
|
|
|
|
|
$(info Building with MSan)
|
|
|
|
|
DEBUG_SUFFIX:=_msan
|
|
|
|
|
ECHO_CFLAGS += -DCONFIG_MSAN
|
|
|
|
|
CFLAGS += -D__MSAN__
|
2024-12-05 12:04:58 +01:00
|
|
|
CFLAGS += -fsanitize=memory $(SANITIZE_CFLAGS) -g
|
|
|
|
|
LDFLAGS += -fsanitize=memory $(SANITIZE_CFLAGS) -g
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
endif
|
|
|
|
|
ifdef UBSAN
|
|
|
|
|
$(info Building with UBSan)
|
|
|
|
|
DEBUG_SUFFIX:=_ubsan
|
|
|
|
|
ECHO_CFLAGS += -DCONFIG_UBSAN
|
|
|
|
|
CFLAGS += -D__UBSAN__
|
2024-12-05 12:04:58 +01:00
|
|
|
CFLAGS += -fsanitize=undefined $(SANITIZE_CFLAGS) -g
|
|
|
|
|
LDFLAGS += -fsanitize=undefined $(SANITIZE_CFLAGS) -g
|
2021-02-01 20:38:29 +01:00
|
|
|
endif
|
2026-04-30 15:51:52 +02:00
|
|
|
ifdef CONFIG_32BIT
|
|
|
|
|
CFLAGS += -m32
|
|
|
|
|
LDFLAGS += -m32
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
BINDIR:=$(DEPTH)/bin
|
2021-02-01 20:38:29 +01:00
|
|
|
|
2008-01-18 17:03:35 +00:00
|
|
|
TARGETLIBS:=
|
2021-02-01 20:38:29 +01:00
|
|
|
|
|
|
|
|
ifeq (,$(TARGET))
|
2026-04-30 15:51:52 +02:00
|
|
|
|
|
|
|
|
TARGETS :=
|
|
|
|
|
ifndef CONFIG_TINY_ONLY
|
|
|
|
|
TARGETS += qe
|
|
|
|
|
endif
|
|
|
|
|
ifdef CONFIG_TINY
|
|
|
|
|
TARGETS += tqe
|
|
|
|
|
endif
|
|
|
|
|
ifdef CONFIG_X11
|
|
|
|
|
TARGETS += xqe
|
2025-02-05 12:52:48 +01:00
|
|
|
endif
|
2026-04-30 15:51:52 +02:00
|
|
|
ifdef CONFIG_DOC
|
|
|
|
|
TARGETS += qe-doc.html
|
2021-02-01 20:38:29 +01:00
|
|
|
endif
|
2026-04-30 15:51:52 +02:00
|
|
|
TARGET_OBJ := other
|
|
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
|
|
# targets that require recursion
|
|
|
|
|
qe: force; $(MAKE) TARGET=qe
|
|
|
|
|
xqe: force; $(MAKE) TARGET=xqe TARGET_OBJ=qe TARGET_X11=1
|
|
|
|
|
tqe: force; $(MAKE) TARGET=tqe TARGET_TINY=1
|
|
|
|
|
tqe1: force; $(MAKE) TARGET=tqe TARGET_TINY=1 tqe1$(EXE)
|
|
|
|
|
asan qe_asan: force; $(MAKE) TARGET=qe ASAN=1
|
|
|
|
|
msan qe_msan: force; $(MAKE) TARGET=qe MSAN=1
|
|
|
|
|
ubsan qe_ubsan: force; $(MAKE) TARGET=qe UBSAN=1
|
|
|
|
|
debug qe_debug: force; $(MAKE) TARGET=qe DEBUG=1
|
|
|
|
|
xqe_debug: force; $(MAKE) TARGET=xqe TARGET_OBJ=qe TARGET_X11=1 DEBUG=1
|
|
|
|
|
tqe_debug: force; $(MAKE) TARGET=tqe TARGET_TINY=1 DEBUG=1
|
|
|
|
|
qe-manual.md: force; $(MAKE) TARGET=qe qe-manual.md
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
# We have a specific TARGET (qe, xqe or tqe)
|
|
|
|
|
|
2022-08-11 12:43:35 +02:00
|
|
|
ifeq (,$(TARGET_OBJ))
|
|
|
|
|
TARGET_OBJ:=$(TARGET)
|
|
|
|
|
endif
|
2008-01-18 17:03:35 +00:00
|
|
|
|
2022-09-15 11:28:34 +02:00
|
|
|
OBJS:= qe.o cutils.o util.o color.o charset.o buffer.o search.o input.o display.o \
|
2022-09-05 20:27:48 +02:00
|
|
|
qescript.o modes/hex.o
|
2021-02-01 20:38:29 +01:00
|
|
|
|
|
|
|
|
ifdef TARGET_TINY
|
2021-02-01 20:41:00 +01:00
|
|
|
ECHO_CFLAGS += -DCONFIG_TINY
|
2021-02-01 20:38:29 +01:00
|
|
|
CFLAGS += -DCONFIG_TINY -Os
|
2023-02-21 15:04:55 +01:00
|
|
|
#CFLAGS += -m32
|
|
|
|
|
#LDFLAGS += -m32
|
2021-02-01 20:38:29 +01:00
|
|
|
endif
|
2008-03-31 20:35:31 +00:00
|
|
|
|
Add `repeat-mode` (#34)
- add `repeat` command on `C-x z`
- add `repeat-mode`, always enabled
- cycle all matching tags in current file on `goto-tag` and `find-tag`
- set up `repeat-mode` for these commands:
- `undo` on `C-x u` (`u` repeats `undo`, `r` performs `redo`)
- `undo` on `C-x r` (`r` repeats `redo`, `u` performs `undo`)
- `find-window-left`, `find-window-right`, `find-window-up`, `find-window-dow`
repeat navigation on `up`, `down`, `left`, `right`
- `next-error`, `previous-error`: `M-n` and `M-p` repeat in corresponding direction
- `next-buffer`, `previous-buffer: repeat buffers nagivation with `left` and `right`
- `enlarge-window` / `shrink-window`: repeat resizing on `^`, `v`, `{`, `}`
and cursor movement keys
- `goto-tag` on `C-x ,` goto next tag with `,` and `.`
- `call-last-kbd-macro` on `C-x e`: repeat macro on `e`
- add `eb_count_buffers` and `eb_get_buffer_from_index` for safe buffer navigation
- add transient bindings, known as repeat maps in GNU emacs
- pass `KeyDef **lp` (aka key maps) instead of mode for binding commands
- replace `do_next_buffer` and `do_prevous_buffer` with repeatable command
`do_buffer_navigation`
- fix `bufed_select` crash bug when selecting buffer from a regular window
2024-05-25 23:37:05 +02:00
|
|
|
#ifdef CONFIG_DARWIN
|
|
|
|
|
# LDFLAGS += -L/opt/local/lib/
|
|
|
|
|
#endif
|
2016-12-27 11:40:40 +00:00
|
|
|
|
2004-05-29 10:17:37 +00:00
|
|
|
ifdef CONFIG_PNG_OUTPUT
|
2015-10-14 09:31:20 +00:00
|
|
|
HTMLTOPPM_LIBS += -lpng
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
2005-05-13 09:56:44 +00:00
|
|
|
|
2004-05-29 10:17:37 +00:00
|
|
|
ifdef CONFIG_DLL
|
2015-10-14 09:31:20 +00:00
|
|
|
LIBS += $(DLLIBS)
|
2007-12-21 14:24:08 +00:00
|
|
|
# export some qemacs symbols
|
2015-10-14 09:31:20 +00:00
|
|
|
LDFLAGS += -Wl,-E
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
2005-05-13 09:56:44 +00:00
|
|
|
|
2013-12-17 16:08:55 +00:00
|
|
|
ifdef CONFIG_HAIKU
|
2015-10-14 09:31:20 +00:00
|
|
|
OBJS += haiku.o
|
2017-03-28 12:53:15 +00:00
|
|
|
LIBS += -lbe -lstdc++
|
2013-12-17 16:08:55 +00:00
|
|
|
endif
|
|
|
|
|
|
2008-01-10 12:21:05 +00:00
|
|
|
ifdef CONFIG_WIN32
|
2014-02-03 20:03:07 +00:00
|
|
|
OBJS+= unix.o win32.o
|
2008-04-05 23:04:56 +00:00
|
|
|
# OBJS+= printf.o
|
|
|
|
|
LIBS+= -lmsvcrt -lgdi32 -lwsock32
|
2008-01-10 12:21:05 +00:00
|
|
|
else
|
2008-01-03 09:51:29 +00:00
|
|
|
OBJS+= unix.o tty.o
|
2013-12-17 16:08:55 +00:00
|
|
|
LIBS+= $(EXTRALIBS)
|
2008-01-10 12:21:05 +00:00
|
|
|
endif
|
|
|
|
|
|
2026-04-30 15:51:52 +02:00
|
|
|
ifeq (qe,$(TARGET))
|
|
|
|
|
# qe-manual.md depends on $(SRCS) and $(DEPENDS)
|
|
|
|
|
TARGETS += kmaps ligatures qe-manual.md
|
|
|
|
|
endif
|
|
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
ifndef TARGET_TINY
|
2022-08-19 22:38:38 +02:00
|
|
|
|
2026-04-30 15:51:52 +02:00
|
|
|
OBJS+= extras.o variables.o
|
|
|
|
|
|
2008-04-12 12:37:07 +00:00
|
|
|
ifdef CONFIG_QSCRIPT
|
|
|
|
|
OBJS+= qscript.o eval.o
|
|
|
|
|
endif
|
|
|
|
|
|
2008-01-10 12:21:05 +00:00
|
|
|
ifdef CONFIG_ALL_KMAPS
|
|
|
|
|
OBJS+= kmap.o
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifdef CONFIG_UNICODE_JOIN
|
2023-03-05 01:12:14 +01:00
|
|
|
OBJS+= unicode_join.o arabic.o indic.o
|
2023-03-05 13:34:19 +01:00
|
|
|
OBJS+= libunicode.o libregexp.o
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# more charsets if needed
|
2014-02-03 20:03:07 +00:00
|
|
|
OBJS+= charsetjis.o charsetmore.o
|
2004-05-29 10:17:37 +00:00
|
|
|
|
|
|
|
|
ifdef CONFIG_ALL_MODES
|
2021-01-26 09:39:32 +01:00
|
|
|
OBJS+= modes/unihex.o modes/bufed.o modes/orgmode.o modes/markdown.o \
|
|
|
|
|
lang/clang.o lang/xml.o lang/htmlsrc.o lang/forth.o \
|
|
|
|
|
lang/arm.o lang/lisp.o lang/makemode.o lang/perl.o \
|
|
|
|
|
lang/script.o lang/ebnf.o lang/cobol.o lang/rlang.o \
|
|
|
|
|
lang/txl.o lang/nim.o lang/rebol.o lang/elm.o \
|
|
|
|
|
lang/jai.o lang/ats.o lang/rust.o lang/swift.o \
|
|
|
|
|
lang/icon.o lang/groovy.o lang/virgil.o lang/ada.o \
|
|
|
|
|
lang/basic.o lang/vimscript.o lang/pascal.o lang/fortran.o \
|
|
|
|
|
lang/haskell.o lang/lua.o lang/python.o lang/ruby.o \
|
|
|
|
|
lang/smalltalk.o lang/sql.o lang/elixir.o lang/agena.o \
|
|
|
|
|
lang/coffee.o lang/erlang.o lang/julia.o lang/ocaml.o \
|
|
|
|
|
lang/scad.o lang/magpie.o lang/falcon.o lang/wolfram.o \
|
|
|
|
|
lang/tiger.o lang/asm.o lang/inifile.o lang/postscript.o \
|
2024-02-10 20:01:33 +01:00
|
|
|
lang/sharp.o lang/emf.o lang/csv.o lang/crystal.o \
|
2025-02-07 17:34:09 +01:00
|
|
|
lang/rye.o lang/nanorc.o lang/tcl.o modes/fractal.o \
|
2026-02-06 11:26:34 +01:00
|
|
|
lang/algol68.o $(EXTRA_MODES)
|
2021-01-26 09:39:32 +01:00
|
|
|
ifndef CONFIG_WIN32
|
|
|
|
|
OBJS+= modes/shell.o modes/dired.o modes/archive.o modes/latex-mode.o
|
|
|
|
|
endif
|
2026-04-30 15:51:52 +02:00
|
|
|
endif # ifdef CONFIG_ALL_MODES
|
2004-05-29 10:17:37 +00:00
|
|
|
|
|
|
|
|
# currently not used in qemacs
|
|
|
|
|
ifdef CONFIG_CFB
|
2007-12-21 14:24:08 +00:00
|
|
|
OBJS+= libfbf.o fbfrender.o cfb.o fbffonts.o
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifdef CONFIG_HTML
|
2021-02-01 20:38:29 +01:00
|
|
|
LIBQHTML:= $(DEPTH)/.objs/$(TARGET_OS)-$(TARGET_ARCH)-$(CC)/libqhtml$(DEBUG_SUFFIX).a
|
|
|
|
|
QHTML_LIBS:= -L$(DEPTH)/.objs/$(TARGET_OS)-$(TARGET_ARCH)-$(CC)/ -lqhtml$(DEBUG_SUFFIX)
|
2014-01-23 12:56:22 +00:00
|
|
|
CFLAGS+= -I./libqhtml
|
2021-02-01 20:38:29 +01:00
|
|
|
HOST_CFLAGS+= -I./libqhtml
|
|
|
|
|
DEP_LIBS+= $(LIBQHTML)
|
2016-12-27 11:40:40 +00:00
|
|
|
LIBS+= $(QHTML_LIBS)
|
2020-11-11 19:31:07 +01:00
|
|
|
OBJS+= modes/html.o modes/docbook.o
|
2007-12-21 14:24:08 +00:00
|
|
|
ifndef CONFIG_WIN32
|
|
|
|
|
TARGETLIBS+= libqhtml
|
|
|
|
|
TARGETS+= html2png$(EXE)
|
|
|
|
|
endif
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifdef CONFIG_FFMPEG
|
2020-11-11 19:31:07 +01:00
|
|
|
OBJS+= modes/video.o modes/image.o
|
2008-01-18 17:03:35 +00:00
|
|
|
DEP_LIBS+= $(FFMPEG_LIBDIR)/libavcodec/libavcodec.a $(FFMPEG_LIBDIR)/libavformat/libavformat.a
|
|
|
|
|
LIBS+= -L$(FFMPEG_LIBDIR)/libavcodec -L$(FFMPEG_LIBDIR)/libavformat -lavformat -lavcodec -lz -lpthread
|
2007-12-21 14:24:08 +00:00
|
|
|
DEFINES+= -I$(FFMPEG_SRCDIR)/libavcodec -I$(FFMPEG_SRCDIR)/libavformat
|
|
|
|
|
TARGETS+= ffplay$(EXE)
|
2017-05-15 09:58:02 +00:00
|
|
|
else
|
2020-11-11 19:31:07 +01:00
|
|
|
OBJS+= modes/stb.o
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
|
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
ifdef TARGET_X11
|
|
|
|
|
OBJS+= x11.o
|
2026-04-30 15:51:52 +02:00
|
|
|
#ECHO_CFLAGS += -DCONFIG_X11
|
|
|
|
|
#DEFINES += -DCONFIG_X11
|
2021-02-01 20:38:29 +01:00
|
|
|
CFLAGS += $(XCFLAGS)
|
|
|
|
|
LDFLAGS += $(XLDFLAGS)
|
|
|
|
|
LIBS += $(XLIBS)
|
2016-03-06 18:02:21 +00:00
|
|
|
ifdef CONFIG_XRENDER
|
2021-02-01 20:38:29 +01:00
|
|
|
LIBS += -lXrender
|
2016-03-06 18:02:21 +00:00
|
|
|
endif
|
|
|
|
|
ifdef CONFIG_XV
|
2021-02-01 20:38:29 +01:00
|
|
|
LIBS += -lXv
|
2016-03-06 18:02:21 +00:00
|
|
|
endif
|
|
|
|
|
ifdef CONFIG_XSHM
|
2021-02-01 20:38:29 +01:00
|
|
|
LIBS += -lXext
|
2016-03-06 18:02:21 +00:00
|
|
|
endif
|
2021-02-01 20:38:29 +01:00
|
|
|
LIBS += -lX11 $(DLLIBS)
|
2016-03-06 18:02:21 +00:00
|
|
|
endif
|
2022-08-19 22:38:38 +02:00
|
|
|
endif # TARGET_TINY
|
2016-12-25 23:32:48 +00:00
|
|
|
|
2008-06-04 08:49:24 +00:00
|
|
|
SRCS:= $(OBJS:.o=.c)
|
|
|
|
|
|
2022-09-19 15:16:59 +02:00
|
|
|
DEPENDS:= qe.h config.h config.mak charset.h color.h cutils.h display.h \
|
2023-03-05 01:12:14 +01:00
|
|
|
qestyles.h unicode_join.h util.h variables.h \
|
2022-10-15 19:22:06 +02:00
|
|
|
wcwidth.h lang/clang.h
|
|
|
|
|
|
2014-01-23 12:56:22 +00:00
|
|
|
DEPENDS:= $(addprefix $(DEPTH)/, $(DEPENDS))
|
|
|
|
|
|
2022-08-11 12:43:35 +02:00
|
|
|
OBJS_DIR:= $(DEPTH)/.objs/$(TARGET_OS)-$(TARGET_ARCH)-$(CC)/$(TARGET_OBJ)$(DEBUG_SUFFIX)
|
2016-12-25 23:32:48 +00:00
|
|
|
CFLAGS+= -I$(OBJS_DIR)
|
2014-01-23 12:56:22 +00:00
|
|
|
OBJS:= $(addprefix $(OBJS_DIR)/, $(OBJS))
|
2022-08-12 11:37:02 +02:00
|
|
|
OBJS+= $(OBJS_DIR)/$(TARGET)_modules.o
|
2016-12-25 23:32:48 +00:00
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
all: $(TARGETLIBS) $(TARGET)$(DEBUG_SUFFIX)$(EXE) $(TARGETS)
|
2007-12-27 11:20:38 +00:00
|
|
|
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
ifneq (,$(DEBUG_SUFFIX))
|
2021-02-01 20:38:29 +01:00
|
|
|
$(TARGET)$(DEBUG_SUFFIX)$(EXE): $(OBJS) $(DEP_LIBS)
|
2019-03-27 07:41:54 +00:00
|
|
|
$(echo) LD $@
|
2021-02-01 20:38:29 +01:00
|
|
|
$(cmd) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
|
else
|
|
|
|
|
$(TARGET)_g$(EXE): $(OBJS) $(DEP_LIBS)
|
2014-05-30 21:31:46 +00:00
|
|
|
$(echo) LD $@
|
|
|
|
|
$(cmd) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
$(TARGET)$(EXE): $(TARGET)_g$(EXE) Makefile
|
2014-05-30 21:31:46 +00:00
|
|
|
@rm -f $@
|
2004-05-29 10:17:37 +00:00
|
|
|
cp $< $@
|
2008-04-05 23:04:56 +00:00
|
|
|
-$(STRIP) $@
|
2004-05-29 10:17:37 +00:00
|
|
|
@ls -l $@
|
2021-02-01 20:38:29 +01:00
|
|
|
@echo `$(SIZE) $@` `wc -c $@` $(TARGET) $(OPTIONS) \
|
2007-12-18 18:07:03 +00:00
|
|
|
| cut -d ' ' -f 7-10,13,15-40 >> STATS
|
2021-02-01 20:38:29 +01:00
|
|
|
endif
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2026-04-30 15:51:52 +02:00
|
|
|
ifeq (tqe,$(TARGET))
|
|
|
|
|
# Amalgamation mode produces a larger executable
|
2022-09-15 11:28:34 +02:00
|
|
|
TSRCS:=qe.c cutils.c util.c color.c charset.c buffer.c search.c input.c display.c \
|
2022-08-28 00:40:58 +02:00
|
|
|
modes/hex.c parser.c unix.c tty.c win32.c qeend.c
|
2022-08-12 11:37:02 +02:00
|
|
|
TSRCS+= $(OBJS_DIR)/tqe_modules.c
|
2008-01-10 12:21:05 +00:00
|
|
|
|
2022-08-12 11:37:02 +02:00
|
|
|
tqe1_g$(EXE): tqe.c $(TSRCS) Makefile
|
2021-02-01 20:38:29 +01:00
|
|
|
$(echo) CC $(ECHO_CFLAGS) -o $@ $<
|
|
|
|
|
$(cmd) $(CC) $(DEFINES) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
|
2015-10-14 09:31:20 +00:00
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
tqe1$(EXE): tqe1_g$(EXE) Makefile
|
2015-10-14 09:31:20 +00:00
|
|
|
@rm -f $@
|
|
|
|
|
cp $< $@
|
|
|
|
|
-$(STRIP) $@
|
|
|
|
|
@ls -l $@
|
2021-02-01 20:38:29 +01:00
|
|
|
@echo `$(SIZE) $@` `wc -c $@` tqe1 $(OPTIONS) \
|
2015-10-14 09:31:20 +00:00
|
|
|
| cut -d ' ' -f 7-10,13,15-40 >> STATS
|
2021-02-01 20:38:29 +01:00
|
|
|
endif
|
2015-10-14 09:31:20 +00:00
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
ifdef CONFIG_FFMPEG
|
2007-12-18 18:07:03 +00:00
|
|
|
ffplay$(EXE): qe$(EXE) Makefile
|
2004-05-29 10:17:37 +00:00
|
|
|
ln -sf $< $@
|
2021-02-01 20:38:29 +01:00
|
|
|
endif
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2022-08-12 11:37:02 +02:00
|
|
|
$(OBJS_DIR)/$(TARGET)_modules.o: $(OBJS_DIR)/$(TARGET)_modules.c Makefile
|
|
|
|
|
$(echo) CC $(ECHO_CFLAGS) -c $<
|
|
|
|
|
$(cmd) $(CC) $(DEFINES) $(CFLAGS) -o $@ -c $<
|
2008-04-23 15:32:50 +00:00
|
|
|
|
2022-11-11 15:45:49 +01:00
|
|
|
$(OBJS_DIR)/$(TARGET)_modules.c: $(SRCS) Makefile config.mak
|
2008-04-23 15:32:50 +00:00
|
|
|
@echo creating $@
|
2022-08-11 12:43:35 +02:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2008-04-17 08:42:10 +00:00
|
|
|
@echo '/* This file was generated automatically */' > $@
|
2022-08-12 11:37:02 +02:00
|
|
|
@echo '#include "qe.h"' >> $@
|
|
|
|
|
@echo '#undef qe_module_init' >> $@
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
@echo '#define qe_module_init(fn) extern int qe_module_##fn(QEmacsState *qs)' >> $@
|
2024-05-19 19:15:08 +02:00
|
|
|
-@grep -h ^qe_module_init $(SRCS) >> $@
|
2022-08-12 11:37:02 +02:00
|
|
|
@echo '#undef qe_module_init' >> $@
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
@echo 'void qe_init_all_modules(QEmacsState *qs) {' >> $@
|
|
|
|
|
@echo '#define qe_module_init(fn) qe_module_##fn(qs)' >> $@
|
2024-05-19 19:15:08 +02:00
|
|
|
-@grep -h ^qe_module_init $(SRCS) >> $@
|
2022-08-12 11:37:02 +02:00
|
|
|
@echo '#undef qe_module_init' >> $@
|
|
|
|
|
@echo '}' >> $@
|
2024-05-19 19:15:08 +02:00
|
|
|
@echo '#undef qe_module_exit' >> $@
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
@echo '#define qe_module_exit(fn) extern void qe_module_##fn(QEmacsState *qs)' >> $@
|
2024-05-19 19:15:08 +02:00
|
|
|
-@grep -h ^qe_module_exit $(SRCS) >> $@
|
|
|
|
|
@echo '#undef qe_module_exit' >> $@
|
Remove references to global `qe_state` (#45)
* Remove references to global `qe_state`
Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`
Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`
Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`
Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`
Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`
Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
|
|
|
@echo 'void qe_exit_all_modules(QEmacsState *qs) {' >> $@
|
|
|
|
|
@echo '#define qe_module_exit(fn) qe_module_##fn(qs)' >> $@
|
2024-05-19 19:15:08 +02:00
|
|
|
-@grep -h ^qe_module_exit $(SRCS) >> $@
|
|
|
|
|
@echo '#undef qe_module_exit' >> $@
|
|
|
|
|
@echo '}' >> $@
|
2008-01-18 17:03:35 +00:00
|
|
|
|
2008-06-04 08:49:24 +00:00
|
|
|
$(OBJS_DIR)/cfb.o: cfb.c cfb.h fbfrender.h
|
2022-09-27 22:30:05 +02:00
|
|
|
$(OBJS_DIR)/charset.o: charset.c wcwidth.c
|
2008-06-04 08:49:24 +00:00
|
|
|
$(OBJS_DIR)/charsetjis.o: charsetjis.c charsetjis.def
|
|
|
|
|
$(OBJS_DIR)/fbfrender.o: fbfrender.c fbfrender.h libfbf.h
|
2020-11-11 19:31:07 +01:00
|
|
|
$(OBJS_DIR)/modes/stb.o: modes/stb.c modes/stb_image.h
|
2023-03-05 13:34:19 +01:00
|
|
|
$(OBJS_DIR)/libunicode.o: libunicode.c libunicode.h libunicode-table.h
|
|
|
|
|
$(OBJS_DIR)/libregexp.o: libregexp.c libregexp.h libregexp-opcode.h
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2014-01-23 12:56:22 +00:00
|
|
|
$(OBJS_DIR)/%.o: %.c $(DEPENDS) Makefile
|
2021-02-01 20:38:29 +01:00
|
|
|
$(echo) CC $(ECHO_CFLAGS) -c $<
|
2015-09-16 12:31:19 +00:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2014-05-30 21:31:46 +00:00
|
|
|
$(cmd) $(CC) $(DEFINES) $(CFLAGS) -o $@ -c $<
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2014-01-23 12:56:22 +00:00
|
|
|
$(OBJS_DIR)/haiku.o: haiku.cpp $(DEPENDS) Makefile
|
2021-02-01 20:38:29 +01:00
|
|
|
$(echo) CPP $(ECHO_CFLAGS) -c $<
|
2015-09-16 12:31:19 +00:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2014-05-30 21:31:46 +00:00
|
|
|
$(cmd) g++ $(DEFINES) $(CFLAGS) -Wno-multichar -o $@ -c $<
|
2013-12-17 16:08:55 +00:00
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
# debugging targets
|
2014-01-23 12:56:22 +00:00
|
|
|
%.s: %.c $(DEPENDS) Makefile
|
2014-01-02 10:10:24 +00:00
|
|
|
$(CC) $(DEFINES) $(CFLAGS) -o $@ -S $<
|
|
|
|
|
|
2014-02-03 20:03:07 +00:00
|
|
|
%.s: %.cpp $(DEPENDS) Makefile
|
|
|
|
|
g++ $(DEFINES) $(CFLAGS) -Wno-multichar -o $@ -S $<
|
|
|
|
|
|
2026-04-30 15:51:52 +02:00
|
|
|
endif # ifneq(,$(TARGET))
|
|
|
|
|
|
|
|
|
|
libqhtml: force
|
2026-06-13 18:08:40 +02:00
|
|
|
$(MAKE) -w -C libqhtml all
|
2026-04-30 15:51:52 +02:00
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
#
|
|
|
|
|
# Host utilities
|
|
|
|
|
#
|
2020-11-11 19:31:07 +01:00
|
|
|
$(BINDIR)/%$(EXE): tools/%.c
|
2017-05-10 15:21:46 +00:00
|
|
|
$(echo) CC -o $@ $^
|
2022-08-11 12:43:35 +02:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2021-02-01 20:38:29 +01:00
|
|
|
$(cmd) $(HOST_CC) $(HOST_CFLAGS) -o $@ $^
|
2017-05-10 15:21:46 +00:00
|
|
|
|
2026-06-05 20:18:31 +02:00
|
|
|
%$(EXE): %.c Makefile
|
|
|
|
|
$(echo) CC -o $@ $^
|
|
|
|
|
$(cmd) $(HOST_CC) $(HOST_CFLAGS) -o $@ $<
|
|
|
|
|
|
2004-05-29 10:17:37 +00:00
|
|
|
#
|
|
|
|
|
# build ligature table
|
|
|
|
|
#
|
2020-11-11 19:31:07 +01:00
|
|
|
$(BINDIR)/ligtoqe$(EXE): tools/ligtoqe.c cutils.c
|
2014-05-30 21:31:46 +00:00
|
|
|
$(echo) CC -o $@ $^
|
2022-08-11 12:43:35 +02:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2021-02-01 20:38:29 +01:00
|
|
|
$(cmd) $(HOST_CC) $(HOST_CFLAGS) -o $@ $^
|
2004-05-29 10:17:37 +00:00
|
|
|
|
|
|
|
|
ifdef BUILD_ALL
|
2020-11-11 19:31:07 +01:00
|
|
|
ligatures: $(BINDIR)/ligtoqe$(EXE) unifont.lig
|
|
|
|
|
$(BINDIR)/ligtoqe unifont.lig $@
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Key maps build (Only useful if you want to build your own maps from yudit maps)
|
|
|
|
|
#
|
2008-04-17 08:42:10 +00:00
|
|
|
KMAPS=Arabic.kmap ArmenianEast.kmap ArmenianWest.kmap Chinese-CJ.kmap \
|
|
|
|
|
Cyrillic.kmap Czech.kmap DE-RU.kmap Danish.kmap Dutch.kmap \
|
|
|
|
|
Esperanto.kmap Ethiopic.kmap French.kmap Georgian.kmap German.kmap \
|
|
|
|
|
Greek.kmap GreekMono.kmap Guarani.kmap HebrewP.kmap Hungarian.kmap \
|
|
|
|
|
KOI8_R.kmap Lithuanian.kmap Mnemonic.kmap Polish.kmap Russian.kmap \
|
|
|
|
|
SGML.kmap TeX.kmap Troff.kmap VNtelex.kmap \
|
|
|
|
|
Vietnamese.kmap XKB_iso8859-4.kmap \
|
|
|
|
|
DanishAlternate.kmap GreekBible.kmap Polytonic.kmap Spanish.kmap \
|
|
|
|
|
Thai.kmap VietnameseTelex.kmap Welsh.kmap \
|
2007-12-09 23:31:38 +00:00
|
|
|
Hebrew.kmap HebrewIsraeli.kmap HebrewP.kmap Israeli.kmap Yiddish.kmap \
|
2008-01-03 09:51:29 +00:00
|
|
|
Kana.kmap
|
|
|
|
|
# Hangul.kmap Hangul2.kmap Hangul3.kmap Unicode2.kmap
|
2013-12-21 16:24:38 +00:00
|
|
|
#KMAPS_DIR=$(datadir)/yudit/data
|
2007-12-03 10:18:33 +00:00
|
|
|
KMAPS_DIR=kmap
|
2004-05-29 10:17:37 +00:00
|
|
|
KMAPS:=$(addprefix $(KMAPS_DIR)/, $(KMAPS))
|
|
|
|
|
|
2020-11-11 19:31:07 +01:00
|
|
|
$(BINDIR)/kmaptoqe$(EXE): tools/kmaptoqe.c cutils.c
|
2014-05-30 21:31:46 +00:00
|
|
|
$(echo) CC -o $@ $^
|
2022-08-11 12:43:35 +02:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2021-02-01 20:38:29 +01:00
|
|
|
$(cmd) $(HOST_CC) $(HOST_CFLAGS) -o $@ $^
|
2004-05-29 10:17:37 +00:00
|
|
|
|
|
|
|
|
ifdef BUILD_ALL
|
2020-11-11 19:31:07 +01:00
|
|
|
kmaps: $(BINDIR)/kmaptoqe$(EXE) $(KMAPS) Makefile
|
2021-02-01 20:38:29 +01:00
|
|
|
$(BINDIR)/kmaptoqe $@ $(KMAPS)
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Code pages (only useful to add your own code pages)
|
|
|
|
|
#
|
2007-12-06 15:28:29 +00:00
|
|
|
CP= 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT 8859-6.TXT \
|
|
|
|
|
8859-7.TXT 8859-8.TXT 8859-9.TXT 8859-10.TXT 8859-11.TXT \
|
|
|
|
|
8859-13.TXT 8859-14.TXT 8859-15.TXT 8859-16.TXT \
|
2007-12-06 09:50:03 +00:00
|
|
|
CP437.TXT CP737.TXT CP850.TXT CP852.TXT CP866.TXT \
|
2007-12-06 15:28:29 +00:00
|
|
|
CP1125.TXT CP1250.TXT CP1251.TXT CP1252.TXT CP1256.TXT \
|
|
|
|
|
CP1257.TXT MAC-LATIN2.TXT MAC-ROMAN.TXT \
|
2020-11-07 17:51:16 +01:00
|
|
|
kamen.cp KOI8-R.TXT KOI8-U.TXT TCVN.TXT VISCII.TXT \
|
2014-01-24 01:22:23 +00:00
|
|
|
CP037.TXT CP424.TXT CP500.TXT CP875.TXT CP1026.TXT \
|
|
|
|
|
ATARIST.TXT
|
2007-12-05 10:32:11 +00:00
|
|
|
|
2004-05-29 10:17:37 +00:00
|
|
|
CP:=$(addprefix cp/,$(CP))
|
|
|
|
|
|
2007-12-03 16:15:01 +00:00
|
|
|
JIS= JIS0208.TXT JIS0212.TXT
|
|
|
|
|
JIS:=$(addprefix cp/,$(JIS))
|
|
|
|
|
|
2020-11-11 19:31:07 +01:00
|
|
|
$(BINDIR)/cptoqe$(EXE): tools/cptoqe.c cutils.c
|
2014-05-30 21:31:46 +00:00
|
|
|
$(echo) CC $^
|
2022-08-11 12:43:35 +02:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2021-02-01 20:38:29 +01:00
|
|
|
$(cmd) $(HOST_CC) $(HOST_CFLAGS) -o $@ $^
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2020-11-11 19:31:07 +01:00
|
|
|
$(BINDIR)/jistoqe$(EXE): tools/jistoqe.c cutils.c
|
2014-05-30 21:31:46 +00:00
|
|
|
$(echo) CC $^
|
2022-08-11 12:43:35 +02:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2021-02-01 20:38:29 +01:00
|
|
|
$(cmd) $(HOST_CC) $(HOST_CFLAGS) -o $@ $^
|
2007-12-03 16:15:01 +00:00
|
|
|
|
2004-05-29 10:17:37 +00:00
|
|
|
ifdef BUILD_ALL
|
2020-11-11 19:31:07 +01:00
|
|
|
charsetmore.c: cp/cpdata.txt $(CP) $(BINDIR)/cptoqe$(EXE) Makefile
|
|
|
|
|
$(BINDIR)/cptoqe -i cp/cpdata.txt $(CP) > $@
|
2007-12-03 16:15:01 +00:00
|
|
|
|
2020-11-11 19:31:07 +01:00
|
|
|
charsetjis.def: $(JIS) $(BINDIR)/jistoqe$(EXE) Makefile
|
|
|
|
|
$(BINDIR)/jistoqe $(JIS) > $@
|
2004-05-29 10:17:37 +00:00
|
|
|
endif
|
|
|
|
|
|
2022-09-19 15:16:59 +02:00
|
|
|
#
|
|
|
|
|
# Unicode tables
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
UNICODE_VER=15.0.0
|
|
|
|
|
|
2022-10-17 18:38:21 +02:00
|
|
|
$(BINDIR)/unitable$(EXE): tools/unitable.c cutils.h wcwidth.h wcwidth.c
|
2022-09-27 22:30:05 +02:00
|
|
|
$(echo) CC tools/unitable.c
|
2022-09-19 15:16:59 +02:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2022-09-27 22:30:05 +02:00
|
|
|
$(cmd) $(HOST_CC) $(HOST_CFLAGS) -o $@ tools/unitable.c
|
2022-09-19 15:16:59 +02:00
|
|
|
|
2022-09-27 22:30:05 +02:00
|
|
|
bidir_tables: $(BINDIR)/unicode_gen$(EXE) Makefile
|
|
|
|
|
$(BINDIR)/unicode_gen -V $(UNICODE_VER) -i bidir_tables.h -c bidir_tables.c -b -a
|
|
|
|
|
|
|
|
|
|
wcwidth: $(BINDIR)/unicode_gen$(EXE) Makefile
|
|
|
|
|
$(BINDIR)/unicode_gen -V $(UNICODE_VER) -i wcwidth.h -c wcwidth.c -3 -w -S
|
|
|
|
|
|
|
|
|
|
wcwidth_1: $(BINDIR)/unicode_gen$(EXE) Makefile
|
|
|
|
|
$(BINDIR)/unicode_gen -V $(UNICODE_VER) -i wcwidth_1.h -c wcwidth_1.c -W
|
2022-09-19 15:16:59 +02:00
|
|
|
|
2022-09-27 22:30:05 +02:00
|
|
|
check_width: $(BINDIR)/unitable$(EXE) Makefile
|
|
|
|
|
$(BINDIR)/unitable -V $(UNICODE_VER) -C -a > check_width.txt
|
2022-09-19 15:16:59 +02:00
|
|
|
|
2022-09-27 22:30:05 +02:00
|
|
|
unitable.txt: $(BINDIR)/unitable$(EXE) Makefile
|
|
|
|
|
$(BINDIR)/unitable -V $(UNICODE_VER) > unitable.txt
|
2022-09-19 15:16:59 +02:00
|
|
|
|
2022-09-27 22:30:05 +02:00
|
|
|
unicode_width: $(BINDIR)/unitable$(EXE) Makefile
|
|
|
|
|
$(BINDIR)/unitable -V $(UNICODE_VER) -W -a > unicode_width.h
|
2023-03-05 13:34:19 +01:00
|
|
|
#
|
|
|
|
|
#libunicode_table: $(BINDIR)/unicode_gen$(EXE) Makefile
|
|
|
|
|
# $(BINDIR)/unicode_gen libunicode-table.h
|
|
|
|
|
|
2026-04-30 15:51:52 +02:00
|
|
|
ifneq (,$(TARGET))
|
2004-05-29 10:17:37 +00:00
|
|
|
#
|
|
|
|
|
# fonts (only needed for html2png)
|
|
|
|
|
#
|
2008-01-18 17:03:35 +00:00
|
|
|
FONTS=fixed10.fbf fixed12.fbf fixed13.fbf fixed14.fbf \
|
|
|
|
|
helv8.fbf helv10.fbf helv12.fbf helv14.fbf helv18.fbf helv24.fbf \
|
|
|
|
|
times8.fbf times10.fbf times12.fbf times14.fbf times18.fbf times24.fbf \
|
2007-02-06 17:41:16 +00:00
|
|
|
unifont.fbf
|
2004-05-29 10:17:37 +00:00
|
|
|
FONTS:=$(addprefix fonts/,$(FONTS))
|
|
|
|
|
|
2020-11-11 19:31:07 +01:00
|
|
|
$(BINDIR)/fbftoqe$(EXE): tools/fbftoqe.c cutils.c
|
2014-05-30 21:31:46 +00:00
|
|
|
$(echo) CC -o $@ $^
|
2022-08-11 12:43:35 +02:00
|
|
|
$(cmd) mkdir -p $(dir $@)
|
2021-02-01 20:38:29 +01:00
|
|
|
$(cmd) $(HOST_CC) $(HOST_CFLAGS) -o $@ $^
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2020-11-11 19:31:07 +01:00
|
|
|
fbffonts.c: $(BINDIR)/fbftoqe$(EXE) $(FONTS)
|
|
|
|
|
$(BINDIR)/fbftoqe $(FONTS) > $@
|
2004-05-29 10:17:37 +00:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# html2png tool (XML/HTML/CSS2 renderer test tool)
|
|
|
|
|
#
|
2022-09-19 15:16:59 +02:00
|
|
|
OBJS1=html2png.o cutils.o util.o color.o display.o \
|
2023-03-05 01:12:14 +01:00
|
|
|
arabic.o indic.o unicode_join.o \
|
2008-01-18 17:03:35 +00:00
|
|
|
charset.o charsetmore.o charsetjis.o \
|
|
|
|
|
libfbf.o fbfrender.o cfb.o fbffonts.o
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2008-06-04 08:49:24 +00:00
|
|
|
OBJS1:=$(addprefix $(OBJS_DIR)/, $(OBJS1))
|
|
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
html2png$(EXE): $(OBJS1) $(LIBQHTML)
|
2014-05-30 21:31:46 +00:00
|
|
|
$(echo) LD $@
|
2016-12-27 11:40:40 +00:00
|
|
|
$(cmd) $(CC) $(LDFLAGS) -o $@ $(OBJS1) $(QHTML_LIBS) $(HTMLTOPPM_LIBS)
|
2026-04-30 15:51:52 +02:00
|
|
|
endif
|
2004-05-29 10:17:37 +00:00
|
|
|
|
2026-04-30 15:51:52 +02:00
|
|
|
ifeq (qe,$(TARGET))
|
2004-05-29 10:17:37 +00:00
|
|
|
# documentation
|
2022-09-13 15:29:40 +02:00
|
|
|
qe-manual.md: $(BINDIR)/scandoc$(EXE) qe-manual.c $(SRCS) $(DEPENDS) Makefile
|
2024-07-28 00:04:20 +02:00
|
|
|
$(BINDIR)/scandoc$(EXE) qe-manual.c $(SRCS) $(DEPENDS) > $@
|
2026-04-30 15:51:52 +02:00
|
|
|
endif
|
2022-09-13 15:29:40 +02:00
|
|
|
|
2007-12-20 16:27:21 +00:00
|
|
|
qe-doc.html: qe-doc.texi Makefile
|
2013-11-22 20:04:40 +00:00
|
|
|
LANGUAGE=en_US LC_ALL=en_US.UTF-8 texi2html -monolithic $<
|
2014-05-30 21:31:46 +00:00
|
|
|
@mv $@ $@.tmp
|
|
|
|
|
@sed "s/This document was generated on.*//" < $@.tmp | \
|
|
|
|
|
sed "s/<!-- Created on .* by/<!-- Created by/" > $@
|
|
|
|
|
@rm $@.tmp
|
2008-01-18 17:03:35 +00:00
|
|
|
|
2022-08-10 18:50:19 +02:00
|
|
|
qe-doc.info: qe-doc.texi Makefile
|
|
|
|
|
LANGUAGE=en_US LC_ALL=en_US.UTF-8 makeinfo -o $@ $<
|
|
|
|
|
|
|
|
|
|
qe-doc.pdf: qe-doc.texi Makefile
|
|
|
|
|
LANGUAGE=en_US LC_ALL=en_US.UTF-8 texi2pdf -o $@ $<
|
|
|
|
|
|
2008-01-18 17:03:35 +00:00
|
|
|
#
|
|
|
|
|
# Maintenance targets
|
|
|
|
|
#
|
|
|
|
|
clean:
|
2008-04-13 23:44:39 +00:00
|
|
|
$(MAKE) -C libqhtml clean
|
2022-08-10 18:50:19 +02:00
|
|
|
rm -f qe-doc.aux qe-doc.info qe-doc.log qe-doc.pdf qe-doc.toc
|
2022-09-15 11:28:34 +02:00
|
|
|
rm -rf *.dSYM *.gch .objs* .tobjs* .xobjs* bin
|
2021-02-01 20:38:29 +01:00
|
|
|
rm -f *~ *.o *.a *.exe *_g *_debug TAGS gmon.out core *.exe.stackdump \
|
2023-03-05 01:12:14 +01:00
|
|
|
qe tqe tqe1 xqe kmaptoqe ligtoqe html2png cptoqe jistoqe \
|
2024-12-03 22:52:55 +01:00
|
|
|
fbftoqe fbffonts.c allmodules.txt basemodules.txt '.#'*[0-9] \
|
2026-04-30 15:51:52 +02:00
|
|
|
*qe_asan *qe_msan *qe_ubsan
|
2008-01-18 17:03:35 +00:00
|
|
|
|
|
|
|
|
distclean: clean
|
2016-12-27 11:40:40 +00:00
|
|
|
$(MAKE) -C libqhtml distclean
|
|
|
|
|
rm -rf config.h config.mak
|
2008-01-18 17:03:35 +00:00
|
|
|
|
|
|
|
|
install: $(TARGETS) qe.1
|
2008-04-17 08:42:10 +00:00
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/bin
|
2013-12-21 16:24:38 +00:00
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
|
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/qe
|
2016-06-11 15:55:46 +00:00
|
|
|
ifdef CONFIG_X11
|
|
|
|
|
$(INSTALL) -m 755 -s xqe$(EXE) $(DESTDIR)$(prefix)/bin/qemacs$(EXE)
|
|
|
|
|
else
|
2026-04-30 15:51:52 +02:00
|
|
|
ifdef CONFIG_TINY_ONLY
|
2016-06-11 15:55:46 +00:00
|
|
|
$(INSTALL) -m 755 -s tqe$(EXE) $(DESTDIR)$(prefix)/bin/qemacs$(EXE)
|
|
|
|
|
else
|
2008-04-17 08:42:10 +00:00
|
|
|
$(INSTALL) -m 755 -s qe$(EXE) $(DESTDIR)$(prefix)/bin/qemacs$(EXE)
|
2016-06-11 15:55:46 +00:00
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
ln -sf qemacs$(EXE) $(DESTDIR)$(prefix)/bin/qe$(EXE)
|
2008-01-18 17:03:35 +00:00
|
|
|
ifdef CONFIG_FFMPEG
|
2008-04-17 08:14:35 +00:00
|
|
|
ln -sf qemacs$(EXE) $(DESTDIR)$(prefix)/bin/ffplay$(EXE)
|
2008-01-18 17:03:35 +00:00
|
|
|
endif
|
2013-12-21 16:24:38 +00:00
|
|
|
$(INSTALL) -m 644 kmaps ligatures $(DESTDIR)$(datadir)/qe
|
|
|
|
|
$(INSTALL) -m 644 qe.1 $(DESTDIR)$(mandir)/man1
|
2008-01-18 17:03:35 +00:00
|
|
|
ifdef CONFIG_HTML
|
2008-04-17 08:42:10 +00:00
|
|
|
$(INSTALL) -m 755 -s html2png$(EXE) $(DESTDIR)$(prefix)/bin
|
2008-01-18 17:03:35 +00:00
|
|
|
endif
|
|
|
|
|
|
2008-04-17 08:42:10 +00:00
|
|
|
uninstall:
|
|
|
|
|
rm -f $(DESTDIR)$(prefix)/bin/qemacs$(EXE) \
|
|
|
|
|
$(DESTDIR)$(prefix)/bin/qe$(EXE) \
|
2020-11-11 19:31:07 +01:00
|
|
|
$(DESTDIR)$(prefix)/bin/tqe$(EXE) \
|
|
|
|
|
$(DESTDIR)$(prefix)/bin/xqe$(EXE) \
|
2008-04-17 08:42:10 +00:00
|
|
|
$(DESTDIR)$(prefix)/bin/ffplay$(EXE) \
|
2013-12-21 16:24:38 +00:00
|
|
|
$(DESTDIR)$(mandir)/man1/qe.1 \
|
|
|
|
|
$(DESTDIR)$(datadir)/qe/kmaps \
|
|
|
|
|
$(DESTDIR)$(datadir)/qe/ligatures \
|
2008-04-17 08:42:10 +00:00
|
|
|
$(DESTDIR)$(prefix)/bin/html2png$(EXE)
|
|
|
|
|
|
|
|
|
|
rebuild:
|
|
|
|
|
./configure && $(MAKE) clean all
|
|
|
|
|
|
2008-01-18 17:03:35 +00:00
|
|
|
TAGS: force
|
|
|
|
|
etags *.[ch]
|
|
|
|
|
|
2026-04-30 15:51:52 +02:00
|
|
|
# autotest target
|
|
|
|
|
test:
|
2026-06-13 18:08:40 +02:00
|
|
|
$(MAKE) -w -C tests test
|
2026-04-30 15:51:52 +02:00
|
|
|
|
2017-04-11 06:46:13 +00:00
|
|
|
colortest:
|
|
|
|
|
tests/16colors.pl
|
|
|
|
|
tests/256colors2.pl
|
|
|
|
|
tests/truecolors.sh
|
|
|
|
|
tests/color-spaces.pl
|
|
|
|
|
tests/mandelbrot.sh
|
|
|
|
|
tests/xterm-colour-chart.py
|
|
|
|
|
tests/7936-colors.sh
|
|
|
|
|
|
2021-02-01 20:38:29 +01:00
|
|
|
help:
|
|
|
|
|
@echo "Usage: make [targets] [BUILD_ALL=1] [DEBUG=1] [VERBOSE=1]"
|
|
|
|
|
@echo "targets:"
|
|
|
|
|
@echo " all [default]: build the distribution files for all configured versions"
|
|
|
|
|
@echo " qe: build the terminal version qe"
|
|
|
|
|
@echo " xqe: build the X11 version xqe"
|
|
|
|
|
@echo " tqe: build the tiny version tqe"
|
|
|
|
|
@echo " debug: build an unoptimized debug version of qe named qe_debug"
|
|
|
|
|
@echo " xxx_debug: build an unoptimized debug version of the xxx target"
|
|
|
|
|
@echo "flags:"
|
|
|
|
|
@echo " BUILD_ALL=1 rebuild some distribution files: ligatures kmaps charsets"
|
|
|
|
|
@echo " VERBOSE=1 show complete commands instead of abbreviated ones"
|
|
|
|
|
|
2020-11-10 00:30:45 +01:00
|
|
|
force:
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# tar archive for distribution
|
|
|
|
|
#
|
|
|
|
|
FILE=qemacs-$(shell cat VERSION)
|
|
|
|
|
|
|
|
|
|
archive:
|
|
|
|
|
git archive --prefix=$(FILE)/ HEAD | gzip > ../$(FILE).tar.gz
|
2018-04-11 13:37:07 +00:00
|
|
|
|
2016-12-25 23:32:48 +00:00
|
|
|
SPLINTOPTS := -DSPLINT +posixlib -nestcomment +boolint +charintliteral -mayaliasunique
|
2008-04-23 16:58:48 +00:00
|
|
|
SPLINTOPTS += -nullstate -unqualifiedtrans +charint
|
2008-04-23 15:32:50 +00:00
|
|
|
# extra options that will be removed later
|
2020-11-23 00:00:49 +01:00
|
|
|
SPLINTOPTS += -mustfreeonly -temptrans -kepttrans -DSTBI_NO_SIMD
|
2008-04-23 15:32:50 +00:00
|
|
|
|
2022-08-12 11:37:02 +02:00
|
|
|
splint:
|
2020-11-22 23:53:07 +01:00
|
|
|
splint $(SPLINTOPTS) -I. -Ilibqhtml -I$(OBJS_DIR) $(SRCS)
|