emacs-devel
[Top][All Lists]
Advanced

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

Re: M-x compile for different file extensions


From: Kai Großjohann
Subject: Re: M-x compile for different file extensions
Date: Tue, 22 Oct 2002 08:46:14 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Richard Stallman <address@hidden> writes:

>     1. There are many independent (small) programs which are
>        not part of a big project and so there is no need for make file.
>
> Isn't a makefile as good a way as any to specify the right commands
> to use to compile them?

I think that people have an irrational fear of Makefiles.  For
example, colleagues were asking me about how to compile C++ programs
from within Emacs for a beginners' course on C++ "without using
makefiles because these are just beginners and not even CS students
and makefiles are so difficult".

Then I explained to them that the empty (or non-existing) makefile is
good enough (if they use GNU make at least, and call their programs
foo.cc).  They were really surprised and the last I heard from them
was "wow, that's simple".

But something that might be useful would be to auto-select a make
target, so that editing foo.cc means that the default command is
"make foo" (or "make -k foo", if you must) and not "make -k".  I
don't know if this is practical.

How about adding some more advertisement for make to the Emacs
documentation somewhere?  Strictly speaking, the Emacs manual is the
wrong spot for this, but maybe it would help a number of users.

[time passes, which is its job]

There is one argument in favor of automatically selecting the right
compile command.  Suppose a user has a lot of *.giggle files and they
want to run "mumblefrotz" on them to produce *.stiffle files.
Suppose that the *.giggle files are all over the place, not just in
one directory.  Then it might be convenient for these users to select
the compile-command based on the major mode of the buffer, instead of
writing makefiles everywhere with basically the same contents.  (The
user might not have the right to edit the global make.rules file.)

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)






reply via email to

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