Mercurial > hg > xemacs-beta
view src/Makefile.in.in @ 4952:19a72041c5ed
Mule-izing, various fixes related to char * arguments
-------------------- ChangeLog entries follow: --------------------
modules/ChangeLog addition:
2010-01-26 Ben Wing <ben@xemacs.org>
* postgresql/postgresql.c:
* postgresql/postgresql.c (CHECK_LIVE_CONNECTION):
* postgresql/postgresql.c (print_pgresult):
* postgresql/postgresql.c (Fpq_conn_defaults):
* postgresql/postgresql.c (Fpq_connectdb):
* postgresql/postgresql.c (Fpq_connect_start):
* postgresql/postgresql.c (Fpq_result_status):
* postgresql/postgresql.c (Fpq_res_status):
Mule-ize large parts of it.
2010-01-26 Ben Wing <ben@xemacs.org>
* ldap/eldap.c (print_ldap):
* ldap/eldap.c (allocate_ldap):
Use write_ascstring().
src/ChangeLog addition:
2010-01-26 Ben Wing <ben@xemacs.org>
* alloc.c:
* alloc.c (build_ascstring):
* alloc.c (build_msg_cistring):
* alloc.c (staticpro_1):
* alloc.c (staticpro_name):
* alloc.c (staticpro_nodump_1):
* alloc.c (staticpro_nodump_name):
* alloc.c (unstaticpro_nodump_1):
* alloc.c (mcpro_1):
* alloc.c (mcpro_name):
* alloc.c (object_memory_usage_stats):
* alloc.c (common_init_alloc_early):
* alloc.c (init_alloc_once_early):
* buffer.c (print_buffer):
* buffer.c (vars_of_buffer):
* buffer.c (common_init_complex_vars_of_buffer):
* buffer.c (init_initial_directory):
* bytecode.c (invalid_byte_code):
* bytecode.c (print_compiled_function):
* bytecode.c (mark_compiled_function):
* chartab.c (print_table_entry):
* chartab.c (print_char_table):
* config.h.in:
* console-gtk.c:
* console-gtk.c (gtk_device_to_console_connection):
* console-gtk.c (gtk_semi_canonicalize_console_connection):
* console-gtk.c (gtk_canonicalize_console_connection):
* console-gtk.c (gtk_semi_canonicalize_device_connection):
* console-gtk.c (gtk_canonicalize_device_connection):
* console-stream.c (stream_init_frame_1):
* console-stream.c (vars_of_console_stream):
* console-stream.c (init_console_stream):
* console-x.c (x_semi_canonicalize_console_connection):
* console-x.c (x_semi_canonicalize_device_connection):
* console-x.c (x_canonicalize_device_connection):
* console-x.h:
* data.c (eq_with_ebola_notice):
* data.c (Fsubr_interactive):
* data.c (Fnumber_to_string):
* data.c (digit_to_number):
* device-gtk.c (gtk_init_device):
* device-msw.c (print_devmode):
* device-x.c (x_event_name):
* dialog-msw.c (handle_directory_dialog_box):
* dialog-msw.c (handle_file_dialog_box):
* dialog-msw.c (vars_of_dialog_mswindows):
* doc.c (weird_doc):
* doc.c (Fsnarf_documentation):
* doc.c (vars_of_doc):
* dumper.c (pdump):
* dynarr.c:
* dynarr.c (Dynarr_realloc):
* editfns.c (Fuser_real_login_name):
* editfns.c (get_home_directory):
* elhash.c (print_hash_table_data):
* elhash.c (print_hash_table):
* emacs.c (main_1):
* emacs.c (vars_of_emacs):
* emodules.c:
* emodules.c (_emodules_list):
* emodules.c (Fload_module):
* emodules.c (Funload_module):
* emodules.c (Flist_modules):
* emodules.c (find_make_module):
* emodules.c (attempt_module_delete):
* emodules.c (emodules_load):
* emodules.c (emodules_doc_subr):
* emodules.c (emodules_doc_sym):
* emodules.c (syms_of_module):
* emodules.c (vars_of_module):
* emodules.h:
* eval.c (print_subr):
* eval.c (signal_call_debugger):
* eval.c (build_error_data):
* eval.c (signal_error):
* eval.c (maybe_signal_error):
* eval.c (signal_continuable_error):
* eval.c (maybe_signal_continuable_error):
* eval.c (signal_error_2):
* eval.c (maybe_signal_error_2):
* eval.c (signal_continuable_error_2):
* eval.c (maybe_signal_continuable_error_2):
* eval.c (signal_ferror):
* eval.c (maybe_signal_ferror):
* eval.c (signal_continuable_ferror):
* eval.c (maybe_signal_continuable_ferror):
* eval.c (signal_ferror_with_frob):
* eval.c (maybe_signal_ferror_with_frob):
* eval.c (signal_continuable_ferror_with_frob):
* eval.c (maybe_signal_continuable_ferror_with_frob):
* eval.c (syntax_error):
* eval.c (syntax_error_2):
* eval.c (maybe_syntax_error):
* eval.c (sferror):
* eval.c (sferror_2):
* eval.c (maybe_sferror):
* eval.c (invalid_argument):
* eval.c (invalid_argument_2):
* eval.c (maybe_invalid_argument):
* eval.c (invalid_constant):
* eval.c (invalid_constant_2):
* eval.c (maybe_invalid_constant):
* eval.c (invalid_operation):
* eval.c (invalid_operation_2):
* eval.c (maybe_invalid_operation):
* eval.c (invalid_change):
* eval.c (invalid_change_2):
* eval.c (maybe_invalid_change):
* eval.c (invalid_state):
* eval.c (invalid_state_2):
* eval.c (maybe_invalid_state):
* eval.c (wtaerror):
* eval.c (stack_overflow):
* eval.c (out_of_memory):
* eval.c (print_multiple_value):
* eval.c (issue_call_trapping_problems_warning):
* eval.c (backtrace_specials):
* eval.c (backtrace_unevalled_args):
* eval.c (Fbacktrace):
* eval.c (warn_when_safe):
* event-Xt.c (modwarn):
* event-Xt.c (modbarf):
* event-Xt.c (check_modifier):
* event-Xt.c (store_modifier):
* event-Xt.c (emacs_Xt_format_magic_event):
* event-Xt.c (describe_event):
* event-gtk.c (dragndrop_data_received):
* event-gtk.c (store_modifier):
* event-gtk.c (gtk_reset_modifier_mapping):
* event-msw.c (dde_eval_string):
* event-msw.c (Fdde_alloc_advise_item):
* event-msw.c (mswindows_dde_callback):
* event-msw.c (FROB):
* event-msw.c (emacs_mswindows_format_magic_event):
* event-stream.c (external_debugging_print_event):
* event-stream.c (execute_help_form):
* event-stream.c (vars_of_event_stream):
* events.c (print_event_1):
* events.c (print_event):
* events.c (event_equal):
* extents.c (print_extent_1):
* extents.c (print_extent):
* extents.c (vars_of_extents):
* faces.c (print_face):
* faces.c (complex_vars_of_faces):
* file-coding.c:
* file-coding.c (print_coding_system):
* file-coding.c (print_coding_system_in_print_method):
* file-coding.c (default_query_method):
* file-coding.c (find_coding_system):
* file-coding.c (make_coding_system_1):
* file-coding.c (chain_print):
* file-coding.c (undecided_print):
* file-coding.c (gzip_print):
* file-coding.c (vars_of_file_coding):
* file-coding.c (complex_vars_of_file_coding):
* fileio.c:
* fileio.c (report_file_type_error):
* fileio.c (report_error_with_errno):
* fileio.c (report_file_error):
* fileio.c (barf_or_query_if_file_exists):
* fileio.c (vars_of_fileio):
* floatfns.c (matherr):
* fns.c (print_bit_vector):
* fns.c (Fmapconcat):
* fns.c (add_suffix_to_symbol):
* fns.c (add_prefix_to_symbol):
* frame-gtk.c:
* frame-gtk.c (Fgtk_window_id):
* frame-x.c (def):
* frame-x.c (x_cde_transfer_callback):
* frame.c:
* frame.c (Fmake_frame):
* gc.c (show_gc_cursor_and_message):
* gc.c (vars_of_gc):
* glyphs-eimage.c (png_instantiate):
* glyphs-eimage.c (tiff_instantiate):
* glyphs-gtk.c (gtk_print_image_instance):
* glyphs-msw.c (mswindows_print_image_instance):
* glyphs-x.c (x_print_image_instance):
* glyphs-x.c (update_widget_face):
* glyphs.c (make_string_from_file):
* glyphs.c (print_image_instance):
* glyphs.c (signal_image_error):
* glyphs.c (signal_image_error_2):
* glyphs.c (signal_double_image_error):
* glyphs.c (signal_double_image_error_2):
* glyphs.c (xbm_mask_file_munging):
* glyphs.c (pixmap_to_lisp_data):
* glyphs.h:
* gui.c (gui_item_display_flush_left):
* hpplay.c (player_error_internal):
* hpplay.c (myHandler):
* intl-win32.c:
* intl-win32.c (langcode_to_lang):
* intl-win32.c (sublangcode_to_lang):
* intl-win32.c (Fmswindows_get_locale_info):
* intl-win32.c (lcid_to_locale_mule_or_no):
* intl-win32.c (mswindows_multibyte_to_unicode_print):
* intl-win32.c (complex_vars_of_intl_win32):
* keymap.c:
* keymap.c (print_keymap):
* keymap.c (ensure_meta_prefix_char_keymapp):
* keymap.c (Fkey_description):
* keymap.c (Ftext_char_description):
* lisp.h:
* lisp.h (struct):
* lisp.h (DECLARE_INLINE_HEADER):
* lread.c (Fload_internal):
* lread.c (locate_file):
* lread.c (read_escape):
* lread.c (read_raw_string):
* lread.c (read1):
* lread.c (read_list):
* lread.c (read_compiled_function):
* lread.c (init_lread):
* lrecord.h:
* marker.c (print_marker):
* marker.c (marker_equal):
* menubar-msw.c (displayable_menu_item):
* menubar-x.c (command_builder_operate_menu_accelerator):
* menubar.c (vars_of_menubar):
* minibuf.c (reinit_complex_vars_of_minibuf):
* minibuf.c (complex_vars_of_minibuf):
* mule-charset.c (Fmake_charset):
* mule-charset.c (complex_vars_of_mule_charset):
* mule-coding.c (iso2022_print):
* mule-coding.c (fixed_width_query):
* number.c (bignum_print):
* number.c (ratio_print):
* number.c (bigfloat_print):
* number.c (bigfloat_finalize):
* objects-msw.c:
* objects-msw.c (mswindows_color_to_string):
* objects-msw.c (mswindows_color_list):
* objects-tty.c:
* objects-tty.c (tty_font_list):
* objects-tty.c (tty_find_charset_font):
* objects-xlike-inc.c (xft_find_charset_font):
* objects-xlike-inc.c (endif):
* print.c:
* print.c (write_istring):
* print.c (write_ascstring):
* print.c (Fterpri):
* print.c (Fprint):
* print.c (print_error_message):
* print.c (print_vector_internal):
* print.c (print_cons):
* print.c (print_string):
* print.c (printing_unreadable_object):
* print.c (print_internal):
* print.c (print_float):
* print.c (print_symbol):
* process-nt.c (mswindows_report_winsock_error):
* process-nt.c (nt_canonicalize_host_name):
* process-unix.c (unix_canonicalize_host_name):
* process.c (print_process):
* process.c (report_process_error):
* process.c (report_network_error):
* process.c (make_process_internal):
* process.c (Fstart_process_internal):
* process.c (status_message):
* process.c (putenv_internal):
* process.c (vars_of_process):
* process.h:
* profile.c (vars_of_profile):
* rangetab.c (print_range_table):
* realpath.c (vars_of_realpath):
* redisplay.c (vars_of_redisplay):
* search.c (wordify):
* search.c (Freplace_match):
* sheap.c (sheap_adjust_h):
* sound.c (report_sound_error):
* sound.c (Fplay_sound_file):
* specifier.c (print_specifier):
* symbols.c (Fsubr_name):
* symbols.c (do_symval_forwarding):
* symbols.c (set_default_buffer_slot_variable):
* symbols.c (set_default_console_slot_variable):
* symbols.c (store_symval_forwarding):
* symbols.c (default_value):
* symbols.c (defsymbol_massage_name_1):
* symbols.c (defsymbol_massage_name_nodump):
* symbols.c (defsymbol_massage_name):
* symbols.c (defsymbol_massage_multiword_predicate_nodump):
* symbols.c (defsymbol_massage_multiword_predicate):
* symbols.c (defsymbol_nodump):
* symbols.c (defsymbol):
* symbols.c (defkeyword):
* symbols.c (defkeyword_massage_name):
* symbols.c (check_module_subr):
* symbols.c (deferror_1):
* symbols.c (deferror):
* symbols.c (deferror_massage_name):
* symbols.c (deferror_massage_name_and_message):
* symbols.c (defvar_magic):
* symeval.h:
* symeval.h (DEFVAR_SYMVAL_FWD):
* sysdep.c:
* sysdep.c (init_system_name):
* sysdll.c:
* sysdll.c (MAYBE_PREPEND_UNDERSCORE):
* sysdll.c (dll_function):
* sysdll.c (dll_variable):
* sysdll.c (dll_error):
* sysdll.c (dll_open):
* sysdll.c (dll_close):
* sysdll.c (image_for_address):
* sysdll.c (my_find_image):
* sysdll.c (search_linked_libs):
* sysdll.h:
* sysfile.h:
* sysfile.h (DEFAULT_DIRECTORY_FALLBACK):
* syswindows.h:
* tests.c (DFC_CHECK_LENGTH):
* tests.c (DFC_CHECK_CONTENT):
* tests.c (Ftest_hash_tables):
* text.c (vars_of_text):
* text.h:
* tooltalk.c (tt_opnum_string):
* tooltalk.c (tt_message_arg_ival_string):
* tooltalk.c (Ftooltalk_default_procid):
* tooltalk.c (Ftooltalk_default_session):
* tooltalk.c (init_tooltalk):
* tooltalk.c (vars_of_tooltalk):
* ui-gtk.c (Fdll_load):
* ui-gtk.c (type_to_marshaller_type):
* ui-gtk.c (Fgtk_import_function_internal):
* ui-gtk.c (emacs_gtk_object_printer):
* ui-gtk.c (emacs_gtk_boxed_printer):
* unicode.c (unicode_to_ichar):
* unicode.c (unicode_print):
* unicode.c (unicode_query):
* unicode.c (vars_of_unicode):
* unicode.c (complex_vars_of_unicode):
* win32.c:
* win32.c (mswindows_report_process_error):
* window.c (print_window):
* xemacs.def.in.in:
BASIC IDEA: Further fixing up uses of char * and CIbyte *
to reflect their actual semantics; Mule-izing some code;
redoing of the not-yet-working code to handle message translation.
Clean up code to handle message-translation (not yet working).
Create separate versions of build_msg_string() for working with
Ibyte *, CIbyte *, and Ascbyte * arguments. Assert that Ascbyte *
arguments are pure-ASCII. Make build_msg_string() be the same
as build_msg_ascstring(). Create same three versions of GETTEXT()
and DEFER_GETTEXT(). Also create build_defer_string() and
variants for the equivalent of DEFER_GETTEXT() when building a
string. Remove old CGETTEXT(). Clean up code where GETTEXT(),
DEFER_GETTEXT(), build_msg_string(), etc. was being called and
introduce some new calls to build_msg_string(), etc. Remove
GETTEXT() from calls to weird_doc() -- we assume that the
message snarfer knows about weird_doc(). Remove uses of
DEFER_GETTEXT() from error messages in sysdep.c and instead use
special comments /* @@@begin-snarf@@@ */ and /* @@@end-snarf@@@ */
that the message snarfer presumably knows about.
Create build_ascstring() and use it in many instances in place
of build_string(). The purpose of having Ascbyte * variants is
to make the code more self-documenting in terms of what sort of
semantics is expected for char * strings. In fact in the process
of looking for uses of build_string(), much improperly Mule-ized
was discovered.
Mule-ize a lot of code as described in previous paragraph,
e.g. in sysdep.c.
Make the error functions take Ascbyte * strings and fix up a
couple of places where non-pure-ASCII strings were being passed in
(file-coding.c, mule-coding.c, unicode.c). (It's debatable whether
we really need to make the error functions work this way. It
helps catch places where code is written in a way that message
translation won't work, but we may well never implement message
translation.)
Make staticpro() and friends take Ascbyte * strings instead of
raw char * strings. Create a const_Ascbyte_ptr dynarr type
to describe what's held by staticpro_names[] and friends,
create pdump descriptions for const_Ascbyte_ptr dynarrs, and
use them in place of specially-crafted staticpro descriptions.
Mule-ize certain other functions (e.g. x_event_name) by correcting
raw use of char * to Ascbyte *, Rawbyte * or another such type,
and raw use of char[] buffers to another type (usually Ascbyte[]).
Change many uses of write_c_string() to write_msg_string(),
write_ascstring(), etc.
Mule-ize emodules.c, emodules.h, sysdll.h.
Fix some un-Mule-ized code in intl-win32.c.
A comment in event-Xt.c and the limitations of the message
snarfer (make-msgfile or whatever) is presumably incorrect --
it should be smart enough to handle function calls spread over
more than one line. Clean up code in event-Xt.c that was
written awkwardly for this reason.
In config.h.in, instead of NEED_ERROR_CHECK_TYPES_INLINES,
create a more general XEMACS_DEFS_NEEDS_INLINE_DECLS to
indicate when inlined functions need to be declared in
xemacs.defs.in.in, and make use of it in xemacs.defs.in.in.
We need to do this because postgresql.c now calls qxestrdup(),
which is an inline function.
Make nconc2() and other such functions MODULE_API and put
them in xemacs.defs.in.in since postgresql.c now uses them.
Clean up indentation in lread.c and a few other places.
In text.h, document ASSERT_ASCTEXT_ASCII() and
ASSERT_ASCTEXT_ASCII_LEN(), group together the stand-in
encodings and add some more for DLL symbols, function and
variable names, etc.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Tue, 26 Jan 2010 23:22:30 -0600 |
parents | 4ce4d519bdd8 |
children | e813cf16c015 |
line wrap: on
line source
## Makefile for src subdirectory in XEmacs. ## Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc. ## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois ## Copyright (C) 1996, 1997 Sun Microsystems, Inc. ## Copyright (C) 1998, 1999 J. Kean Johnston. ## Copyright (C) 2001, 2002, 2003, 2005, 2010 Ben Wing. ## This file is part of XEmacs. ## XEmacs 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 2, or (at your option) any ## later version. ## XEmacs 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 XEmacs; see the file COPYING. If not, write to ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ## Boston, MA 02111-1307, USA. ## Synched up with: Not synched with FSF. .PHONY: all all: build-the-mofo #define NOT_C_CODE #include "config.h" ## Here are the things that we expect ../configure to edit. #ifdef USE_GNU_MAKE RECURSIVE_MAKE_ARGS= #else @SET_MAKE@ RECURSIVE_MAKE_ARGS=@RECURSIVE_MAKE_ARGS@ #endif PROGNAME=@PROGNAME@ prefix=@prefix@ SRC=@srcdir@ blddir=@blddir@ version=@version@ CC=@XEMACS_CC@ CPP=@CPP@ CFLAGS=@XE_CFLAGS@ CPPFLAGS=@CPPFLAGS@ LDFLAGS=@LDFLAGS@ c_switch_all=@c_switch_all@ ld_switch_all=@ld_switch_all@ ld_libs_all=@ld_libs_all@ ld_dynamic_link_flags=@ld_dynamic_link_flags@ extra_objs=@extra_objs@ LN_S=@LN_S@ ld_switch_shared=@ld_switch_shared@ start_files=@start_files@ start_flags=@start_flags@ LD=@ld@ lib_gcc=@lib_gcc@ ##libmcheck=@libmcheck@ ## With the traditional VPATH setting, it is not possible to ## simultaneously compile in-place and in another directory. The ## mistaken definition is that *all* dependencies are searched for in ## the VPATH directory, rather than just the dependencies that are not ## themselves targets. Thus, if there is an up-to-date .o file in the ## in-place location, it will not get recompiled in the not-in-place ## location. ## The GNU Make "vpath" directive continues this tradition, but at ## least lets you restrict the classes of files that it applies to. ## This allows us to kludge around the problem. #ifdef USE_GNU_MAKE vpath %.c @srcdir@ vpath %.h @srcdir@ ## now list files that should NOT be searched in the srcdir. ## This includes any .c or .h built from something else ## (e.g. a .in file). vpath config.h vpath paths.h vpath Emacs.ad.h vpath sheap-adjust.h vpath dump-id.c #else VPATH=@srcdir@ #endif SHELL=/bin/sh RM = rm -f LISP = $(SRC)/../lisp ETC = $(SRC)/../etc SRCMODULES = $(SRC)/../modules LIB_SRC = ../lib-src BLDSRC = . BLDMODULES = ../modules LWLIB_SRCDIR = $(SRC)/../lwlib ######################################################################### ## Definitions of object files and other dependencies ## ######################################################################### ## NOTE: Some of the object files are specified in this file, and others in ## configure.in. The general rule is that they be specified here whenever ## possible -- in practice, that means that they have clear dependencies on ## configure defines. They should be in configure.in when there is no ## configure define or when there is extremely hairy code to determine ## which files are needed (e.g. native sound support) and it would be ## pointless to duplicate that code. gui_objs= gui.o #ifdef HAVE_MENUBARS gui_objs += menubar.o #endif #ifdef HAVE_SCROLLBARS gui_objs += scrollbar.o #endif #ifdef HAVE_DIALOGS gui_objs += dialog.o #endif #ifdef HAVE_TOOLBARS gui_objs += toolbar.o #endif #ifdef HAVE_X_WINDOWS x_objs=console-x.o device-x.o event-Xt.o frame-x.o \ glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o intl-x.o #ifdef USE_XFT x_objs += font-mgr.o #endif x_gui_objs=$(gui_objs:.o=-x.o) #ifdef HAVE_TOOLBARS x_gui_objs += toolbar-common.o #endif #endif #ifdef HAVE_MS_WINDOWS mswindows_objs=console-msw.o device-msw.o event-msw.o frame-msw.o \ objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o mswindows_gui_objs=$(gui_objs:.o=-msw.o) #endif #ifdef HAVE_TTY tty_objs=console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o \ redisplay-tty.o cm.o #endif #ifdef HAVE_GTK gtk_objs=console-gtk.o device-gtk.o event-gtk.o frame-gtk.o \ objects-gtk.o redisplay-gtk.o glyphs-gtk.o select-gtk.o gccache-gtk.o \ gtk-xemacs.o ui-gtk.o gtk_gui_objs=$(gui_objs:.o=-gtk.o) #ifdef HAVE_TOOLBARS gtk_gui_objs += toolbar-common.o #endif #endif #ifdef HAVE_BALLOON_HELP balloon_help_objs=balloon_help.o balloon-x.o #endif #ifdef CLASH_DETECTION clash_detection_objs=filelock.o #endif #ifdef HAVE_DATABASE database_objs=database.o #endif #ifdef DEBUG_XEMACS debug_objs=debug.o tests.o #endif #ifdef HAVE_UNIXOID_EVENT_LOOP event_unixoid_objs=event-unixoid.o #endif #ifdef HAVE_GPM gpm_objs=gpmevent.o #endif #if defined(HAVE_LDAP) && !defined(HAVE_SHLIB) ldap_objs=$(BLDMODULES)/ldap/eldap.o #endif #ifdef MULE mule_objs=mule-ccl.o mule-charset.o mule-coding.o #endif #if defined(HAVE_CANNA) && !defined(HAVE_SHLIB) mule_canna_objs=$(BLDMODULES)/canna/canna_api.o #endif #ifdef HAVE_WNN mule_wnn_objs=mule-wnnfns.o #endif #ifdef WITH_GMP number_objs=number-gmp.o number.o #endif #ifdef WITH_MP number_objs=number-mp.o number.o #endif #if defined(HAVE_POSTGRESQL) && !defined(HAVE_SHLIB) postgresql_objs=$(BLDMODULES)/postgresql/postgresql.o #endif #ifdef HAVE_WIN32_PROCESSES process_objs=process-nt.o #elif defined (HAVE_UNIX_PROCESSES) process_objs=process-unix.o #endif #ifdef HAVE_SETITIMER profile_objs=profile.o #endif #if defined (HEAP_IN_DATA) && !defined (PDUMP) sheap_objs=sheap.o #endif #ifdef HAVE_SHLIB shlib_objs=sysdll.o # ifdef WIN32_ANY export_lib=xemacs-export.o xemacs-export.o: xemacs.def dlltool -D xemacs-${version}.exe -d $< -l xemacs-import.a -e $@ # endif #endif #ifdef SUNPRO sunpro_objs=sunpro.o #endif #ifdef TOOLTALK tooltalk_objs=tooltalk.o #endif #ifdef WIN32_ANY win32_objs=win32.o intl-win32.o intl-auto-encap-win32.o intl-encap-win32.o \ xemacs_res.o #endif #ifdef NEW_GC new_gc_objs=mc-alloc.o vdb.o # if defined (WIN32_ANY) || defined (VDB_WIN32) vdb_objs=vdb-win32.o # elif defined (VDB_MACH) vdb_objs=vdb-mach.o # elif defined (VDB_POSIX) vdb_objs=vdb-posix.o # else /* VDB_FAKE */ vdb_objs=vdb-fake.o # endif #endif /* NEW_GC */ ## lastfile must follow all files whose initialized data areas should ## be dumped as pure by dump-emacs. ## NOTE: The last line cannot be all macros, because make will barf ## if they all come out null. objs=\ abbrev.o alloc.o alloca.o \ $(balloon_help_objs) blocktype.o buffer.o bytecode.o \ callint.o casefiddle.o casetab.o chartab.o \ $(clash_detection_objs) cmdloop.o cmds.o $(coding_system_objs) console.o \ console-stream.o\ data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\ dynarr.o \ editfns.o elhash.o emacs.o emodules.o eval.o events.o\ event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\ faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \ font-lock.o frame.o\ gc.o general.o glyphs.o glyphs-eimage.o glyphs-shared.o\ glyphs-widget.o $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \ gutter.o\ hash.o imgproc.o indent.o insdel.o intl.o\ keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o\ $(new_gc_objs) $(vdb_objs) \ macros.o marker.o md5.o minibuf.o $(mswindows_objs) $(mswindows_gui_objs)\ $(mule_objs) $(mule_canna_objs) $(mule_wnn_objs) $(number_objs) objects.o\ opaque.o $(postgresql_objs) print.o process.o $(process_objs) $(profile_objs)\ rangetab.o realpath.o redisplay.o redisplay-output.o regex.o\ search.o select.o $(sheap_objs) $(shlib_objs) signal.o sound.o\ specifier.o strftime.o $(sunpro_objs) symbols.o syntax.o sysdep.o\ text.o $(tooltalk_objs) $(tty_objs) undo.o unicode.o $(x_objs) $(x_gui_objs)\ widget.o window.o $(win32_objs) obj_rtl = $(objs:.o=.c.rtl) #ifdef REL_ALLOC rallocdocsrc = ralloc.c rallocobjs = ralloc.o #endif malloclib = $(libmcheck) #ifndef SYSTEM_MALLOC # ifdef ERROR_CHECK_MALLOC # ifdef DOUG_LEA_MALLOC mallocobjs = free-hook.o vm-limit.o # else mallocobjs = gmalloc.o free-hook.o vm-limit.o # endif mallocdocsrc = free-hook.c # else /* GNU malloc, sans error checking */ # ifdef DOUG_LEA_MALLOC mallocobjs = vm-limit.o # else mallocobjs = gmalloc.o vm-limit.o # endif mallocdocsrc = # endif /* ERROR_CHECK_MALLOC */ #else /* SYSTEM_MALLOC */ mallocobjs = mallocdocsrc = # ifdef USE_DEBUG_MALLOC malloclib = -ldmalloc # endif /* USE_DEBUG_MALLOC */ #endif /* SYSTEM_MALLOC */ #ifdef HAVE_X_WINDOWS lwlib_lib = ../lwlib/liblw.a # ifdef EXTERNAL_WIDGET external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o # ifdef LWLIB_USES_MOTIF # ifdef EXTW_LINK motif_other_files = libextcli_Xm.a libextcli_Xm.so.1 # else motif_other_files = libextcli_Xm.a # endif #endif /* LWLIB_USES_MOTIF */ # ifdef EXTW_LINK shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1 # endif other_files=\ $(motif_other_files)\ libextcli_Xt.a libextcli_Xlib.a\ $(shared_other_files) # endif /* EXTERNAL_WIDGET */ # if defined (HAVE_CDE) dnd_objs = @dnd_objs@ # endif /* HAVE_CDE */ X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs) #endif /* HAVE_X_WINDOWS */ ## define otherobjs as list of object files that make-docfile ## should not be told about. otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs) $(export_lib) otherrtls = $(otherobjs:.o=.c.rtl) othersrcs = $(otherobjs:.o=.c) LIBES = $(lwlib_lib) $(malloclib) $(ld_libs_all) $(lib_gcc) #ifdef I18N3 mo_file = $(LIB_SRC)/emacs.mo #endif ######################################################################### ## Implicit rules ## ######################################################################### ## For performance and consistency, no built-in rules. .SUFFIXES: .SUFFIXES: .c .h .o .i .s .dep ## -Demacs is needed to make some files produce the correct version ## for use in Emacs. cppflags = $(CPPFLAGS) -Demacs -I. -I$(SRC) $(c_switch_all) cflags = $(CFLAGS) $(cppflags) #if defined (WIN32_NATIVE) ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags) #else ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags) #endif #ifdef SOLARIS2 %.o : %.c #else .c.o: #endif $(CC) -c $(cflags) $< ## Create preprocessor output (debugging purposes only) .c.i: #ifdef __GNUC__ $(CC) -E $(cppflags) -o $@ $< #else /* works on Solaris; what about other systems? */ $(CC) -P $(cppflags) $< #endif /* compiler */ ## Create assembler output (debugging purposes only) .c.s: $(CC) -S -c $(cflags) $< ## Create RTL files %.c.rtl : %.c $(CC) -dr -c $(cflags) $< ######################################################################### ## Primary rebuilding process ## ######################################################################### #ifdef PDUMP DUMP_TARGET = $(PROGNAME).dmp RAW_EXE = $(PROGNAME) DUMP_ID = dump-id.o #if !defined(WIN32_NATIVE) && defined(DUMP_IN_EXEC) DUMP_TARGET = $(PROGNAME) #ifndef CYGWIN RAW_EXE = temacs #else RAW_EXE = temacs.exe #endif #endif #else DUMP_TARGET = $(PROGNAME) RAW_EXE = temacs #endif DO_TEMACS = $(DUMPENV) ./$(RAW_EXE) DO_XEMACS = ./$(PROGNAME) BATCH = -no-packages -batch BATCH_PACKAGES = -vanilla -batch TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH) XEMACS_BATCH = $(DO_XEMACS) $(BATCH) XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES) temacs_loadup_args = -l $(LISP)/loadup.el dump_temacs_args = $(temacs_loadup_args) dump run_temacs_args = $(temacs_loadup_args) run-temacs dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args) ## Compile, dump, and make sure all .elc files are up-to-date. ## NOTE NOTE NOTE: There appears to be a fundamental but non-obvious ## difference between the way that standard `make', GNU Make, and `nmake' ## handle dependencies, and this means we have to write the dependencies in ## Makefile.in.in and xemacs.mak differently. To illustrate this, consider ## the following first: ##.PHONY: all (`make' only) ## all: test.exe ## ##.PHONY: FRC.test.c (`make' only) ##FRC.test.c: ## ##test.c: FRC.test.c ## if test ! -f foo ; then touch test.c; fi (`make' only) ## if not exist foo touch test.c (`nmake' only) ## ##test.obj: test.c ## touch test.obj ## ##test.exe: test.obj ## touch test.exe ## (GNU Make doesn't need the .PHONY declarations, but evidently some versions ## of `make' do. nmake doesn't need them and doesn't allow them, either.) ## Running `make' rebuilds test.exe only if `foo' doesn't exist. ## Running `nmake -f Makefile' rebuilds it regardless. ## Both conclude that test.c needs to be rebuilt since its dependent is ## non-existent. But `make' recalculates its dependencies after running ## the commands for test.c, and notices that test.c hasn't changed, and ## thus test.obj and test.exe are up-to-date. `nmake' doesn't. ## On the other hand, consider the following: ##.PHONY: all (`make' only) ##all: check-foo test.exe ## ##.PHONY: check-foo (`make' only) ##check-foo: ## if test ! -f foo; then touch test.c; fi (`make' only) ## if not exist foo touch test.c (`nmake' only) ## ##test.c: ## touch test.c ## ##test.obj: test.c ## touch test.obj ## ##test.exe: test.c test.obj ## touch test.exe ## ## Running `nmake -f Makefile' (and `GNU make') rebuilds test.exe only if ## `foo' doesn't exist. ## Running some versions of non-GNU `make' does nothing at all once test.c, ## test.obj and test.exe all exist. ## It appears that `nmake' doesn't check dependencies for test.exe until it ## actually needs to be rebuilt, so this "sideways" dependency script ## works. GNU make evidently recalculates *all* dependencies after each ## command so has no problem, either. But some makes apparently calculate ## all dependencies at startup and then, after executing a command to build ## a dependency, only recheck relationships involving that particular ## dependency. ## In XEmacs-land, the above situation exists wrt the `NEEDTODUMP' ## dependency, recalculated by `update-elc.el'. Thus, Makefile.in.in must ## use the method #1 above, and nmake must use method #2. ## -ben .PHONY: build-the-mofo build-the-mofo: update-elc-2 $(mo_file) $(other_files) $(LISP)/finder-inf.el load-shadows ## (1) Compile all dependencies of the XEmacs executable #ifdef HAVE_X_WINDOWS lwlib_deps = $(lwlib_lib) $(lwlib_lib): cd ../lwlib && $(MAKE) $(RECURSIVE_MAKE_ARGS) #endif /* HAVE_X_WINDOWS */ link_deps = $(start_files) $(objs) $(otherobjs) $(lwlib_deps) $(LIB_SRC)/make-dump-id: cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-dump-id dump-id.c: $(LIB_SRC)/make-dump-id $(link_deps) $(LIB_SRC)/make-dump-id ## (2) Link the XEmacs executable #if !defined(PDUMP) || !defined(DUMP_IN_EXEC) || defined(WIN32_NATIVE) $(RAW_EXE): $(link_deps) $(DUMP_ID) $(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) $(LIBES) #else $(RAW_EXE): $(link_deps) $(DUMP_ID) if test -f dump-size ; then \ $(CC) -c $(cflags) -DMAX_SIZE=`cat dump-size` $(SRC)/dump-data.c ;\ else \ $(CC) -c $(cflags) -DMAX_SIZE=0 $(SRC)/dump-data.c ;\ fi $(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) dump-data.o $(LIBES) #endif ## (3) Update the .elc's needed for dumping .PHONY: FRC.needtodump FRC.needtodump: ## This file is touched by update-elc.el when redumping is necessary. ## We use $(BLDSRC) == `.' here to help keep sync with nt/xemacs.mak, ## where $(BLDSRC) is not `.'. $(BLDSRC)/NEEDTODUMP: $(RAW_EXE) FRC.needtodump $(TEMACS_BATCH) -l $(LISP)/update-elc.el ## (4) Build the DOC file obj_src = $(objs:.o=.c) $(LIB_SRC)/make-docfile: cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-docfile $(LIB_SRC)/DOC: $(LIB_SRC)/make-docfile $(BLDSRC)/NEEDTODUMP $(temacs_deps) #ifdef QUICK_BUILD if test ! -f $@ ; then \ #else if true ; then \ #endif $(TEMACS_BATCH) -l $(LISP)/make-docfile.el -- \ -o $(LIB_SRC)/DOC -d $(SRC) -i $(LIB_SRC)/../site-packages \ $(obj_src) $(mallocdocsrc) $(rallocdocsrc) \ $(extra_doc_files) ; fi ## (5) Dump $(DUMP_TARGET): $(RAW_EXE) $(BLDSRC)/NEEDTODUMP $(LIB_SRC)/DOC #ifdef HEAP_IN_DATA @$(RM) $@ && touch SATISFIED $(dump_temacs) @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \ $(MAKE) $(RECURSIVE_MAKE_ARGS) $@; fi #else @$(RM) $@ $(dump_temacs) #endif #if defined(PDUMP) && defined(DUMP_IN_EXEC) && !defined(WIN32_NATIVE) if test -f dump-size; then \ $(LIB_SRC)/insert-data-in-exec $(RAW_EXE) $(DUMP_TARGET).dmp $(DUMP_TARGET) `$(DO_TEMACS) -si`; \ ret=$$? ; \ if test $${ret} -eq 2; then \ $(RM) dump-size ; \ else \ if test $${ret} -eq 1; then \ exit 1; \ else \ chmod +x $(DUMP_TARGET) ; \ fi ; \ fi ; \ fi if test ! -f dump-size; then \ $(LIB_SRC)/insert-data-in-exec -s $(DUMP_TARGET).dmp > dump-size ; \ $(RM) dump-data.o $(DUMP_TARGET) $(DUMP_TARGET).dmp $(RAW_EXE);\ $(MAKE) $(RECURSIVE_MAKE_ARGS) $@; \ fi #endif ## (6) Update the remaining .elc's, post-dumping .PHONY: update-elc-2 update-elc-2: $(DUMP_TARGET) $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP) ## (7) Other random stuff $(LISP)/finder-inf.el: update-elc-2 @echo "Building finder database ..." $(RM) $(LISP)/finder-inf.el $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \ -eval "(setq lisp-directory \"$(LISP)\")" \ -l finder -f finder-compile-keywords @echo "Building finder database ...(done)" .PHONY: load-shadows load-shadows: update-elc-2 #ifndef QUICK_BUILD @echo "Testing for Lisp shadows ..." @$(XEMACS_BATCH) -f list-load-path-shadows #endif ###################### Misc targets release: all -if [ -w $(LISP) ]; then \ w=`pwd`; cd $(SRC) && $$w/$(RAW_EXE) -nd $(BATCH) -l $(LISP)/inc-vers; \ else true; fi -$(dump_temacs) touch release .PHONY: fastdump fastdump: $(RAW_EXE) @$(RM) $(DUMP_TARGET) && touch SATISFIED -$(dump_temacs) @$(XEMACS_BATCH) -f list-load-path-shadows .PHONY: all-elc all-elc: cd .. && $(MAKE) $(RECURSIVE_MAKE_ARGS) ######################################################################### ## Subsidiary dependency rules ## ######################################################################### #ifdef I18N3 # if defined(SPARC) && !defined(USG) xgettext= /usr/openwin/bin/xgettext xgettext_args= -o emacs -m_X messages msgfmt= /usr/openwin/bin/msgfmt # else xgettext= xgettext xgettext_args= -s -d emacs -M_X messages msgfmt= msgfmt #endif $(LIB_SRC)/emacs.po: $(LIB_SRC)/make-msgfile $(LIB_SRC)/make-po $(objs) $(LIB_SRC)/make-msgfile -o $(LIB_SRC)/messages $(objs) cd $(LIB_SRC) && $(xgettext) $(xgettext_args) $(RM) $(LIB_SRC)/emacs.po cd $(LIB_SRC) && $(LIB_SRC)/make-po -a $(LIB_SRC)/emacs.po DOC $(LIB_SRC)/emacs.mo: $(LIB_SRC)/emacs.po cd $(LIB_SRC)/ && $(msgfmt) -o emacs.mo emacs.po $(LIB_SRC)/make-msgfile: cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-msgfile $(LIB_SRC)/make-po: cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-po #endif /* I18N3 */ TopLevelEmacsShell.o : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c mv EmacsShell-sub.o TopLevelEmacsShell.o TopLevelEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl TransientEmacsShell.o : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c mv EmacsShell-sub.o TransientEmacsShell.o TransientEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl ## The above rules are subject to a race condition if using a parallel make. TransientEmacsShell.o : TopLevelEmacsShell.o TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl ## Position-independent code for shared library creation #if USE_GCC pic_arg = -fpic #elif defined (IRIX) pic_arg = -KPIC # else pic_arg = -K pic #endif #ifdef EXTERNAL_WIDGET external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o ## Add dependencies so things work right with a parallel make ExternalClient-Xm-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c mv ExternalClient.o ExternalClient-Xm-shared.o ExternalClient-Xt-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient.c mv ExternalClient.o ExternalClient-Xt-shared.o ExternalClient-Xlib-shared.o: $(SRC)/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient-Xlib.c mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o ExternalClient-Xm-nonshared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o $(CC) -c $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c mv ExternalClient.o ExternalClient-Xm-nonshared.o ExternalClient-Xt-nonshared.o: $(SRC)/ExternalClient.c $(CC) -c $(cflags) $(SRC)/ExternalClient.c mv ExternalClient.o ExternalClient-Xt-nonshared.o ExternalClient-Xlib-nonshared.o: $(SRC)/ExternalClient-Xlib.c $(CC) -c $(cflags) $(SRC)/ExternalClient-Xlib.c mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o ## We compile the common files twice (once with PIC and once without) ## because on some systems, compiling with PIC but not linking into ## a shared library messes things up. extw-Xt-shared.o: $(SRC)/extw-Xt.c extw-Xt-nonshared.o $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xt.c mv extw-Xt.o extw-Xt-shared.o extw-Xlib-shared.o: $(SRC)/extw-Xlib.c extw-Xlib-nonshared.o $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xlib.c mv extw-Xlib.o extw-Xlib-shared.o extw-Xt-nonshared.o: $(SRC)/extw-Xt.c $(CC) -c $(cflags) $(SRC)/extw-Xt.c mv extw-Xt.o extw-Xt-nonshared.o extw-Xlib-nonshared.o: $(SRC)/extw-Xlib.c $(CC) -c $(cflags) $(SRC)/extw-Xlib.c mv extw-Xlib.o extw-Xlib-nonshared.o libextcli_Xm.a: $(external_client_motif_objs_nonshared) ar r libextcli_Xm.a $(external_client_motif_objs_nonshared) libextcli_Xt.a: $(external_client_xt_objs_nonshared) ar r libextcli_Xt.a $(external_client_xt_objs_nonshared) libextcli_Xlib.a: $(external_client_xlib_objs_nonshared) ar r libextcli_Xlib.a $(external_client_xlib_objs_nonshared) ## Now we try to figure out how to link a shared library. ## If we cannot figure it out, leave EXTW_LINK undefined and a shared ## library will not be created. # ifdef USE_GCC # ifdef USG5 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output extw_link_beg = $(CC) -shared extw_link_mid = -Xlinker -z -Xlinker text -o extw_link_end = ## I cannot figure out how to do shared a.out libraries, so just punt. # elif !defined (LINUX) || defined (__ELF__) # define EXTW_LINK(objs, output) $(CC) -shared objs -o output extw_link_beg = $(CC) -shared extw_link_mid = -o extw_link_end = # endif # elif defined (USG5) # if defined (IRIX) # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations objs -o output extw_link_beg = $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations extw_link_mid = -o extw_link_end = # else /* not IRIX */ # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output extw_link_beg = $(CC) -G extw_link_mid = -z text -o extw_link_end = # endif /* not IRIX */ # else /* not USG5 */ # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output extw_link_beg = $(LD) -dc extw_link_mid = -assert pure-text -o extw_link_end = # endif /* not USG5 */ #ifdef EXTW_LINK libextcli_Xm.so.1: $(external_client_motif_objs_shared) $(extw_link_beg) $(external_client_motif_objs_shared) $(extw_link_mid) libextcli_Xm.so.1 $(extw_link_end) libextcli_Xt.so.1: $(external_client_xt_objs_shared) $(extw_link_beg) $(external_client_xt_objs_shared) $(extw_link_mid) libextcli_Xt.so.1 $(extw_link_end) libextcli_Xlib.so.1: $(external_client_xlib_objs_shared) $(extw_link_beg) $(external_client_xlib_objs_shared) $(extw_link_mid) libextcli_Xlib.so.1 $(extw_link_end) #endif /* EXTW_LINK */ #endif /* EXTERNAL_WIDGET */ config.h: $(SRC)/config.h.in Emacs.ad.h: $(ETC)/Emacs.ad config.h sheap-adjust.h paths.h Emacs.ad.h : @echo "The file $@ needs to be re-generated." @echo "Please run a make in the top level directory." @echo "Consult the file \`INSTALL' for instructions for building XEmacs." @exit 1 ## Some machines have alloca built-in. ## They should define HAVE_ALLOCA, or may just let alloca.s ## be used but generate no code. ## Some have it written in assembler in alloca.s. ## Some use the C version in alloca.c (these define C_ALLOCA in config.h). ## Nowadays we always compile in the C version and use it to avoid stack ## overflow. #ifdef C_ALLOCA #else #ifndef HAVE_ALLOCA allocax.o : $(SRC)/alloca.s config.h ## $(CPP) is cc -E, which may get confused by filenames ## that do not end in .c. So copy file to a safe name. */ ## cp $(SRC)/alloca.s allocatem.c ## Remove any ^L, blank lines, and preprocessor comments, ## since some assemblers barf on them. Use a different basename for the ## output file, since some stupid compilers (Green Hill) use that ## name for the intermediate assembler file. $(CPP) $(cppflags) allocatem.c | \ sed -e 's///' -e 's/^#.*//' | \ sed -n -e '/^..*$$/p' > allocax.s @$(RM) alloca.o $(CC) -c allocax.s $(RM) allocax.s allocatem.c #endif /* HAVE_ALLOCA */ #endif /* ! defined (C_ALLOCA) */ #ifdef HAVE_NATIVE_SOUND sound_cflags=@sound_cflags@ sunplay.o: $(SRC)/sunplay.c $(CC) -c $(sound_cflags) $(cflags) $(SRC)/sunplay.c hpplay.o: $(SRC)/hpplay.c $(CC) -c -Demacs $(sound_cflags) $(cflags) $(SRC)/hpplay.c #endif /* HAVE_NATIVE_SOUND */ #if defined(HAVE_GLADE_GLADE_H) || defined(HAVE_GLADE_H) glade_files=glade.c #endif #ifdef HAVE_GTK extra_doc_files=emacs-widget-accessors.c ui-byhand.c $(glade_files) #endif xemacs_res.o: $(SRC)/../nt/xemacs.rc windres --include-dir $(SRC)/../nt -i $(SRC)/../nt/xemacs.rc -o $@ ######################################################################### ## Other random crap ## ######################################################################### dortl : $(obj_rtl) $(otherrtls) echo "(defvar source-files '(" > $(LISP)/source-files.el (for a in $(obj_src) $(othersrcs);do \ echo -n "\""$$a"\"" >> $(LISP)/source-files.el ;\ done) echo "))" >> $(LISP)/source-files.el ###################### Lint LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES) LINTFILES= $(objs:.o=.ln) LINTINCLUDES = $(cppflags) ## LINTFLAGS= -fd -m -p -s -u -v -x LINTFLAGS= -fd -m -s -u -v -x .PHONY: lint lint: $(LINTFILES) $(LINT.c) $(LINTFILES) ###################### Automated tests testdir = $(SRC)/../tests/automated batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir) ## `config-changed' is useful if you are building both Unicode-internal ## and old-Mule workspaces using --srcdir and don't run configure before ## switching from one to the other. If you rerun configure, update-elc.el ## notices this and automatically removes the two files below, but not ## if you just switch directories and `make'. In that case, do ## `make config-changed' to avoid an error. .PHONY: remove-config-dependent-elcs config-changed remove-config-dependent-elcs: rm $(LISP)/mule/chinese.elc $(LISP)/mule/general-late.elc config-changed: remove-config-dependent-elcs all .PHONY: check check-temacs check-features check: $(DO_XEMACS) $(batch_test_emacs) check-temacs: $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs) check-features: all $(XEMACS_BATCH) -l check-features.el ###################### Debugging targets ## None of the debugging products work with a dumped xemacs binary, ## because it does unexpected things like free memory that has been ## malloc'ed in a *different* process!! So we need to run these on ## temacs. ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx rtc_patch.o: rtc_patch_area -o $@ rtcmacs: $(temacs_deps) rtc_patch.o $(RM) $(RAW_EXE); $(MAKE) $(RECURSIVE_MAKE_ARGS) $(RAW_EXE) RTC_patch_objs=rtc_patch.o mv $(RAW_EXE) rtcmacs .PHONY: run-rtcmacs run-rtcmacs: rtcmacs dbx -q -C -c \ 'dbxenv rtc_error_log_file_name /dev/fd/1; \ dbxenv suppress_startup_message 5.0; \ ignore POLL; \ check -access; \ suppress rui; \ runargs -nd $(BATCH) $(run_temacs_args) -vanilla; \ run' rtcmacs debug-temacs: $(RAW_EXE) -gdb $(RAW_EXE) ## Purify, Quantify, PureCoverage are software quality products from ## Rational, formerly Pure Atria, formerly Pure Software. ## ## Purify PURIFY_PROG = purify PURIFY_LIBS = PURIFY_FLAGS =\ #ifdef PDUMP -search-mmaps=yes\ #endif -chain-length=32 -ignore-signals=SIGPOLL\ -cache-dir=$(blddir)/purecache -always-use-cache-dir=yes puremacs: $(temacs_deps) $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS) cp $@ $(RAW_EXE) ## Quantify #ifdef QUANTIFY QUANTIFY_PROG = quantify QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir` QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes cppflags += -I$(QUANTIFY_HOME) temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a quantmacs: $(temacs_deps) $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args) cp $@ $(RAW_EXE) #endif /* QUANTIFY */ PURECOV_PROG=purecov covmacs: $(temacs_deps) $(PURECOV_PROG) $(LD) $(temacs_link_args) ###################### Clean .PHONY: mostlyclean clean distclean realclean versionclean extraclean .PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig mostlyclean: -$(RM) *.o *.i *.rtl *.ln core \ temacs puremacs quantmacs covmacs rtcmacs temacs.exe \ sheap-adjust.h dump-id.c dump-size $(BLDSRC)/NEEDTODUMP SATISFIED \ $(LIB_SRC)/*.po $(LIB_SRC)/*.mo versionclean: -$(RM) $(RAW_EXE) $(DUMP_TARGET) $(DUMP_TARGET).dmp $(LIB_SRC)/DOC ## Remove the generated load files here; they cause lots of problems ## when they don't work right. clean: mostlyclean versionclean -$(RM) libextcli* $(LISP)/auto-autoloads.el* $(LISP)/custom-load.el* \ $(LISP)/mule/auto-autoloads.el* $(LISP)/mule/custom-load.el* \ $(SRCMODULES)/auto-autoloads.el* $(SRCMODULES)/custom-load.el* ## This is used in making a distribution. ## Do not use it on development directories! distclean-noconfig: clean -$(RM) config.h paths.h Emacs.ad.h $(LISP)/finder-inf.el* \ TAGS xemacs.def xemacs.def.in ## This is used in making a distribution. ## Do not use it on development directories! distclean: distclean-noconfig -$(RM) GNUmakefile Makefile Makefile.in realclean-noconfig: distclean-noconfig realclean: distclean extraclean-noconfig: realclean-noconfig -$(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* *.s gdb.txt extraclean: realclean -$(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* *.s gdb.txt ###################### Lock, unlock .PHONY : lock unlock SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \ config.h.in README COPYING ChangeLog unlock: chmod u+w $(SOURCES) relock: chmod -w $(SOURCES) ###################### Installation ## Header files for ellcc #ifdef HAVE_SHLIB MAKEPATH=../lib-src/make-path install: $(PROGNAME) $(MAKEPATH) $(archlibdir)/include $(archlibdir)/include/m $(archlibdir)/include/s -@echo "Copying include files for ellcc..." -@hdir=`pwd`; \ cd $(SRC); hdrdir2=`pwd`; cd $$hdir; \ test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \ (for thisdir in $$hdir; do \ cd $$thisdir && \ (hdrtars=; \ for hdrfile in *.h; do \ hdrtars="$$hdrtars $$hdrfile"; \ done; \ test -d s && hdrtars="$$hdrtars s/*"; \ test -d m && hdrtars="$$hdrtars m/*"; \ test -n "$$hdrtars" && (tar cf - $$hdrtars) | \ (cd $(archlibdir)/include && umask 022 && tar xf -); \ chmod 755 $(archlibdir)/include; \ test -d $(archlibdir)/include/s && \ chmod 755 $(archlibdir)/include/s; \ test -d $(archlibdir)/include/m && \ chmod 755 $(archlibdir)/include/s;) \ done) #endif ###################### Dependencies ## Dependency processing using home-grown script, not makedepend .PHONY: depend FRC.depend: depend: FRC.depend cd $(SRC) && $(RM) depend.tmp && \ perl ./make-src-depend > depend.tmp && \ if cmp -s depend depend.tmp; \ then $(RM) depend.tmp; \ else $(RM) depend && mv depend.tmp depend; \ fi ###################### Unicode encapsulation .PHONY: unicode-encapsulate FRC.unicode-encapsulate: unicode-encapsulate: FRC.unicode-encapsulate cd $(SRC) && \ perl ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c