make -k filename.make
where filename.c is the main program file.
Anyone have a suggestion?
Thanks,
Dan
--
Daniel Piche
University of Waterloo
E-mail/courrier electronique: dgp...@mercator.uwaterloo.ca
Phone/tel: (519) 885-1211 Extension: 6668
> I am trying to modify the compile command
(setq compile-command "make")
--
Nat Linux
Dan> I am trying to modify the compile command so that
Dan> it does the following:
Dan> make -k filename.make
Dan> where filename.c is the main program file.
Put the following lines at the end of each .c and .h file:
/* Local Variables: */
/* compile-command: "make -k foo" */
/* End: */
Of course, you should put the right compile command in there.
kai
--
Life is hard and then you die.
> I am trying to modify the compile command so that it does the following:
> make -k filename.make
> where filename.c is the main program file.
copy this snippet in your ~/.emacs:
-=-=-=-
(defun my-compile ()
"Call `compile' with 'make -kf BUFFER-NAME.make'"
(interactive)
(compile (concat "make -kf " (file-name-sans-extension (or (file-name-nondirectory (or (buffer-file-name) (buffer-name))))) ".make"))
)
(global-set-key [f12] 'my-compile)
=-=-=-
you can then use F12 when the current buffer is the main program file.
naming the compilation buffer like the project may be useful
(in order to be able to invoke many simultaneous compilations)
-=-=-=
(defun compilation-buffer-name-function-Nat (Q)
"Establish the name of the buffer created by `compile'"
(concat "*" (file-name-sans-extension (or (file-name-nondirectory (or (buffer-file-name) (buffer-name))))) ".compil*"))
(setq compilation-buffer-name-function 'compilation-buffer-name-function-Nat)
=-=-=-
--
Nat Linux
(add-hook 'c-mode-hook
(lambda ()
(set (make-local-variable 'compile-command)
(format "make -k -f %s.make"
(file-name-sans-extension
(file-name-nondirectory buffer-file-name))))))
--
Kevin Rodgers <kevin....@ihs.com> Project Engineer
Information Handling Services Electronic Systems Development
15 Inverness Way East, M/S A201 GO BUFFS!
Englewood CO 80112-5776 USA 1+ (303) 397-2807[voice]/754-3975[fax]