diff options
| author | Dan Nicolaescu | 2010-07-07 20:31:04 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-07 20:31:04 -0700 |
| commit | 49d9e6b07bc34acf755ded0fc255e974a37f9189 (patch) | |
| tree | 5646f202d13f595532e744b675e4a2f0201f810d /src | |
| parent | 313d9eb21863418cb91328c3d5ef0c2d356fc483 (diff) | |
| download | emacs-49d9e6b07bc34acf755ded0fc255e974a37f9189.tar.gz emacs-49d9e6b07bc34acf755ded0fc255e974a37f9189.zip | |
Remove src/prefix-args.c.
* configure.in (PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS): Remove.
* msdos/sed1v2.inp: Remove reference to prefix-args.
* prefix-args.c: Remove file.
* src/autodeps.mk (ALLOBJS): Remove reference to prefix-args.
* src/Makefile.in (temacs${EXEEXT}): Remove references to
PRE_EDIT_LDFLAGS and POST_EDIT_LDFLAGS.
(mostlyclean): Remove reference to prefix-args.
(prefix-args): Remove.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/Makefile.in | 16 | ||||
| -rw-r--r-- | src/autodeps.mk | 2 | ||||
| -rw-r--r-- | src/prefix-args.c | 82 |
4 files changed, 12 insertions, 96 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b601fecf809..415211558a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,13 @@ | |||
| 1 | 2010-07-08 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2010-07-08 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | Remove prefix-args.c | ||
| 4 | * prefix-args.c: Remove file. | ||
| 5 | * autodeps.mk (ALLOBJS): Remove reference to prefix-args. | ||
| 6 | * Makefile.in (temacs${EXEEXT}): Remove references to | ||
| 7 | PRE_EDIT_LDFLAGS and POST_EDIT_LDFLAGS. | ||
| 8 | (mostlyclean): Remove reference to prefix-args. | ||
| 9 | (prefix-args): Remove. | ||
| 10 | |||
| 3 | Simplify cstart_of_data, start_of_code and related code. | 11 | Simplify cstart_of_data, start_of_code and related code. |
| 4 | * mem-limits.h: Remove !emacs and _LIBC conditional code. | 12 | * mem-limits.h: Remove !emacs and _LIBC conditional code. |
| 5 | (start_of_data): Merge into start_of_data function. | 13 | (start_of_data): Merge into start_of_data function. |
diff --git a/src/Makefile.in b/src/Makefile.in index 0f8294fd030..933ec98a8d5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -628,20 +628,10 @@ buildobj.h: Makefile | |||
| 628 | echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h | 628 | echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h |
| 629 | 629 | ||
| 630 | 630 | ||
| 631 | ## We cannot define variables for PRE_EDIT and POST_EDIT. | 631 | temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} |
| 632 | ## If !ORDINARY_LINK && !LINKER && GCC, they add a | 632 | $(LD) ${TEMACS_LDFLAGS} ${TEMACS_LDFLAGS2} \ |
| 633 | ## `./prefix-args -Xlinker ... ` wrapper, otherwise they are empty. | ||
| 634 | ## One alternative to this approach would be to always call prefix-args, | ||
| 635 | ## and have it DTRT in all cases, by testing the above defines. | ||
| 636 | temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} | ||
| 637 | $(LD) @PRE_EDIT_LDFLAGS@ ${TEMACS_LDFLAGS} @POST_EDIT_LDFLAGS@ \ | ||
| 638 | ${TEMACS_LDFLAGS2} \ | ||
| 639 | -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES} | 633 | -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES} |
| 640 | 634 | ||
| 641 | prefix-args${EXEEXT}: prefix-args.o $(config_h) | ||
| 642 | $(CC) $(LDFLAGS) prefix-args.o -o prefix-args | ||
| 643 | |||
| 644 | |||
| 645 | ## The following oldxmenu-related rules are only (possibly) used if | 635 | ## The following oldxmenu-related rules are only (possibly) used if |
| 646 | ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them | 636 | ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them |
| 647 | ## (provided we take a little care that OLDXMENU is never empty). | 637 | ## (provided we take a little care that OLDXMENU is never empty). |
| @@ -688,7 +678,7 @@ doc.o: buildobj.h | |||
| 688 | 678 | ||
| 689 | 679 | ||
| 690 | mostlyclean: | 680 | mostlyclean: |
| 691 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a | 681 | rm -f temacs${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a |
| 692 | rm -f ../etc/DOC | 682 | rm -f ../etc/DOC |
| 693 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} | 683 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} |
| 694 | rm -f buildobj.h | 684 | rm -f buildobj.h |
diff --git a/src/autodeps.mk b/src/autodeps.mk index c3cc91e22a7..fb0e21366c7 100644 --- a/src/autodeps.mk +++ b/src/autodeps.mk | |||
| @@ -2,5 +2,5 @@ | |||
| 2 | 2 | ||
| 3 | ## This is inserted in src/Makefile if AUTO_DEPEND=yes. | 3 | ## This is inserted in src/Makefile if AUTO_DEPEND=yes. |
| 4 | 4 | ||
| 5 | ALLOBJS=$(START_FILES) ${obj} ${otherobj} prefix-args.o | 5 | ALLOBJS=$(START_FILES) ${obj} ${otherobj} |
| 6 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) | 6 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) |
diff --git a/src/prefix-args.c b/src/prefix-args.c deleted file mode 100644 index 84e47dabb9a..00000000000 --- a/src/prefix-args.c +++ /dev/null | |||
| @@ -1,82 +0,0 @@ | |||
| 1 | /* prefix-args.c - echo each argument, prefixed by a string. | ||
| 2 | Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | ||
| 3 | 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | /* Jim Blandy <jimb@occs.cs.oberlin.edu> - September 1992 | ||
| 21 | |||
| 22 | When using GCC 2 as the linker in the build process, options | ||
| 23 | intended for the linker need to be prefixed with the "-Xlinker" | ||
| 24 | option. If an option takes an argument, we need to use -Xlinker | ||
| 25 | twice - once for the option and once for its argument. For | ||
| 26 | example, to run the linker with the options "-Bstatic" "-e" | ||
| 27 | "_start", you'd need to pass the following options to GCC: | ||
| 28 | |||
| 29 | -Xlinker -Bstatic -Xlinker -e -Xlinker _start. | ||
| 30 | |||
| 31 | The Emacs makefile used to use a Bourne Shell `for' loop to prefix | ||
| 32 | each linker option with "-Xlinker", but 1) the for loop was hairier | ||
| 33 | than one might hope because it had to work when there were no | ||
| 34 | arguments to pass to the linker - the shell barfs on a loop like | ||
| 35 | this: | ||
| 36 | |||
| 37 | for arg in ; do echo -Xlinker "$arg"; done | ||
| 38 | |||
| 39 | and 2) the whole compilation command containing this loop seems to | ||
| 40 | exit with a non-zero status and halt the build under Ultrix. | ||
| 41 | |||
| 42 | If I can't write a completely portable program to do this in C, | ||
| 43 | I'm quitting and taking up gardening. */ | ||
| 44 | |||
| 45 | #ifdef HAVE_CONFIG_H | ||
| 46 | # include <config.h> | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #if STDC_HEADERS | ||
| 50 | # include <stdlib.h> /* for proper declaration of `exit' */ | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #include <stdio.h> | ||
| 54 | #include <stdlib.h> | ||
| 55 | |||
| 56 | int | ||
| 57 | main (int argc, char **argv) | ||
| 58 | { | ||
| 59 | char *progname; | ||
| 60 | char *prefix; | ||
| 61 | |||
| 62 | progname = argv[0]; | ||
| 63 | argc--, argv++; | ||
| 64 | |||
| 65 | if (argc < 1) | ||
| 66 | { | ||
| 67 | fprintf (stderr, "Usage: %s PREFIX ARGS...\n\ | ||
| 68 | Echo each ARG preceded by PREFIX and a space.\n", progname); | ||
| 69 | exit (2); | ||
| 70 | } | ||
| 71 | |||
| 72 | prefix = argv[0]; | ||
| 73 | argc--, argv++; | ||
| 74 | |||
| 75 | for (; argc > 0; argc--, argv++) | ||
| 76 | printf ("%s %s%c", prefix, argv[0], (argc > 1) ? ' ' : '\n'); | ||
| 77 | |||
| 78 | exit (0); | ||
| 79 | } | ||
| 80 | |||
| 81 | /* arch-tag: 08136d70-e5c0-49c7-bcd8-b4850233977a | ||
| 82 | (do not change this comment) */ | ||