diff options
| author | Jim Blandy | 1993-05-15 23:06:16 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-05-15 23:06:16 +0000 |
| commit | d2d92f7a66e5b24258b4ad77ee31110385a53297 (patch) | |
| tree | 10688681b61fc83c29401585500e9b3e82cb8b50 /lib-src | |
| parent | ad2e78fb7c50b3e94bc6cf0166daae562e65a535 (diff) | |
| download | emacs-d2d92f7a66e5b24258b4ad77ee31110385a53297.tar.gz emacs-d2d92f7a66e5b24258b4ad77ee31110385a53297.zip | |
Install patches from David J. Mackenzie to make the srcdir option
work.
* Makefile.in (srcdir, VPATH): Get this value from the top-level
Makefile.
(INSTALLABLES): Split this into two lists - INSTALLABLES and
INSTALLABLE_SCRIPTS.
(INSTALLABLE_SCRIPTS): New list.
(EXECUTABLES): Include INSTALLABLE_SCRIPTS.
(${archlibdir}): The scripts to be installed live in the source
tree, not in the object tree.
(test-distrib): Note that the data file lives in the source tree,
not the object tree.
(GETOPTDEPS): Note that getopt.h lives in the source tree.
(all other targets): Change references to source files to use
${srcdir}, except for config.h, which lives in the object dir.
(timer.o): Note that this depends on ../src/config.h.
* make-docfile.c (main): Add a -d option, to tell it where to find
the source files.
* test-distrib.c (main): Take the name of the distribution file to
test from the command line.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/make-docfile.c | 5 | ||||
| -rw-r--r-- | lib-src/test-distrib.c | 19 |
2 files changed, 19 insertions, 5 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index c71fafb887b..62ccfe9460b 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -56,6 +56,11 @@ main (argc, argv) | |||
| 56 | outfile = fopen (argv[i + 1], "a"); | 56 | outfile = fopen (argv[i + 1], "a"); |
| 57 | i += 2; | 57 | i += 2; |
| 58 | } | 58 | } |
| 59 | if (argc > i + 1 && !strcmp (argv[i], "-d")) | ||
| 60 | { | ||
| 61 | chdir (argv[i + 1]); | ||
| 62 | i += 2; | ||
| 63 | } | ||
| 59 | 64 | ||
| 60 | for (; i < argc; i++) | 65 | for (; i < argc; i++) |
| 61 | err_count += scan_file (argv[i]); /* err_count seems to be {mis,un}used */ | 66 | err_count += scan_file (argv[i]); /* err_count seems to be {mis,un}used */ |
diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c index e1f5be11861..897922a3bf5 100644 --- a/lib-src/test-distrib.c +++ b/lib-src/test-distrib.c | |||
| @@ -32,13 +32,21 @@ cool_read (fd, buf, size) | |||
| 32 | } | 32 | } |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | main () | 35 | main (argc, argv) |
| 36 | int argc; | ||
| 37 | char **argv; | ||
| 36 | { | 38 | { |
| 37 | int fd = open ("testfile", 0); | 39 | int fd; |
| 38 | 40 | ||
| 41 | if (argc != 2) | ||
| 42 | { | ||
| 43 | fprintf (stderr, "Usage: %s testfile\n", argv[0]); | ||
| 44 | exit (2); | ||
| 45 | } | ||
| 46 | fd = open (argv[1], 0); | ||
| 39 | if (fd < 0) | 47 | if (fd < 0) |
| 40 | { | 48 | { |
| 41 | perror ("opening `testfile'"); | 49 | perror (argv[1]); |
| 42 | exit (2); | 50 | exit (2); |
| 43 | } | 51 | } |
| 44 | if (cool_read (fd, buf, sizeof string1) != sizeof string1 || | 52 | if (cool_read (fd, buf, sizeof string1) != sizeof string1 || |
| @@ -46,9 +54,10 @@ main () | |||
| 46 | cool_read (fd, buf, sizeof string2) != sizeof string2 - 1 || | 54 | cool_read (fd, buf, sizeof string2) != sizeof string2 - 1 || |
| 47 | strncmp (buf, string2, sizeof string2 - 1)) | 55 | strncmp (buf, string2, sizeof string2 - 1)) |
| 48 | { | 56 | { |
| 49 | fprintf (stderr, "Data in file `testfile' has been damaged.\n\ | 57 | fprintf (stderr, "Data in file `%s' has been damaged.\n\ |
| 50 | Most likely this means that many nonprinting characters\n\ | 58 | Most likely this means that many nonprinting characters\n\ |
| 51 | have been corrupted in the files of Emacs, and it will not work.\n"); | 59 | have been corrupted in the files of Emacs, and it will not work.\n", |
| 60 | argv[1]); | ||
| 52 | exit (2); | 61 | exit (2); |
| 53 | } | 62 | } |
| 54 | close (fd); | 63 | close (fd); |