annotate admin/quick-install-emacs @ 109165:750db9f3e6d8

Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp * alloc.c (overrun_check_malloc, overrun_check_realloc) (overrun_check_free, xstrdup, allocate_string) (allocate_string_data, compact_small_strings, Fmake_string) (make_unibyte_string, make_multibyte_string) (make_string_from_bytes, make_specified_string, make_float) (Fcons, allocate_terminal, allocate_frame, make_pure_string) (Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp. * atimer.c (start_atimer, set_alarm): Likewise. * buffer.c (clone_per_buffer_values, report_overlay_modification) (mmap_realloc, init_buffer_once): Likewise. * callint.c (Fcall_interactively): Likewise. * callproc.c (Fcall_process, Fcall_process_region, child_setup) (getenv_internal_1): Likewise. * casefiddle.c (casify_object): Likewise. * ccl.c (ccl_driver): Likewise. * character.c (str_as_multibyte, str_to_multibyte): Likewise. * charset.c (load_charset_map_from_file) (load_charset_map_from_file, load_charset_map_from_vector) (Fdefine_charset_internal): Likewise. * cm.c (Wcm_clear): Likewise. * coding.c (decode_eol, decode_coding_object) (Fset_coding_system_priority, make_subsidiaries): Likewise. * data.c (Faset): Likewise. * dired.c (directory_files_internal, file_name_completion_stat): Likewise. * dispnew.c (new_glyph_matrix, adjust_glyph_matrix) (clear_glyph_row, copy_row_except_pointers) (copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool) (save_current_matrix, restore_current_matrix) (build_frame_matrix_from_leaf_window, mirrored_line_dance) (mirror_line_dance, scrolling_window): Likewise. * doc.c (Fsnarf_documentation, Fsubstitute_command_keys): Likewise. * doprnt.c (doprnt): Likewise. * editfns.c (Fuser_full_name, make_buffer_string_both) (Fmessage_box, Fformat, Ftranspose_regions): Likewise. * emacs.c (sort_args): Likewise. * eval.c (Fapply, Ffuncall): Likewise. * fileio.c (Ffile_name_directory, make_temp_name) (Fexpand_file_name, search_embedded_absfilename) (Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents) (auto_save_error): Likewise. * fns.c (Fstring_equal, Fcopy_sequence, concat) (string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte) (internal_equal, Fclear_string, larger_vector, copy_hash_table) (Fmake_hash_table): Likewise. * fringe.c (Fdefine_fringe_bitmap): Likewise. * ftfont.c (ftfont_text_extents): Likewise. * getloadavg.c (getloadavg): Likewise. * image.c (define_image_type, make_image, make_image_cache) (x_create_x_image_and_pixmap, xbm_image_p) (w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color) (xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load) (init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load) (png_image_p, png_read_from_memory, png_load, jpeg_image_p) (tiff_image_p, tiff_read_from_memory, gif_image_p) (gif_read_from_memory, gif_load, svg_image_p, gs_image_p): Likewise. * indent.c (scan_for_column, compute_motion): Likewise. * insdel.c (gap_left, gap_right, make_gap_smaller, copy_text) (insert_1_both, insert_from_gap, replace_range_2): Likewise. * intervals.c (reproduce_tree, reproduce_tree_obj): Likewise. * keyboard.c (echo_char, save_getcjmp, restore_getcjmp) (kbd_buffer_store_event_hold, apply_modifiers_uncached) (store_user_signal_events, menu_bar_items, tool_bar_items) (process_tool_bar_item, append_tool_bar_item) (read_char_minibuf_menu_prompt, read_key_sequence) (Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys): Likewise. * keymap.c (current_minor_maps, Fdescribe_buffer_bindings): Likewise. * lisp.h (STRING_COPYIN): Likewise. * lread.c (Fload, read1, oblookup): Likewise. * msdos.c (Frecent_doskeys): Likewise. * nsfns.m (Fx_create_frame): Likewise. * nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics): Likewise. * nsimage.m (EmacsImage-initFromSkipXBM:width:height:) (EmacsImage-initForXPMWithDepth:width:height:flip:length:): Likewise. * nsmenu.m (ns_update_menubar): Likewise. * nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise. * print.c (print_unwind, printchar, strout, print_string) (print_error_message): Likewise. * process.c (conv_lisp_to_sockaddr, set_socket_option) (Fmake_network_process, Fnetwork_interface_list) (Fnetwork_interface_info, read_process_output, Fprocess_send_eof) (init_process): Likewise. * ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise. * regex.c (init_syntax_once, regex_compile, re_compile_fastmap): Likewise. * scroll.c (do_scrolling, do_direct_scrolling) (scrolling_max_lines_saved): Likewise. * search.c (search_buffer, wordify, Freplace_match): Likewise. * sound.c (wav_init, au_init, Fplay_sound_internal): Likewise. * syntax.c (skip_chars, skip_syntaxes): Likewise. * sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty) (emacs_set_tty): Likewise. * term.c (encode_terminal_code, calculate_costs) (produce_special_glyphs, create_tty_output, init_tty, delete_tty): Likewise. * termcap.c (tgetst1, gobble_line): Likewise. * termhooks.h (EVENT_INIT): Likewise. * tparam.c (tparam1): Likewise. * unexalpha.c (unexec): Likewise. * unexec.c (write_segment): Likewise. * unexmacosx.c (unexec_write_zero): Likewise. * w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame) (Fx_file_dialog, Fsystem_move_file_to_trash): Likewise. * w32font.c (w32font_list_family, w32font_text_extents) (w32font_list_internal, w32font_match_internal) (w32font_open_internal, compute_metrics, Fx_select_font): Likewise. * w32menu.c (set_frame_menubar, add_menu_item) (w32_menu_display_help, w32_free_submenu_strings): Likewise. * w32term.c (XCreateGC, w32_initialize_display_info): Likewise. * w32uniscribe.c (uniscribe_list_family): Likewise. * w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise. * window.c (make_window, replace_window, set_window_buffer) (Fsplit_window): Likewise. * xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string) (add_to_log, message3, x_consider_frame_title) (append_space_for_newline, extend_face_to_end_of_line) (decode_mode_spec_coding, init_glyph_string): Likewise. * xfaces.c (x_create_gc, get_lface_attributes_no_remap) (Finternal_copy_lisp_face, Finternal_merge_in_global_face) (face_attr_equal_p, make_realized_face, make_face_cache) (free_realized_faces, lookup_named_face, smaller_face) (face_with_height, lookup_derived_face) (x_supports_face_attributes_p, Finternal_set_font_selection_order) (Finternal_set_font_selection_order, realize_default_face) (compute_char_face, face_at_buffer_position) (face_for_overlay_string, face_at_string_position, merge_faces): Likewise. * xfns.c (xic_create_fontsetname, Fx_create_frame) (Fx_window_property, x_create_tip_frame) (Fx_backspace_delete_keys_p): Likewise. * xfont.c (xfont_list, xfont_match, xfont_list_family) (xfont_text_extents): Likewise. * xmenu.c (set_frame_menubar, xmenu_show): Likewise. * xrdb.c (magic_file_p, x_get_resource): Likewise. * xselect.c (x_queue_event, x_get_window_property) (receive_incremental_selection): Likewise. * xsmfns.c (x_session_check_input): Likewise. * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT) (handle_one_xevent, x_check_errors, xim_initialize, x_term_init): Likewise. * character.h (BCOPY_SHORT): Removed. * config.in: Regenerate. * dispnew.c (safe_bcopy): Only define as dummy if PROFILING. * emacs.c (main) [PROFILING]: Don't declare dump_opcode_frequencies. * lisp.h (safe_bcopy): Remove declaration. (memset) [!HAVE_MEMSET]: Declare. (memcpy) [!HAVE_MEMCPY]: Likewise. (memmove) [!HAVE_MEMMOVE]: Likewise. (memcmp) [!HAVE_MEMCMP]: Likewise. * s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY) (BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP): Don't define. (HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define. * s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE) (BCOPY_DOWNWARD_SAFE): Don't define. * sysdep.c (memset) [!HAVE_MEMSET]: Define. (memcpy) [!HAVE_MEMCPY]: Define. (memmove) [!HAVE_MEMMOVE]: Define. (memcmp) [!HAVE_MEMCMP]: Define. * config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs. (HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs. * sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1. (HAVE_BZERO): Don't edit. * lwlib.c (lwlib_memset, lwlib_bcopy): Remove. (malloc_widget_value, free_widget_info, allocate_widget_instance) (lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by memset, memcpy, memcmp. * lwlib-utils.c (XtApplyToWidgets): Likewise. * xlwmenu.c (XlwMenuInitialize): Likewise. * lwlib.h (lwlib_bcopy): Remove declaration. * ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by memcpy, memmove, memset. * pop.c (pop_retrieve, socket_connection, pop_getline): Likewise. * CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE) (GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero): Remove. * configure.in: Don't check for bcopy, bcmp, bzero. Don't include <strings.h> and don't define bcopy, bzero, BCMP in config.h.
author Andreas Schwab <schwab@linux-m68k.org>
date Thu, 08 Jul 2010 00:18:28 +0200
parents dedcf813aa69
children 3869cf7d1e82
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
1 #!/bin/sh
75454
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
2 ### quick-install-emacs --- do a halfway-decent job of installing emacs quickly
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
3
108798
dedcf813aa69 Do not preprocess src/Makefile.in.
Glenn Morris <rgm@gnu.org>
parents: 108602
diff changeset
4 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
dedcf813aa69 Do not preprocess src/Makefile.in.
Glenn Morris <rgm@gnu.org>
parents: 108602
diff changeset
5 ## 2010 Free Software Foundation, Inc.
75454
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
6
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
7 ## Author: Miles Bader <miles@gnu.org>
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
8
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
9 ## This file is part of GNU Emacs.
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
10
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
11 ## GNU Emacs is free software: you can redistribute it and/or modify
75454
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
12 ## it under the terms of the GNU General Public License as published by
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
13 ## the Free Software Foundation, either version 3 of the License, or
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
14 ## (at your option) any later version.
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
15
75454
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
16 ## GNU Emacs is distributed in the hope that it will be useful,
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
17 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
18 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
19 ## GNU General Public License for more details.
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
20
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
21 ## You should have received a copy of the GNU General Public License
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
22 ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
23
75454
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
24
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
25 ### Commentary:
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
26
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
27 ## This script is mainly intended for emacs maintainer or pretesters who
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
28 ## install emacs very often. See the --help output for more details.
682571982af6 Add FSF copyright and GPL.
Glenn Morris <rgm@gnu.org>
parents: 75015
diff changeset
29
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
30
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
31 PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
32 PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
33
108798
dedcf813aa69 Do not preprocess src/Makefile.in.
Glenn Morris <rgm@gnu.org>
parents: 108602
diff changeset
34 AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib"
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
35
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
36 # Prune old binaries lying around in the source tree
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
37 PRUNE=no
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
38 # Re-install files even if they already exist
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
39 FORCE=no
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
40 # Command verbose flag
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
41 VERBOSE=''
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
42
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
43 me="`basename $0`"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
44
60340
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
45 # Install commands (if the user specifies the `--verbose' option, it is
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
46 # passed to these commands, so that feature only works if these commands
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
47 # implement it too)
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
48 LINK='cp -lf'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
49 COPY='cp -f'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
50 REMOVE='rm -r'
60340
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
51 MKDIR='mkdir -p'
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
52
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
53 # Used to execute commands once once we create them
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
54 EXEC='sh'
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
55
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
56 NAWK=/usr/bin/nawk
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
57
49088
a22f8991ae27 Unset LANG etc. to avoid non-standard command output from non-C locales.
Miles Bader <miles@gnu.org>
parents: 45539
diff changeset
58 # avoid non-standard command output from non-C locales
a22f8991ae27 Unset LANG etc. to avoid non-standard command output from non-C locales.
Miles Bader <miles@gnu.org>
parents: 45539
diff changeset
59 unset LANG LC_ALL LC_MESSAGES
a22f8991ae27 Unset LANG etc. to avoid non-standard command output from non-C locales.
Miles Bader <miles@gnu.org>
parents: 45539
diff changeset
60
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
61 # Some messages
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
62 USAGE="Usage: $me [OPTION...] BUILD_TREE [PREFIX]"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
63 TRY="Try "\`"$me --help' for more information."
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
64
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
65 # Parse command-line options
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
66 while :; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
67 case "$1" in
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
68 -n|--dry-run)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
69 EXEC=cat; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
70 -p|--prune)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
71 PRUNE=yes; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
72 -P|--no-prune)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
73 PRUNE=no; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
74 --prune-only)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
75 PRUNE=only; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
76 -f|--force)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
77 FORCE=yes; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
78 -v|--verbose)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
79 VERBOSE="-v"; shift;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
80 --help)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
81 cat <<EOF
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
82 $USAGE
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
83 Install emacs quickly
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
84
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
85 -n, --dry-run print installation commands instead of
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
86 executing them
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
87
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
88 -f, --force install even files that haven't changed
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
89 -v, --verbose print messages describing what is done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
90
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
91 -p, --prune prune old generated files
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
92 -P, --no-prune don't prune old generated files (default)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
93 --prune-only prune old generated files, but don't install
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
94
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
95 --help display this help and exit
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
96 --version output version information and exit
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
97
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
98 $me install emacs \`incrementally,' that is, it will
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
99 install only those files that have changed since the last time it was
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
100 invoked, and remove any obsolete files from the installation
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
101 directories. It also uses hard-links into the source and build trees to
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
102 do the install, so it uses much less space than the default Makefile
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
103 install target; however, this also means that $me can
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
104 not install onto a disk partition other than the one on which the source
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
105 and build directories reside.
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
106
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
107 Optionally, $me can also remove old versions of
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
108 automatically generated files that are version-specific (such as the
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
109 versioned emacs executables in the \`src' directory, and the DOC-* files
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
110 in the \`etc' directory). The latter action is called \`pruning,' and
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
111 can be enabled using the \`-p' or \`--prune' options.
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
112 EOF
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
113 exit 0
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
114 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
115 --version)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
116 cat <<EOF
49089
6f9b527df5c6 Update version number.
Miles Bader <miles@gnu.org>
parents: 49088
diff changeset
117 $me 1.6
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
118
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
119 Written by Miles Bader <miles@gnu.org>
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
120 EOF
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
121 exit 0
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
122 ;;
107365
cdbf4c64ae3c quick-install-emacs: Use more portable shell syntax
Miles Bader <miles@gnu.org>
parents: 107364
diff changeset
123 -[!-]?*)
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
124 # split concatenated single-letter options apart
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
125 FIRST="$1"; shift
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
126 set -- `echo $FIRST | sed 's/-\(.\)\(.*\)/-\1 -\2/'` "$@"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
127 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
128 -*)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
129 echo 1>&2 "$me: unrecognized option "\`"$1'"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
130 echo 1>&2 "$TRY"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
131 exit 1
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
132 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
133 *)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
134 break;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
135 esac
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
136 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
137
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
138 LINK_CMD="$LINK $VERBOSE"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
139 REMOVE_CMD="$REMOVE $VERBOSE"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
140
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
141 case $# in
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
142 1) BUILD="$1";;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
143 2) BUILD="$1"; prefix="$2";;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
144 *)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
145 echo 1>&2 "$USAGE"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
146 echo 1>&2 "$TRY"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
147 exit 1
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
148 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
149 esac
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
150
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
151 if test ! -d "$BUILD"; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
152 echo 1>&2 "$me: $BUILD: Build tree not found"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
153 exit 2
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
154 elif test ! -r "$BUILD/config.status"; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
155 echo 1>&2 "$me: $BUILD: Not a proper build tree, config.status not found"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
156 exit 2
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
157 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
158
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
159 CONFIG_STATUS="$BUILD/config.status"
52708
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
160 get_config_var ()
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
161 {
103030
f4ab9c8bed3f admin/quick-install-emacs: Update get_config_var for autoconf 2.62
Miles Bader <miles@gnu.org>
parents: 102491
diff changeset
162 { sed -n "s/^S[[]\"$1\"[]]=\"\([^\"]*\)\"/\1/p" $CONFIG_STATUS | sed q | grep ''; } ||
f4ab9c8bed3f admin/quick-install-emacs: Update get_config_var for autoconf 2.62
Miles Bader <miles@gnu.org>
parents: 102491
diff changeset
163 { sed -n "s/^s\(.\)@$1@\1\(|#_!!_#|\)*\(.*\)\1.*$/\3/p" $CONFIG_STATUS | sed q | grep ''; } ||
f4ab9c8bed3f admin/quick-install-emacs: Update get_config_var for autoconf 2.62
Miles Bader <miles@gnu.org>
parents: 102491
diff changeset
164 {
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
165 echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
166 exit 4
103030
f4ab9c8bed3f admin/quick-install-emacs: Update get_config_var for autoconf 2.62
Miles Bader <miles@gnu.org>
parents: 102491
diff changeset
167 }
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
168 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
169
40064
90451d9e7e0e Exit if we can't find some variable.
Miles Bader <miles@gnu.org>
parents: 39041
diff changeset
170 test x"$SRC" = x && { SRC="`get_config_var srcdir`" || exit 4 ; }
90451d9e7e0e Exit if we can't find some variable.
Miles Bader <miles@gnu.org>
parents: 39041
diff changeset
171 test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; }
90451d9e7e0e Exit if we can't find some variable.
Miles Bader <miles@gnu.org>
parents: 39041
diff changeset
172 test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; }
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
173
108602
ed8614d73caa Update scripts and text to refer to version number string in emacs.c
Ken Raeburn <raeburn@raeburn.org>
parents: 107365
diff changeset
174 VERSION=`grep 'char emacs_version' $SRC/src/emacs.c \
45539
99b2cc9b795c (VERSION): Calculate using the same method that configure.in uses.
Miles Bader <miles@gnu.org>
parents: 44112
diff changeset
175 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
99b2cc9b795c (VERSION): Calculate using the same method that configure.in uses.
Miles Bader <miles@gnu.org>
parents: 44112
diff changeset
176
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
177 DST_SHARE="$prefix/share/emacs/$VERSION"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
178 DST_BIN="$prefix/bin"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
179 DST_LIBEXEC="$prefix/libexec/emacs/$VERSION/$ARCH"
102491
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
180
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
181 # There are various common places for the info dir to be, so try to
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
182 # use whatever's already there, defaulting to (and preferring)
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
183 # .../share/info.
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
184 #
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
185 DST_INFO=''
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
186 for D in "$prefix/share/info" "$prefix/info"; do
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
187 if test -d "$D"; then
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
188 DST_INFO="$D"
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
189 break
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
190 fi
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
191 done
467e43a5edd5 quick-install-emacs: Be more clever about locating info directory
Miles Bader <miles@gnu.org>
parents: 100971
diff changeset
192 DST_INFO=${DST_INFO:-"$prefix/share/info"}
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
193
52708
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
194 maybe_mkdir ()
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
195 {
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
196 if ! test -d "$1"; then
60340
f6384702a1b6 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146
Miles Bader <miles@gnu.org>
parents: 52708
diff changeset
197 $MKDIR $VERBOSE "$1" 2>&1 | sed "s/^mkdir:/$me:/" 1>&2
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
198 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
199 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
200
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
201 maybe_mkdir "$DST_BIN"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
202 maybe_mkdir "$DST_SHARE"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
203 maybe_mkdir "$DST_SHARE/site-lisp"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
204 maybe_mkdir "$DST_LIBEXEC"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
205 maybe_mkdir "$DST_INFO"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
206
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
207 ( # start of command-generating sub-shell
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
208
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
209 PRUNED=""
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
210 if test x"$PRUNE" != xno; then
44112
271a4f9d12fc (PRUNED): Avoid "head -1" and "tail +2", as POSIX 1003.1-2001
Paul Eggert <eggert@twinsun.com>
parents: 40064
diff changeset
211 for D in `ls -1t $BUILD/etc/DOC-* | sed 1d`; do
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
212 echo $REMOVE_CMD $D
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
213 PRUNED="$PRUNED $D"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
214 done
44112
271a4f9d12fc (PRUNED): Avoid "head -1" and "tail +2", as POSIX 1003.1-2001
Paul Eggert <eggert@twinsun.com>
parents: 40064
diff changeset
215 for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
216 echo $REMOVE_CMD $D
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
217 PRUNED="$PRUNED $D"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
218 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
219 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
220
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
221 test x"$PRUNE" = xonly && exit 0
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
222
52708
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
223 maybe_emit_copy ()
8f70aecafdb5 Revision: miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-68
Miles Bader <miles@gnu.org>
parents: 52634
diff changeset
224 {
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
225 if test "$FORCE" = yes || ! cmp -s $1 $2; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
226 echo $LINK_CMD $1 $2
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
227 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
228 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
229
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
230 maybe_emit_copy $BUILD/src/emacs $DST_BIN/emacs
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
231 maybe_emit_copy $BUILD/src/emacs $DST_BIN/emacs-$VERSION
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
232
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
233 for F in $PUBLIC_LIBSRC_BINARIES; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
234 maybe_emit_copy $BUILD/lib-src/$F $DST_BIN/$F
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
235 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
236 for F in $PUBLIC_LIBSRC_SCRIPTS; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
237 maybe_emit_copy $SRC/lib-src/$F $DST_BIN/$F
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
238 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
239
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
240 if test x"$SRC" = x"$BUILD"; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
241 PFXS="$BUILD"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
242 else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
243 PFXS="$SRC $BUILD"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
244 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
245
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
246 for SUBDIR in lisp leim etc lib-src info; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
247 # defaults
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
248 SHARED=no
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
249 FORCED=''
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
250 AVOID_PAT="`echo "($AVOID)" | tr ' ' '|'`"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
251
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
252 # Set subdir-specific values
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
253 case $SUBDIR in
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
254 lisp|leim)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
255 DST="$DST_SHARE/$SUBDIR"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
256 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
257 etc)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
258 DST="$DST_SHARE/$SUBDIR"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
259 # COPYING is in the avoid list, but there should be a copy of it in
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
260 # the install etc dir, so make that here.
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
261 FORCED="$DST/COPYING"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
262 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
263 lib-src)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
264 DST="$DST_LIBEXEC"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
265 AVOID_PAT="`echo "($AVOID ($PUBLIC_LIBSRC_BINARIES $PUBLIC_LIBSRC_SCRIPTS)\$)" | tr ' ' '|'`"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
266 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
267 info)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
268 DST="$DST_INFO"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
269 SHARED=yes
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
270 ;;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
271 esac
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
272
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
273 for PFX in $PFXS; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
274 if [ -d $PFX/$SUBDIR ]; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
275 for DIR in `(cd $PFX/$SUBDIR; find . -type d -print | sed 's@^./@@')`; do
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
276 if [ -d $DST/$DIR ]; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
277 echo Directory $DST/$DIR exists
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
278 else
107147
e89adb122b6b * quick-install-emacs (PRUNED): Fix typo in message.
Juanma Barranquero <lekktu@gmail.com>
parents: 106815
diff changeset
279 echo Directory $DST/$DIR non-existent
39041
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
280 if [ "`echo $DIR | egrep -v "$AVOID_PAT"`" ]; then
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
281 maybe_mkdir $DST/$DIR
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
282 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
283 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
284 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
285 diff -sqr $PFX/$SUBDIR $DST
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
286 fi
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
287 done | $NAWK '
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
288 BEGIN {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
289 src_pat = "^'"$SRC"'/'"$SUBDIR"'/"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
290 build_pat = "^'"$BUILD"'/'"$SUBDIR"'/"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
291 dst_pat = "^'"$DST"'/"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
292 dst_pfx = "'"$DST"'/"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
293 avoid_pat = "'"$AVOID_PAT"'"
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
294 force = ("'"$FORCE"'" == "yes")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
295 shared = ("'"$SHARED"'" == "yes")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
296 init_bool_array(pruned, "'"$PRUNED"'")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
297 init_bool_array(forced, "'"$FORCED"'")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
298 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
299 function init_bool_array(array, string, a,k)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
300 {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
301 split (string, a)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
302 for (k in a)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
303 array[a[k]] = 1
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
304 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
305 function install(src, dst)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
306 {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
307 if (! (src in pruned)) {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
308 cp[src] = dst;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
309 from[dst] = src;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
310 delete rm[dst];
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
311 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
312 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
313 function update(src, dst, copy)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
314 {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
315 if (src in pruned) {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
316 rm[dst] = 1;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
317 delete from[dst]
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
318 } else {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
319 if (copy)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
320 cp[src] = dst;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
321 from[dst] = src;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
322 delete rm[dst];
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
323 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
324 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
325 function uninstall(dst)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
326 {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
327 if (!(dst in from))
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
328 rm[dst] = 1;
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
329 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
330 /^Directory / {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
331 if ($2 ~ avoid_pat) {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
332 if ($NF == "exists")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
333 uninstall($2)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
334 } else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
335 update(0, $2, 0)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
336 next
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
337 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
338 /^Files / {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
339 if ($4 ~ avoid_pat && !($4 in forced))
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
340 uninstall($4)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
341 else if ($NF == "identical")
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
342 update($2, $4, force)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
343 else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
344 update($2, $4, 1)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
345 next
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
346 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
347 /^Only / {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
348 pfx = $3
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
349 sub (/:$/, "/", pfx)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
350
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
351 if (pfx ~ dst_pat) {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
352 if (! shared)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
353 uninstall(pfx $4)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
354 } else {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
355 subdir = pfx
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
356 if (subdir ~ src_pat)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
357 sub (src_pat, "", subdir)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
358 else
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
359 sub (build_pat, "", subdir)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
360
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
361 dst = dst_pfx subdir $4
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
362 if (! (dst ~ avoid_pat))
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
363 install(pfx $4, dst)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
364 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
365 next
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
366 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
367 END {
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
368 for (f in rm)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
369 print "'"$REMOVE_CMD"' " f
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
370 for (f in cp)
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
371 print "'"$LINK_CMD"' " f " " cp[f]
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
372 }
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
373 '
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
374 done
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
375
bd5875aba018 Initial checkin.
Miles Bader <miles@gnu.org>
parents:
diff changeset
376 ) | eval $EXEC
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 52260
diff changeset
377
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 52260
diff changeset
378 # arch-tag: 9322b572-9755-4cf7-a67a-21e6505f1477