From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.devel Subject: Re: Help with makefile command line Date: Tue, 25 Mar 2008 21:17:32 -0700 Message-ID: <20080325211732.246fb67f@reforged> References: <000101c88e79$ce6435c0$33160e98@ece.ncsu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/n7M3IYrCtonjSA6gnB.Piuy"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Trace: ger.gmane.org 1206505342 26642 80.91.229.12 (26 Mar 2008 04:22:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2008 04:22:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 26 05:22:53 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 1JeNA3-0002a4-S1 for ged-emacs-devel@m.gmane.org; Wed, 26 Mar 2008 05:22:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JeN9S-0005gj-Go for ged-emacs-devel@m.gmane.org; Wed, 26 Mar 2008 00:22:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JeN9N-0005eO-TI for emacs-devel@gnu.org; Wed, 26 Mar 2008 00:22:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JeN9M-0005de-6X for emacs-devel@gnu.org; Wed, 26 Mar 2008 00:22:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JeN9M-0005db-1W for emacs-devel@gnu.org; Wed, 26 Mar 2008 00:22:08 -0400 Original-Received: from wa-out-1112.google.com ([209.85.146.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JeN9L-0001U0-N2 for emacs-devel@gnu.org; Wed, 26 Mar 2008 00:22:07 -0400 Original-Received: by wa-out-1112.google.com with SMTP id k34so4352028wah.10 for ; Tue, 25 Mar 2008 21:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:from:to:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; bh=aQvH14uc2yQ2M6/+Ob6yEZo+DgQA/vH4yaINiy8jWKw=; b=PF60BkzZtE0B5n0QygK81LNiMWze0h8duJGyCmDJHTHXK8HsLDSS/rk46/0GhpU+1P+hi+G3hMX3nhmo1vEZGTMIxTR4w2qU2dv/4qRk97G4FeAjFtHO6glceIfB4AWnPle1v0xA3ZBI9b9ujONzWR9pdVWbIDRPOHzLwLbnfEE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=aqNzrMGijFDq3Y0uyEXPYDix3f9hjBH5Mit4HWsBOLMq4w6Z/1ly8891R0v+lPpV1nMCG/U5KK4fbQW29nwbaqw0PXj6MAWtgS4/wByi3CDgoglxFMQMTgZwgyEcASD0f4hj0U8xSpyVV8yhtlIzog/PAgqNtoSLCTaYafe2BFI= Original-Received: by 10.114.26.18 with SMTP id 18mr14675863waz.130.1206505326814; Tue, 25 Mar 2008 21:22:06 -0700 (PDT) Original-Received: from reforged ( [71.217.206.83]) by mx.google.com with ESMTPS id m28sm19226374poh.7.2008.03.25.21.22.06 (version=SSLv3 cipher=OTHER); Tue, 25 Mar 2008 21:22:06 -0700 (PDT) In-Reply-To: <000101c88e79$ce6435c0$33160e98@ece.ncsu.edu> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.8; i686-pc-linux-gnu) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:93490 Archived-At: --Sig_/n7M3IYrCtonjSA6gnB.Piuy Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 25 Mar 2008 09:11:58 -0400 "Balaji V. Iyer" wrote: > 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 > =20 > "gcc -ansi -O4 -Wall " > =20 > How do I do this? > =20 > I tried the following command but it doesn't seem to work (If anyone > have a better idea please let me know). > =20 > (function ^^^ defun > (lambda () > (unless (or (file-exists-p "makefile") ^^ strange? > (file-exists-p "Makefile")) > (setq compile-command ^^^ why modify a variable each time ? pass as an argument function ? > (concat "gcc -Wall -O3 -o" > (file-name-sans-extension (file-name-nondirectory > buffer-file -name)) ^^ broken ? > " " > (file-name-nondirectory buffer-file-name)))))) ^^^ computed twice, should bind. > =20 > =20 > =20 > Any help is greatly appreciated. also concatenating arguments means that some external shell is going to hav= e to split the args again, usually better (no quoting issues), to simply pass off the arguments to exe= c without invoking the shell if you can. Hope that helps a bit. > Oh, one thing..I am using emacs 21.2.1 on cygwin > =20 > Thanks, > =20 --Sig_/n7M3IYrCtonjSA6gnB.Piuy Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFH6c5cdfRchrkBInkRAnKLAKCxR7Ocg4Q+i9HVBspwTH57MHJzJACfd3D1 HLh2caGRPXd5k/8/oL3TOJc= =FsX6 -----END PGP SIGNATURE----- --Sig_/n7M3IYrCtonjSA6gnB.Piuy--