* Running makefiles from emacs
@ 2021-06-28 0:07 lisa-asket
2021-06-28 0:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-28 10:37 ` Arthur Miller
0 siblings, 2 replies; 21+ messages in thread
From: lisa-asket @ 2021-06-28 0:07 UTC (permalink / raw)
To: help-gnu-emacs
How can I run a makefile using an emacs command, perhaps a function. What suggestions would you have?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-28 0:07 Running makefiles from emacs lisa-asket
@ 2021-06-28 0:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-28 2:13 ` lisa-asket
2021-06-28 4:14 ` mrf
2021-06-28 10:37 ` Arthur Miller
1 sibling, 2 replies; 21+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-06-28 0:58 UTC (permalink / raw)
To: help-gnu-emacs
lisa-asket wrote:
> How can I run a makefile using an emacs command, perhaps
> a function. What suggestions would you have?
M-x compile RET
If you do that a lot assign a keybinding...
The default command for `compile' is "make", I have changed
that like this
(setq compile-command "make -j 4 -s -k ")
(setq compilation-read-command nil)
This is maybe useful as well
(setq compilation-scroll-output t)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 21+ messages in thread
* Running makefiles from emacs
2021-06-28 0:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-06-28 2:13 ` lisa-asket
2021-06-28 4:14 ` mrf
1 sibling, 0 replies; 21+ messages in thread
From: lisa-asket @ 2021-06-28 2:13 UTC (permalink / raw)
To: moasenwood, help-gnu-emacs
So if I do "M-x compile" emacs will ren the makefile in the directory where the file in the buffer resides?
Looks like you change the default parameters for make to include "-j 4 -s -k ".
Setting "compilation-scroll-output" scrolls the buffer automatically to always display the most recent text.
From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Running makefiles from emacs
Date: 28/06/2021 02:58:06 Europe/Paris
lisa-asket wrote:
> How can I run a makefile using an emacs command, perhaps
> a function. What suggestions would you have?
M-x compile RET
If you do that a lot assign a keybinding...
The default command for `compile' is "make", I have changed
that like this
(setq compile-command "make -j 4 -s -k ")
(setq compilation-read-command nil)
This is maybe useful as well
(setq compilation-scroll-output t)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-28 0:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-28 2:13 ` lisa-asket
@ 2021-06-28 4:14 ` mrf
2021-06-29 10:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 21+ messages in thread
From: mrf @ 2021-06-28 4:14 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor writes:
> The default command for `compile' is "make", I have changed
> that like this
>
> (setq compile-command "make -j 4 -s -k ")
> (setq compilation-read-command nil)
>
> This is maybe useful as well
And also it would be better to set this variable in directory local
variable using this command:
M-x add-dir-local-variable
which will create .dir-locals.el inside your project
or if you share small single file scripts or C code you can include it
as file local variable:
M-x add-file-local-variable
which will include it as comment in the bottem of file where emacs can
parse it with its special format and also there can be place with one
line at the top of file with:
M-x add-file-local-variable-prop-line
> (setq compilation-scroll-output t)
Nice!
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-28 0:07 Running makefiles from emacs lisa-asket
2021-06-28 0:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-06-28 10:37 ` Arthur Miller
2021-06-28 14:05 ` Jean Louis
1 sibling, 1 reply; 21+ messages in thread
From: Arthur Miller @ 2021-06-28 10:37 UTC (permalink / raw)
To: lisa-asket; +Cc: help-gnu-emacs
lisa-asket@perso.be writes:
> How can I run a makefile using an emacs command, perhaps a function. What suggestions would you have?
Have you seen wiki page about compile command?
https://www.emacswiki.org/emacs/CompileCommand
There are quite few tips. I have adapted myself several snippets from
that page, and been using them for quite some time. Check those about
neares Makefile, and recompile.
My personal adaptation if it helps (just some minor tweak if I remember
well):
https://github.com/amno1/.emacs.d/blob/main/lisp/c%2B%2B-setup.el
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-28 10:37 ` Arthur Miller
@ 2021-06-28 14:05 ` Jean Louis
0 siblings, 0 replies; 21+ messages in thread
From: Jean Louis @ 2021-06-28 14:05 UTC (permalink / raw)
To: Arthur Miller; +Cc: help-gnu-emacs, lisa-asket
> > How can I run a makefile using an emacs command, perhaps a function. What suggestions would you have?
>
> Have you seen wiki page about compile command?
>
> https://www.emacswiki.org/emacs/CompileCommand
>
> There are quite few tips. I have adapted myself several snippets from
> that page, and been using them for quite some time. Check those about
> neares Makefile, and recompile.
>
> My personal adaptation if it helps (just some minor tweak if I remember
> well):
>
> https://github.com/amno1/.emacs.d/blob/main/lisp/c%2B%2B-setup.el
I find it good that package is properly licensed, thanks.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-28 4:14 ` mrf
@ 2021-06-29 10:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-29 10:59 ` mrf
0 siblings, 1 reply; 21+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-06-29 10:34 UTC (permalink / raw)
To: help-gnu-emacs
mrf wrote:
>> The default command for `compile' is "make", I have changed
>> that like this
>>
>> (setq compile-command "make -j 4 -s -k ")
>> (setq compilation-read-command nil)
>
> And also it would be better to set this variable in
> directory local variable using this command:
>
> M-x add-dir-local-variable
>
> which will create .dir-locals.el inside your project
I don't know, you mean if you have different make commands for
different projects?
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-29 10:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-06-29 10:59 ` mrf
2021-06-30 19:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 21+ messages in thread
From: mrf @ 2021-06-29 10:59 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor writes:
> I don't know, you mean if you have different make commands for
> different projects?
I mean if you have different compile commands for different projects (or
you might share single source code programs with gcc command in it) for
example meson, cmake, autotools, waf, ninja, and so on.
in autotools you can set:
./configure && make
or
./autogen.sh && make
depending on the project and your needs
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-29 10:59 ` mrf
@ 2021-06-30 19:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-30 19:49 ` mrf
0 siblings, 1 reply; 21+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-06-30 19:04 UTC (permalink / raw)
To: help-gnu-emacs
mrf wrote:
> or you might share single source code programs with gcc
> command in it
What is a "single source code program"?
gcc is the GNU C Compiler, which also does C++, and not only
that, it does precompilation and linking as well, an more.
The man page is 26 170 pages! If you don't have it, you have
to install it from the repos, the package gcc-doc - you don't
get it with the gcc package for political reasons...
Some people say that writing a C compiler is not that
difficult, I think that refers to the simplest way one can do
it, because with all the optimizations, tweaks, compromises,
etc, complexity should be afoot in several directions
pretty fast.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-30 19:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-06-30 19:49 ` mrf
2021-07-01 8:39 ` Arthur Miller
2021-07-01 18:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 2 replies; 21+ messages in thread
From: mrf @ 2021-06-30 19:49 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor writes:
> What is a "single source code program"?
That's when you share small programs without makefile or compile script
(or any build system actullay) which is also useful for code snippets
you can take a look at this post from my blog (although the post is in
arabic code blocks are in english) where code snippets include their own
compile command in the top of file as local file variable:
https://themrfantastic.gitlab.io/blending-modes.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-30 19:49 ` mrf
@ 2021-07-01 8:39 ` Arthur Miller
2021-07-01 9:33 ` mrf
2021-07-01 18:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 21+ messages in thread
From: Arthur Miller @ 2021-07-01 8:39 UTC (permalink / raw)
To: mrf; +Cc: help-gnu-emacs, Emanuel Berg
mrf <joinlaw@cock.li> writes:
> Emanuel Berg via Users list for the GNU Emacs text editor writes:
>
>> What is a "single source code program"?
>
> That's when you share small programs without makefile or compile script
> (or any build system actullay) which is also useful for code snippets
>
> you can take a look at this post from my blog (although the post is in
> arabic code blocks are in english) where code snippets include their own
> compile command in the top of file as local file variable:
>
> https://themrfantastic.gitlab.io/blending-modes.html
Emacs comment is neat. You can achieve similar with a small shell script
too, check this:
https://github.com/ryanmjacobs/c
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-01 8:39 ` Arthur Miller
@ 2021-07-01 9:33 ` mrf
2021-07-01 18:18 ` Arthur Miller
2021-07-02 4:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 2 replies; 21+ messages in thread
From: mrf @ 2021-07-01 9:33 UTC (permalink / raw)
To: Arthur Miller; +Cc: help-gnu-emacs, mrf, Emanuel Berg
Arthur Miller writes:
> Emacs comment is neat. You can achieve similar with a small shell script
> too, check this:
>
> https://github.com/ryanmjacobs/c
I love this community it's nice place to share nice hacks
But I have something surpasses this and I don't use it in my article
because it's too old, anyway take this:
/*****************/
/* script.c file */
/*****************/
#if 0
#//if file is not yet compiled
if [ -f $(basename $0 .c) ]
then
printf ""
else
gcc $CFLAGS $CXXFLAGS $LDFLAGS $0 -o `basename $0 .c` && exec ./`basename $0 .c` "$@";
fi;
#//if file is already compiled
if [ `stat -c %Y $(basename $0 .c) ` -lt `stat -c %Y $0` ]
then
gcc $CFLAGS $CXXFLAGS $LDFLAGS $0 -o `basename $0 .c` && exec ./`basename $0 .c` "$@";
else
exec ./`basename $0 .c` "$@";
fi;
exit
#endif // 0
#include <stdio.h>
#include <math.h>
int main (int argc, char **argv)
{
printf("%f\n", cosf (103.0f));
printf(
"variables in argv (excluding %s) =%d\nparam1=%s param2=%d param3=%d\n\n",
__FILE__, argc-1, argv[1], atoi(argv[2]), atoi(argv[3]));
return 0;
}
/* Local Variables: */
/* compile-command: "LDFLAGS='-lm' CFLAGS='-Wall' bash script.c 'String' 10 5395" */
/* End: */
this neat hack will include a full fledged bash script and this script
will only compile when file is changed otherwise will run the program,
you can run it with:
bash script_name.c
or by changing the file permission `chmod +x script_name.c` and then
`./script_name.c`
the idea is that there is conditional preprocessor that will only
compile when true(1) and we set it to false(0) on purpose.
Also this script allow you to pass paramenters and also compiler flags
by using environment variable and I think this is great way to write C
CGI scripts.
And BTW tiny C compiler is better option than what you send.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-01 9:33 ` mrf
@ 2021-07-01 18:18 ` Arthur Miller
2021-07-02 8:13 ` mrf
2021-07-02 4:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 21+ messages in thread
From: Arthur Miller @ 2021-07-01 18:18 UTC (permalink / raw)
To: mrf; +Cc: help-gnu-emacs, Emanuel Berg
mrf <joinlaw@cock.li> writes:
> Arthur Miller writes:
>
>> Emacs comment is neat. You can achieve similar with a small shell script
>> too, check this:
>>
>> https://github.com/ryanmjacobs/c
>
> I love this community it's nice place to share nice hacks
>
> But I have something surpasses this and I don't use it in my article
> because it's too old, anyway take this:
>
> /*****************/
> /* script.c file */
> /*****************/
> #if 0
> #//if file is not yet compiled
> if [ -f $(basename $0 .c) ]
> then
> printf ""
> else
> gcc $CFLAGS $CXXFLAGS $LDFLAGS $0 -o `basename $0 .c` && exec ./`basename $0 .c` "$@";
> fi;
>
> #//if file is already compiled
> if [ `stat -c %Y $(basename $0 .c) ` -lt `stat -c %Y $0` ]
> then
> gcc $CFLAGS $CXXFLAGS $LDFLAGS $0 -o `basename $0 .c` && exec ./`basename $0 .c` "$@";
> else
> exec ./`basename $0 .c` "$@";
> fi;
> exit
> #endif // 0
>
> #include <stdio.h>
> #include <math.h>
>
> int main (int argc, char **argv)
> {
> printf("%f\n", cosf (103.0f));
>
> printf(
> "variables in argv (excluding %s) =%d\nparam1=%s param2=%d param3=%d\n\n",
> __FILE__, argc-1, argv[1], atoi(argv[2]), atoi(argv[3]));
>
> return 0;
> }
>
> /* Local Variables: */
> /* compile-command: "LDFLAGS='-lm' CFLAGS='-Wall' bash script.c 'String' 10 5395" */
> /* End: */
>
>
>
>
> this neat hack will include a full fledged bash script and this script
> will only compile when file is changed otherwise will run the program,
> you can run it with:
>
> bash script_name.c
>
> or by changing the file permission `chmod +x script_name.c` and then
> `./script_name.c`
>
> the idea is that there is conditional preprocessor that will only
> compile when true(1) and we set it to false(0) on purpose.
>
> Also this script allow you to pass paramenters and also compiler flags
> by using environment variable and I think this is great way to write C
> CGI scripts.
>
> And BTW tiny C compiler is better option than what you send.
Yes, TCC comes with a similar hack, but the C script is independent of
the compiler and you don't need to clutter each and every file with bash
script and linker/compiler directives in each file either.
But sure, there is more than one way to skin a cat .... no idea why
people say that, I assure I have never try to skinn a cat nor any other
animal.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-06-30 19:49 ` mrf
2021-07-01 8:39 ` Arthur Miller
@ 2021-07-01 18:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-02 7:44 ` mrf
1 sibling, 1 reply; 21+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-01 18:55 UTC (permalink / raw)
To: help-gnu-emacs
mrf wrote:
>> What is a "single source code program"?
>
> That's when you share small programs without makefile or
> compile script (or any build system actullay) which is also
> useful for code snippets
There is a name for that, really?
And even so, isn't the idea they should be integrated as
building blocks into other, bigger projects?
> you can take a look at this post from my blog (although the
> post is in arabic code blocks are in english)
Good!
> where code snippets include their own compile command in the
> top of file as local file variable:
>
> https://themrfantastic.gitlab.io/blending-modes.html
Yes, I see ... but I still don't understand why one would do
that or what this is suppose to illustrate?
A blast from the past BTW, C99, a standard whose main concern
was to be compatible with everything else already there...
Heh, C with pointer arithmetic and explicit memory
management... Preprocessor functions aren't mandatory even in
C tho, or am I wrong ? yes : no.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-01 9:33 ` mrf
2021-07-01 18:18 ` Arthur Miller
@ 2021-07-02 4:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 0 replies; 21+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-02 4:32 UTC (permalink / raw)
To: help-gnu-emacs
mrf wrote:
> this community it's nice place to share nice hack
It could be, at least.
> But I have something surpasses this and I don't use it in my
> article because it's too old, anyway take this:
>
> /*****************/
> /* script.c file */
> /*****************/
> #if 0
> #//if file is not yet compiled
> if [ -f $(basename $0 .c) ]
> then
> printf ""
> else
> gcc $CFLAGS $CXXFLAGS $LDFLAGS $0 -o `basename $0 .c` && exec ./`basename $0 .c` "$@";
> fi [...]
DIY Build System
For Dummies
the fun and easy way
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-01 18:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-02 7:44 ` mrf
2021-07-02 11:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 21+ messages in thread
From: mrf @ 2021-07-02 7:44 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor writes:
> mrf wrote:
>
>>> What is a "single source code program"?
>>
>> That's when you share small programs without makefile or
>> compile script (or any build system actullay) which is also
>> useful for code snippets
>
> There is a name for that, really?
I don't know this how I describe it (I'm not english native person)
> And even so, isn't the idea they should be integrated as
> building blocks into other, bigger projects?
>> where code snippets include their own compile command in the
>> top of file as local file variable:
>>
>> https://themrfantastic.gitlab.io/blending-modes.html
>
> Yes, I see ... but I still don't understand why one would do
> that or what this is suppose to illustrate?
This small pieces of code used to demo some features or techniques and
In my post I illustrate the blending modes using Netpbm format which is
easy and not compressed image format comes in both binary and ASCII
variations and It's 8bit (1 byte per color channel).
If you know blending modes in GIMP you can see the pictures and
understand it.
>
> Heh, C with pointer arithmetic and explicit memory
> management... Preprocessor functions aren't mandatory even in
> C tho, or am I wrong ? yes : no.
Will those are small examples and I'm libreal in writing them and I do
that so I can declare them as global variables (Although I forget
to make them static even that is not important) and not care about
including them as parameters to functions also the memory are
dynamically allocated so because I load pictures in the commandline.
Stack arrays are limited and passing them to function will make lose it
size information with sizeof (even tho I can store in other var).
Preprocessor functions are awesome and they can improve performance (and
sometimes make debugging harder).
If you have any suggestion or comment about that send me private message
or in comment section of the post.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-01 18:18 ` Arthur Miller
@ 2021-07-02 8:13 ` mrf
2021-07-02 9:00 ` Arthur Miller
0 siblings, 1 reply; 21+ messages in thread
From: mrf @ 2021-07-02 8:13 UTC (permalink / raw)
To: Arthur Miller; +Cc: help-gnu-emacs, mrf, Emanuel Berg
Arthur Miller writes:
>
> Yes, TCC comes with a similar hack, but the C script is independent of
> the compiler and you don't need to clutter each and every file with bash
> script and linker/compiler directives in each file either.
Yes exactly, I can make this line smaller (with one line) without my file time stamp
hack but then it will compile each time I run this script and also I can
use cc instead of gcc which will select default compiler in your system.
What makes me believe my hack is better than Tiny CC and what you send
is that my hack gives my the ability to use all the compiler
optimizations of gcc (performant scripts).
my hack is acting as stupid simple build system.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-02 8:13 ` mrf
@ 2021-07-02 9:00 ` Arthur Miller
2021-07-02 17:13 ` mrf
0 siblings, 1 reply; 21+ messages in thread
From: Arthur Miller @ 2021-07-02 9:00 UTC (permalink / raw)
To: mrf; +Cc: help-gnu-emacs, Emanuel Berg
mrf <joinlaw@cock.li> writes:
> Arthur Miller writes:
>>
>> Yes, TCC comes with a similar hack, but the C script is independent of
>> the compiler and you don't need to clutter each and every file with bash
>> script and linker/compiler directives in each file either.
>
> Yes exactly, I can make this line smaller (with one line) without my file time stamp
> hack but then it will compile each time I run this script and also I can
> use cc instead of gcc which will select default compiler in your system.
>
> What makes me believe my hack is better than Tiny CC and what you send
> is that my hack gives my the ability to use all the compiler
> optimizations of gcc (performant scripts).
Check examples in posted C shell script. You can pass one liner she-bang
with linker/compiler flags on that line. That is still way much less clutter
than what you suggest with your solution :-). Sorry, but your solution
requires you to add shell script to every c source file you wish to use
as a "single source program" as you put it, and in addition even help
from Emacs.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-02 7:44 ` mrf
@ 2021-07-02 11:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 21+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-02 11:00 UTC (permalink / raw)
To: help-gnu-emacs
mrf wrote:
> In my post I illustrate the blending modes using Netpbm
> format which is easy and not compressed image format comes
> in both binary and ASCII variations and It's 8bit (1 byte
> per color channel).
So that's
(** (** 2 8) 3) ; 16 777 216
possible colors, assuming the color channels are R, G, B, so 3
in total.
With
(** 2 8) ; 256
shades of each color.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-02 9:00 ` Arthur Miller
@ 2021-07-02 17:13 ` mrf
2021-07-02 18:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 21+ messages in thread
From: mrf @ 2021-07-02 17:13 UTC (permalink / raw)
To: Arthur Miller; +Cc: help-gnu-emacs, mrf, Emanuel Berg
Arthur Miller writes:
> Check examples in posted C shell script. You can pass one liner she-bang
> with linker/compiler flags on that line. That is still way much less clutter
> than what you suggest with your solution :-). Sorry, but your solution
> requires you to add shell script to every c source file you wish to use
> as a "single source program" as you put it, and in addition even help
> from Emacs.
No there no need for help from emacs and compiler flags can be passed in
command line and also from the C script.
The emacs local variable line is for people to quickly run it with
M-x compile when they open it but you can take this line if you don't
use emacs and run it in the terminal.
BTW running it with ./script.c should be sufficient but I put this line
as example for passing values and compiler flags.
I'd just like to interject for a moment. My GNU/hack does not need extra
dependency as what you suggest and If I share this scripts anyone can
run it without bothering of installing new dependency.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Running makefiles from emacs
2021-07-02 17:13 ` mrf
@ 2021-07-02 18:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 21+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-02 18:24 UTC (permalink / raw)
To: help-gnu-emacs
mrf wrote:
> I'd just like to interject for a moment. My GNU/hack does
> not need extra dependency as what you suggest and If I share
> this scripts anyone can run it without bothering of
> installing new dependency.
GNU hack :)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2021-07-02 18:24 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-28 0:07 Running makefiles from emacs lisa-asket
2021-06-28 0:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-28 2:13 ` lisa-asket
2021-06-28 4:14 ` mrf
2021-06-29 10:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-29 10:59 ` mrf
2021-06-30 19:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-30 19:49 ` mrf
2021-07-01 8:39 ` Arthur Miller
2021-07-01 9:33 ` mrf
2021-07-01 18:18 ` Arthur Miller
2021-07-02 8:13 ` mrf
2021-07-02 9:00 ` Arthur Miller
2021-07-02 17:13 ` mrf
2021-07-02 18:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-02 4:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-01 18:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-02 7:44 ` mrf
2021-07-02 11:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-28 10:37 ` Arthur Miller
2021-06-28 14:05 ` Jean Louis
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.