unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* help with makefile command line
@ 2008-03-25 13:09 Balaji V. Iyer
  2008-03-25 14:04 ` William Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Balaji V. Iyer @ 2008-03-25 13:09 UTC (permalink / raw)
  To: help-gnu-emacs

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.
 
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] 16+ messages in thread

end of thread, other threads:[~2008-03-29 15:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.9409.1206451688.18990.help-gnu-emacs@gnu.org>
2008-03-27 15:36 ` help with makefile command line step
2008-03-27 17:28 ` Richard G Riley
2008-03-28  2:51   ` stan
2008-03-28  3:01     ` Richard G Riley
2008-03-28  7:11       ` stan
2008-03-28 12:57         ` Richard G Riley
2008-03-28 20:33           ` stan
2008-03-29 13:18             ` Richard G Riley
2008-03-29 15:33     ` Kevin Rodgers
2008-03-25 13:09 Balaji V. Iyer
2008-03-25 14:04 ` William Xu
2008-03-26  4:19 ` Eli Zaretskii
2008-03-26  4:25   ` Mike Mattie
2008-03-26  4:42   ` Mike Mattie
2008-03-26  4:57     ` Mike Mattie
2008-03-26 16:20 ` Nikolaj Schumacher

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).