From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23680 invoked by alias); 9 May 2006 16:23:39 -0000 Received: (qmail 23670 invoked by uid 22791); 9 May 2006 16:23:38 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 May 2006 16:23:36 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k49GNY0S001421 for ; Tue, 9 May 2006 12:23:34 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k49GNYle010366 for ; Tue, 9 May 2006 12:23:34 -0400 Received: from [172.16.14.227] (IDENT:iIW0aXpHUJCG4laymXCez0ZLwOgywNz8@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k49GNYAc008366 for ; Tue, 9 May 2006 12:23:34 -0400 Message-ID: <4460C206.9080103@redhat.com> Date: Tue, 09 May 2006 16:23:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: cgen@sources.redhat.com Subject: [patch][commit] Location of (include file) Content-Type: multipart/mixed; boundary="------------050601000309010805060606" X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00015.txt.bz2 This is a multi-part message in MIME format. --------------050601000309010805060606 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 463 Hi, I've committed the attached patch. It causes cgen to look for included files in the same directory as specified by the -a option (i.e. same as the original input file). The previous behaviour was to look in $srcdir/cgen/cpu which is obviously not correct when processing files from $srcdir/cpu. If -a is not specified, then all files are obtained form $srcdir/cgen/cpu (unchanged from before). Let me know if there are any problems or concerns. Dave --------------050601000309010805060606 Content-Type: text/plain; name="cgen-include.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-include.ChangeLog" Content-length: 210 2006-05-09 Dave Brolley * read.scm (include): Use arch-path as file location. (arch-path): Define it with a default setting. (-cgen): Update arch-path when "-a" option is specified. --------------050601000309010805060606 Content-Type: text/plain; name="cgen-include.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-include.patch.txt" Content-length: 1809 ? cgen/string Index: cgen/read.scm =================================================================== RCS file: /cvs/src/src/cgen/read.scm,v retrieving revision 1.11 diff -c -p -r1.11 read.scm *** cgen/read.scm 15 Feb 2005 09:01:35 -0000 1.11 --- cgen/read.scm 9 May 2006 16:13:59 -0000 *************** *** 1,5 **** ; Top level file for reading and recording .cpu file contents. ! ; Copyright (C) 2000, 2001 Red Hat, Inc. ; This file is part of CGEN. ; See file COPYING.CGEN for details. --- 1,5 ---- ; Top level file for reading and recording .cpu file contents. ! ; Copyright (C) 2000, 2001, 2006 Red Hat, Inc. ; This file is part of CGEN. ; See file COPYING.CGEN for details. *************** Define a preprocessor-style macro. *** 781,788 **** ; .cpu file include mechanism (define (include file) ! (logit 1 "Including file " file " ...\n") ! (reader-read-file! (string-append srcdir "/cpu/" file)) (logit 2 "Resuming previous file ...\n") ) --- 781,788 ---- ; .cpu file include mechanism (define (include file) ! (logit 1 "Including file " (string-append arch-path file) " ...\n") ! (reader-read-file! (string-append arch-path file)) (logit 2 "Resuming previous file ...\n") ) *************** Define a preprocessor-style macro. *** 994,999 **** --- 994,1001 ---- ) ) + (define arch-path (string-append srcdir "/cpu/")) + ; Accessors for application option specs (define (opt-get-first-pass opt) (or (list-ref opt 3) (lambda args #f))) *************** Define a preprocessor-style macro. *** 1072,1077 **** --- 1074,1080 ---- (else (cond ((str=? "-a" (car opt)) (set! arch-file arg) + (set! arch-path (dirname arg)) ) ((str=? "-b" (car opt)) (set! debugging #t) --------------050601000309010805060606--