From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hans Aberg Newsgroups: gmane.lisp.guile.user Subject: Re: Using guile as an extension language for GNU make Date: Tue, 20 Sep 2011 00:35:28 +0200 Message-ID: <852651F8-6AD0-4146-A981-9635B88C908B@telia.com> References: <1316304616.28907.118.camel@homebase> <87wrd5x404.fsf@ambire.localdomain> <1316374080.28907.163.camel@homebase> <87sjntwf29.fsf@ambire.localdomain> <1316445274.28907.174.camel@homebase> <6D40BC91-6E4B-4799-BE29-BD2FF6EEEB84@telia.com> <1316469386.27584.30.camel@psmith-ubeta> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1316471743 14168 80.91.229.12 (19 Sep 2011 22:35:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Sep 2011 22:35:43 +0000 (UTC) Cc: guile-user To: psmith@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Sep 20 00:35:37 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R5mR7-0005xp-7t for guile-user@m.gmane.org; Tue, 20 Sep 2011 00:35:37 +0200 Original-Received: from localhost ([::1]:43906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5mR6-000873-En for guile-user@m.gmane.org; Mon, 19 Sep 2011 18:35:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5mR3-00086w-Hp for guile-user@gnu.org; Mon, 19 Sep 2011 18:35:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5mR2-0008Gr-MW for guile-user@gnu.org; Mon, 19 Sep 2011 18:35:33 -0400 Original-Received: from smtp-out12.han.skanova.net ([195.67.226.212]:49344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5mR1-0008FS-5N; Mon, 19 Sep 2011 18:35:31 -0400 Original-Received: from [10.0.1.2] (217.210.127.13) by smtp-out12.han.skanova.net (8.5.133) (authenticated as u26619196) id 4DF89E7F0153D12D; Tue, 20 Sep 2011 00:35:29 +0200 In-Reply-To: <1316469386.27584.30.camel@psmith-ubeta> X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.67.226.212 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8811 Archived-At: On 19 Sep 2011, at 23:56, Paul Smith wrote: > The first stage of make is reading in all the makefiles. As part of > this, variables and functions are expanded (one line at a time) and = the > result is a string. Its parser is handwritten, and perhaps not easy to tweak, and get 'make' = variables and stuff into Guile. > The $(guile ...) make function, like all other make functions and > variables, is expanded in this way, so the return value of the guile > function must be converted to a string and appended to the string = buffer > make is constructing. Once all of the input is expanded and the > expansion is added to the buffer, then make will go back and parse it > (exactly how this is done is very context-dependent). There is the pretty-print module. (use-modules (ice-9 pretty-print)) Perhaps you might check how it is implemented. Hans