help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple Compiler Options


From: Emanuel Berg
Subject: Re: Multiple Compiler Options
Date: Mon, 09 Aug 2021 22:36:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]