diff options
| author | Eli Zaretskii | 2005-05-06 12:32:16 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2005-05-06 12:32:16 +0000 |
| commit | ab3290cb98831e2a9b62bc94c7f46a531e12a867 (patch) | |
| tree | 00d2373504bd8548ae8e66901103cba142d94fef | |
| parent | 6ff95f1d3bf4fa0827d3d3eca3711a73e5f43c99 (diff) | |
| download | emacs-ab3290cb98831e2a9b62bc94c7f46a531e12a867.tar.gz emacs-ab3290cb98831e2a9b62bc94c7f46a531e12a867.zip | |
(c-macro-preprocessor): Use locate-file to look for the preprocessor
with exec-suffixes. If not found in standard places, look in exec-path.
Remove most of the tests that used system-type.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/cmacexp.el | 21 |
2 files changed, 18 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6e1d5845581..372298cf5fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2005-05-06 Eli Zaretskii <eliz@gnu.org> | 1 | 2005-05-06 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * progmodes/cmacexp.el (c-macro-preprocessor): Use locate-file to | ||
| 4 | look for the preprocessor with exec-suffixes. If not found in | ||
| 5 | standard places, look in exec-path. Remove most of the tests that | ||
| 6 | used system-type. | ||
| 7 | |||
| 3 | * loadup.el: Load jka-cmpr-hook instead of jka-comp-hook. | 8 | * loadup.el: Load jka-cmpr-hook instead of jka-comp-hook. |
| 4 | 9 | ||
| 5 | * jka-compr.el (jka-compr-uninstall): Add autoload cookie. | 10 | * jka-compr.el (jka-compr-uninstall): Add autoload cookie. |
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 28d988961a6..65eea658d4e 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el | |||
| @@ -108,18 +108,23 @@ | |||
| 108 | :group 'c-macro) | 108 | :group 'c-macro) |
| 109 | 109 | ||
| 110 | (defcustom c-macro-preprocessor | 110 | (defcustom c-macro-preprocessor |
| 111 | ;; Cannot rely on standard directory on MS-DOS to find CPP. In | 111 | (cond ;; Solaris has it in an unusual place. |
| 112 | ;; fact, cannot rely on having cpp.exe, either, in latest GCC | ||
| 113 | ;; versions. | ||
| 114 | (cond ((eq system-type 'ms-dos) "gcc -E -C -o - -") | ||
| 115 | ;; Solaris has it in an unusual place. | ||
| 116 | ((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)" | 112 | ((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)" |
| 117 | system-configuration) | 113 | system-configuration) |
| 118 | (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp")) | 114 | (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp")) |
| 119 | "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E") | 115 | "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E") |
| 120 | ((file-exists-p "/usr/ccs/lib/cpp") "/usr/ccs/lib/cpp -C") | 116 | ((locate-file "/usr/ccs/lib/cpp" |
| 121 | ((memq system-type '(darwin berkeley-unix)) "gcc -E -C -") | 117 | '("/") exec-suffixes 'file-executable-p) |
| 122 | (t "/lib/cpp -C")) | 118 | "/usr/ccs/lib/cpp -C") |
| 119 | ((locate-file "/lib/cpp" | ||
| 120 | '("/") exec-suffixes 'file-executable-p) | ||
| 121 | "/lib/cpp -C") | ||
| 122 | ;; On some systems, we cannot rely on standard directories to | ||
| 123 | ;; find CPP. In fact, we cannot rely on having cpp, either, | ||
| 124 | ;; in some GCC versions. | ||
| 125 | ((locate-file "cpp" exec-path exec-suffixes 'file-executable-p) | ||
| 126 | "cpp -C") | ||
| 127 | (t "gcc -E -C -o - -")) | ||
| 123 | "The preprocessor used by the cmacexp package. | 128 | "The preprocessor used by the cmacexp package. |
| 124 | 129 | ||
| 125 | If you change this, be sure to preserve the `-C' (don't strip comments) | 130 | If you change this, be sure to preserve the `-C' (don't strip comments) |