unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help with makefile command line
@ 2008-03-25 13:11 Balaji V. Iyer
  2008-03-26  4:17 ` Mike Mattie
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Balaji V. Iyer @ 2008-03-25 13:11 UTC (permalink / raw)
  To: emacs-devel

Hello Everyone,
    I use the compile option extenstively in emacs. When I type "M-x
compile" the default line is "make -k" Many times I do not have a make
file thus I would lke the default line to be
 
"gcc -ansi -O4 -Wall <c_source_file>"
 
How do I do this?
 
I tried the following command but it doesn't seem to work (If anyone
have a better idea please let me know).
 
(function
 (lambda ()
   (unless (or (file-exists-p "makefile")
               (file-exists-p "Makefile"))
     (setq compile-command
           (concat "gcc -Wall -O3 -o"
                   (file-name-sans-extension (file-name-nondirectory
buffer-file -name))
                   " "
                   (file-name-nondirectory buffer-file-name))))))
 
 
 
Any help is greatly appreciated.

Oh, one thing..I am using emacs 21.2.1 on cygwin
 
Thanks,
 
-- 
 
Balaji V. Iyer
PhD Student,
Center for Efficient, Scalable and Reliable Computing, Department of
Electrical and Computer Engineering, North Carolina State University.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-03-26 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-25 13:11 Help with makefile command line Balaji V. Iyer
2008-03-26  4:17 ` Mike Mattie
2008-03-26  9:05 ` Andreas Schwab
2008-03-26 13:50 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).