Message from discussion Emacs users a dying breed?
Received: by 10.68.227.67 with SMTP id ry3mr4928076pbc.8.1340497008052;
Sat, 23 Jun 2012 17:16:48 -0700 (PDT)
From: Dan Espen <des...@verizon.net>
Subject: Re: Emacs users a dying breed?
Date: Sat, 23 Jun 2012 20:16:46 -0400
Organization: A noiseless patient Spider
Injection-Info: mx04.eternal-september.org; posting-host="eEvqGQsJJYL9/mBIdBpRPw";
logging-data="13812"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX19z/JIHCFF8oJrgJXcCPmozpW0DfQtZl00="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Content-Type: text/plain; charset=us-ascii
notbob <not...@nothome.com> writes:
> On 2012-06-21, Ken Goldman <kgold...@us.ibm.com> wrote:
>> I think Pascal was saying that you Makefile (not /usr/bin/make) might
>> not be in the same directory as your code.
>> If you don't have a makefile there, you can also do 'make -f
>> pathtomakefile' and emacs will remember it for the next time.
>> If you don't have a makefile at all, it's time to create one.
>> Bonus: Check out M-x next-error. I have both compile and next-error
>> bound to Fn keys since I use them constantly.
> OK. I'll risk looking stupid one more time. ;)
> What, exactly, is this "Makefile"?
A Makefile is a file using that name (Makefile) that you normally keep
in the same directory as your source code. In that file you keep the
rules it takes to build your source code.
Start here for documentation:
The basic idea is to list your files, show how they inter-relate and are
used to build your project.
A simple example of a Makefile:
cc $< $@
Anything starting in column 1 and ending in a ":" is a target.
(Something you want to make.)
Things listed after the colon (":") are things you need to make
Things following a TAB in column 1 are rules. The rules you need
to make the target.
Makefiles can get a lot more elaborate and can do a lot of things
for you. If you need to compile 3 subroutines for a main before
you link the main, the makefile can ensure that you do that.
Anyway, it's definitely worth the time to learn and a great
productivity booster. It's also not only for building programs.
I use them to upload web pages to a server.
uploads:=$(wildcard *.jpg *.html *.gif *.css )
echo -e "binary\n"\
"put $(subst .upload/,,$@)\n"\
) | ftp $(UP_SITE)
echo "`date`" > $@