mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(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.
This commit is contained in:
parent
6ff95f1d3b
commit
ab3290cb98
2 changed files with 18 additions and 8 deletions
|
|
@ -1,5 +1,10 @@
|
|||
2005-05-06 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* progmodes/cmacexp.el (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.
|
||||
|
||||
* loadup.el: Load jka-cmpr-hook instead of jka-comp-hook.
|
||||
|
||||
* jka-compr.el (jka-compr-uninstall): Add autoload cookie.
|
||||
|
|
|
|||
|
|
@ -108,18 +108,23 @@
|
|||
:group 'c-macro)
|
||||
|
||||
(defcustom c-macro-preprocessor
|
||||
;; Cannot rely on standard directory on MS-DOS to find CPP. In
|
||||
;; fact, cannot rely on having cpp.exe, either, in latest GCC
|
||||
;; versions.
|
||||
(cond ((eq system-type 'ms-dos) "gcc -E -C -o - -")
|
||||
;; Solaris has it in an unusual place.
|
||||
(cond ;; Solaris has it in an unusual place.
|
||||
((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)"
|
||||
system-configuration)
|
||||
(file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp"))
|
||||
"/opt/SUNWspro/SC3.0.1/bin/acomp -C -E")
|
||||
((file-exists-p "/usr/ccs/lib/cpp") "/usr/ccs/lib/cpp -C")
|
||||
((memq system-type '(darwin berkeley-unix)) "gcc -E -C -")
|
||||
(t "/lib/cpp -C"))
|
||||
((locate-file "/usr/ccs/lib/cpp"
|
||||
'("/") exec-suffixes 'file-executable-p)
|
||||
"/usr/ccs/lib/cpp -C")
|
||||
((locate-file "/lib/cpp"
|
||||
'("/") exec-suffixes 'file-executable-p)
|
||||
"/lib/cpp -C")
|
||||
;; On some systems, we cannot rely on standard directories to
|
||||
;; find CPP. In fact, we cannot rely on having cpp, either,
|
||||
;; in some GCC versions.
|
||||
((locate-file "cpp" exec-path exec-suffixes 'file-executable-p)
|
||||
"cpp -C")
|
||||
(t "gcc -E -C -o - -"))
|
||||
"The preprocessor used by the cmacexp package.
|
||||
|
||||
If you change this, be sure to preserve the `-C' (don't strip comments)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue