* Multiple Compiler Options
@ 2021-08-09 19:21 Erin Hodgess
2021-08-09 20:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 4+ messages in thread
From: Erin Hodgess @ 2021-08-09 19:21 UTC (permalink / raw)
To: help-gnu-emacs
Hello:
I am using Emacs with Fortran to compile programs.
I use the following hooks:
(add-hook 'fortran-mode-hook
(lambda ()
(set (make-local-variable 'compile-command)
(concat "gfortran " buffer-file-name " && ./a.out" ) )))
Is there a way to have different compile commands with different options, please?
Thank you,
Sincerely,
Erin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multiple Compiler Options
2021-08-09 19:21 Multiple Compiler Options Erin Hodgess
@ 2021-08-09 20:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-09 20:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 4+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-09 20:36 UTC (permalink / raw)
To: help-gnu-emacs
Erin Hodgess wrote:
> I am using Emacs with Fortran to compile programs.
>
> I use the following hooks:
>
> (add-hook 'fortran-mode-hook
> (lambda ()
> (set (make-local-variable 'compile-command)
> (concat "gfortran " buffer-file-name " && ./a.out" ) )))
>
> Is there a way to have different compile commands with
> different options, please?
Well, in general you can of course define any command
(interactive function) you'd like to run anything you want,
but here it is better to have a Makefile and then just have
`compile-command' "make -k " or something.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-09 20:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-09 19:21 Multiple Compiler Options Erin Hodgess
2021-08-09 20:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-09 20:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-09 20:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.