From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Balaji V. Iyer" Newsgroups: gmane.emacs.help Subject: help with makefile command line Date: Tue, 25 Mar 2008 09:09:56 -0400 Message-ID: <000001c88e79$86451340$33160e98@ece.ncsu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1206451723 29171 80.91.229.12 (25 Mar 2008 13:28:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2008 13:28:43 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 25 14:29:10 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Je9DA-0007DT-5Y for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Mar 2008 14:29:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Je9CY-0003SG-Ti for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Mar 2008 09:28:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Je8ul-0007la-FI for help-gnu-emacs@gnu.org; Tue, 25 Mar 2008 09:10:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Je8ug-0007gK-PB for help-gnu-emacs@gnu.org; Tue, 25 Mar 2008 09:10:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Je8ug-0007gH-MJ for help-gnu-emacs@gnu.org; Tue, 25 Mar 2008 09:10:02 -0400 Original-Received: from uni11mr.unity.ncsu.edu ([152.1.224.170]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Je8ug-0001Wa-8f for help-gnu-emacs@gnu.org; Tue, 25 Mar 2008 09:10:02 -0400 Original-Received: from lakshmi (lakshmi.ece.ncsu.edu [152.14.22.51]) by uni11mr.unity.ncsu.edu (8.13.7/8.13.8/Nv5.2007.0604) with ESMTP id m2PD9vZC018149 for ; Tue, 25 Mar 2008 09:09:57 -0400 (EDT) X-Mailer: Microsoft Office Outlook 11 Thread-Index: AciOeYXUMihVhePRTvmDg2wRu6uXtQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-PMX-Version: 5.3.3.310218, Antispam-Engine: 2.5.2.313940, Antispam-Data: 2008.3.25.55431 X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-Mailman-Approved-At: Tue, 25 Mar 2008 09:28:07 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52685 Archived-At: 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 " 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.