From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Balaji V. Iyer" Newsgroups: gmane.emacs.devel Subject: Help with makefile command line Date: Tue, 25 Mar 2008 09:11:58 -0400 Message-ID: <000101c88e79$ce6435c0$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 1206504398 24302 80.91.229.12 (26 Mar 2008 04:06:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2008 04:06:38 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 26 05:07:08 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JeMul-0007wI-Rb for ged-emacs-devel@m.gmane.org; Wed, 26 Mar 2008 05:07:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JeMuA-000206-IF for ged-emacs-devel@m.gmane.org; Wed, 26 Mar 2008 00:06:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Je8wd-0000T6-EN for emacs-devel@gnu.org; Tue, 25 Mar 2008 09:12:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Je8wb-0000SP-VM for emacs-devel@gnu.org; Tue, 25 Mar 2008 09:12:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Je8wb-0000SJ-OY for emacs-devel@gnu.org; Tue, 25 Mar 2008 09:12:01 -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 1Je8wb-0002IQ-FT for emacs-devel@gnu.org; Tue, 25 Mar 2008 09:12:01 -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 m2PDBwTG018520 for ; Tue, 25 Mar 2008 09:11:58 -0400 (EDT) Original-References: X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AciOeYXUMihVhePRTvmDg2wRu6uXtQAABKEg 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: Wed, 26 Mar 2008 00:06:22 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93489 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. 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.