From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Burgess Newsgroups: gmane.lisp.guile.user Subject: Re: Seeking Advice on syntax/macros in separate files Date: Tue, 2 Mar 2021 09:47:43 +0000 Message-ID: <20210302094743.GA3172720@embecosm.com> References: <20210301180357.GN265215@embecosm.com> <87tupuneuy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39225"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: Ludovic =?iso-8859-1?Q?Court=E8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Mar 02 10:48:01 2021 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lH1dJ-000A50-H2 for guile-user@m.gmane-mx.org; Tue, 02 Mar 2021 10:48:01 +0100 Original-Received: from localhost ([::1]:44058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH1dI-00038j-83 for guile-user@m.gmane-mx.org; Tue, 02 Mar 2021 04:48:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH1d7-00038Y-3Y for guile-user@gnu.org; Tue, 02 Mar 2021 04:47:49 -0500 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:38861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lH1d5-0000vb-EF for guile-user@gnu.org; Tue, 02 Mar 2021 04:47:48 -0500 Original-Received: by mail-wr1-x431.google.com with SMTP id d15so3899852wrv.5 for ; Tue, 02 Mar 2021 01:47:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ukjR83yAF3UTq3AnSWoV2Lz44k4D7/knsi3vWGS7PcA=; b=cnM5tlBvwRzMeMec3GCHWpQ1UvFXwMQ4QyDo104dcyVo1EtpR3bnb8dgqD8rTtR5Pt F7+ceVfWQoV6mcgFVLLkDZZIwA5w+ybWqxWR0aIJ41ncIIpq+9Rm3he2p5lBlQZK/kI9 7mw4U3aieLfoZfF7FDkwY+fydlEhxGeeeeHI6cen5sFvBWRYr8MmtqED0zD5Mb+QUCom MdmBt7JGoPnBKLHLxQ6oxkwYOw3LVas3Ee9BSn1bLL1XkY0WK/LDfUi+MhT3jNp7vrOl NvgBcQ3b8w/PzL0ZJ9DooatCggDWRMhlcLjsayxELG4tOIz6XNg6pZU7hnEQK4Zk/Vhp AUag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ukjR83yAF3UTq3AnSWoV2Lz44k4D7/knsi3vWGS7PcA=; b=SCo5iIJZ8WGEi7CAkLGeOyvqMlFLNxW5RnBNPiGTjR/IFqIHxvBjBpe/squdz+bYbn a8J5g9D+E3xYhLOgJkwa+IkiGcpdEyQn3tSRwgu1ObhDZedeVuDwY0B+H1U6MQ4i9sHh 5xDtkAjuVUd9se/CdrFDgb1EOCgwdxyaKo18a81fvAt4Vali8AFonRfiMm23I9zxoMBA uuNUpe94vCvTm5eCi6Zxcdaosdre1JrwKbVWJDess6wbvshVOw8197d60GLJYgS6+WQu bi3Otx4Nqjc51xbVjR1sR9fDsIOMFsdiHwyHv/3/4e1/kiwbuyYZ58wItg6WJ6i0OZ4+ v6ww== X-Gm-Message-State: AOAM531L1FZMV3O2WBkQvKR+gigtObGKqY2BJGLa+2DF65qLhZ65yPqb T3SIQ0SF7i383U/IGjBnBAuEuUEl6VlD2g== X-Google-Smtp-Source: ABdhPJxluaZf/MmtCpeunA6Ymnh9fdOpG5NRF/w8wZVhbb7/+0LPtrF+0gs0rPN83QRG2lHpzYcG8Q== X-Received: by 2002:adf:a4d0:: with SMTP id h16mr20793873wrb.52.1614678465200; Tue, 02 Mar 2021 01:47:45 -0800 (PST) Original-Received: from localhost (host86-186-80-154.range86-186.btcentralplus.com. [86.186.80.154]) by smtp.gmail.com with ESMTPSA id o13sm32123214wro.15.2021.03.02.01.47.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 01:47:44 -0800 (PST) Content-Disposition: inline In-Reply-To: <87tupuneuy.fsf@gnu.org> X-Operating-System: Linux/5.8.13-100.fc31.x86_64 (x86_64) X-Uptime: 09:46:10 up 83 days, 14:30, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=andrew.burgess@embecosm.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17334 Archived-At: * Ludovic Court=C3=A8s [2021-03-02 09:23:33 +0100]: > Hi Andrew, >=20 > Andrew Burgess skribis: >=20 > > My concerns are based on this page of the guile manual: > > > > https://www.gnu.org/software/guile/manual/html_node/Compilation.html#= Compilation > > > > specifically this: > > > > "... Guile does not yet do proper dependency tracking, so that if > > file a.scm uses macros from b.scm, and b.scm changes, a.scm would > > not be automatically recompiled." >=20 > Yes. Concretely, that means you can either use Makefiles or similar > (like with most other languages) or turn off auto-compilation (with > =E2=80=98--no-auto-compile=E2=80=99 or with =E2=80=98GUILE_AUTO_COMPILE= =3D0=E2=80=99). >=20 > > So, my current thinking is to wrap the invocation of the guile script > > in a shell script, which _always_ forces recompilation. But, if I'm > > doing that, I may as well just disable compilation completely. But > > this doesn't seem right. > > > > So, I'm sure I must be missing something here. How do others deal > > with this situation? >=20 > Common practice is to have makefiles or similar as part of your > software. When you run =E2=80=9Cmake=E2=80=9D, it runs =E2=80=98guild co= mpile=E2=80=99 to compile all > your Scheme source; upon =E2=80=9Cmake install=E2=80=9D, both .scm and .g= o files are > installed. >=20 > Here=E2=80=99s an example that does that using the GNU autotools: >=20 > https://notabug.org/cwebber/guile-gcrypt >=20 > For a pure Guile project, Guile Hall helps get started: >=20 > https://gitlab.com/a-sassmannshausen/guile-hall >=20 Many thanks. I knew I must be missing something. It never occurred to me that I should be pre-compiling the project. I'll investigate the two solutions you've proposed. Thanks again, Andrew