From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ricardo Wurmus Newsgroups: gmane.lisp.guile.user Subject: Re: build system for pure Guile library (was Re: Help making a GNU Guix package for pure GNU Guile library) Date: Thu, 04 Feb 2021 01:09:08 +0100 Message-ID: <87v9b8elsr.fsf@elephly.net> References: <87y2gagm8n.fsf@elephly.net> <20210131002501.szumrlgssp6thhge@pelzflorian.localdomain> <87mtwphb63.fsf@elephly.net> <87pn1l5d78.fsf@web.de> <955c4811-724a-4f9c-1704-59a21b5d9916@posteo.de> 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="2546"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.13; emacs 27.1 Cc: guile-user@gnu.org To: Zelphir Kaltstahl Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Feb 04 01:09:43 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 1l7SDP-0000Wd-IP for guile-user@m.gmane-mx.org; Thu, 04 Feb 2021 01:09:43 +0100 Original-Received: from localhost ([::1]:56478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7SDK-0005hE-IS for guile-user@m.gmane-mx.org; Wed, 03 Feb 2021 19:09:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7SD2-0005gz-Pj for guile-user@gnu.org; Wed, 03 Feb 2021 19:09:20 -0500 Original-Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7SD1-000781-20 for guile-user@gnu.org; Wed, 03 Feb 2021 19:09:20 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1612397354; cv=none; d=zohomail.com; s=zohoarc; b=M7c1heoVWNU32heRJXDFp+EKLIiCruWtofl+Ljz/mERFdtChdKSYByBTQyX4uk+MqKy1dpU4tXMJMnu5Pdk5Ge11V5gDbFkDbE1qzxYCArR3gobBYYtP+SqYe0DZORy2P/AULZhcJtP+sFm/9Dmjv9ZJzqsZTnNXaDBvV8Am7cE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612397354; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=PD8r16GBOoKZGyC5kczpyqAL/OcMP7xRWHnMVvf8vNU=; b=itFm2JhQVgMt1pLxK8rgrnoJtwycEbEjqoSm3/IuxgJkrg6VwjIFR6g4dMD30MOOWM7mkOEUu3d8rSzQ2soSvAa8M12UUL04JEur8YIN1/E/S00GKEjq29S5zqTm2SB4t6V7gaV2SDxyRSaPmdCzze4+9QSuNzYT22UPsQAan/A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1612397354; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=PD8r16GBOoKZGyC5kczpyqAL/OcMP7xRWHnMVvf8vNU=; b=IHkKNOCi+Yml/bq/M3p8Ns+xm3DnBdn9zumgKkHcPwbUJzhnPfoFU99MJ/7utHs0 nPkMAF7OZMThB1piYFM/MHFNzbUEAyMNBKobbmzgBkACgFs2gtkFgDwR6R56J96qRBm 6mT42rNHh8o/glXYPB1+17DgFv0oGAukmfGUrX4M= Original-Received: from localhost (p54ad40d0.dip0.t-ipconnect.de [84.173.64.208]) by mx.zohomail.com with SMTPS id 1612397352557476.0953083480946; Wed, 3 Feb 2021 16:09:12 -0800 (PST) In-reply-to: <955c4811-724a-4f9c-1704-59a21b5d9916@posteo.de> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 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_BL_SPAMCOP_NET=1.347, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:17226 Archived-At: Zelphir Kaltstahl writes: > Do you have an example for when one would bake in > system-specific data-paths? To satisfy distribution packaging standards your project files may end up in different directories and cannot assume that the relative relationship between files remains unchanged. So if you include images, for example, and your code loads them then your code cannot assume that they are both in the same directory. Your compiled code may end up in a sub-directory of ${prefix}/lib/guile/3.0/site-ccache while your image data might end up in ${prefix}/share/${application_name}/images. Or it could be something completely different. Conventional =E2=80=9Cconfigure=E2=80=9D scripts (as= generated by autoconf) give the user the ability to overwrite default locations by passing =E2=80=9C--prefix=E2=80=9D, =E2=80=9C--localstatedir=E2=80=9D, =E2= =80=9C--libdir=E2=80=9D, =E2=80=9C--datadir=E2=80=9D, =E2=80=9C--datarootdir=E2=80=9D, etc. The fewer assumptions your code makes about locations the happier the distro packagers will be. Autoconf and Automake let you record configured locations by replacing @placeholders@ in template files ending on =E2=80=9C.in=E2=80=9D. Often you=E2=80=99d have a config.scm.in = that contains references to these placeholders and is converted to config.scm during the run of the =E2=80=9Cconfigure=E2=80=9D script. --=20 Ricardo