From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: configuring apps for guile Date: Sun, 16 Feb 2020 07:28:47 -0800 Message-ID: References: <5f967b74-9704-bd49-de82-97a2f1c665df@gmail.com> <87tv3q1tco.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="36378"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: Guile User To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Feb 16 16:29:04 2020 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 1j3Lqx-0009Is-Ma for guile-user@m.gmane-mx.org; Sun, 16 Feb 2020 16:29:03 +0100 Original-Received: from localhost ([::1]:33348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3Lqw-00051m-PW for guile-user@m.gmane-mx.org; Sun, 16 Feb 2020 10:29:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39537) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3Lqn-00051R-8P for guile-user@gnu.org; Sun, 16 Feb 2020 10:28:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3Lql-0005Yr-0a for guile-user@gnu.org; Sun, 16 Feb 2020 10:28:52 -0500 Original-Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:33699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3Lqk-0005XQ-R4; Sun, 16 Feb 2020 10:28:50 -0500 Original-Received: by mail-pl1-x636.google.com with SMTP id ay11so5717103plb.0; Sun, 16 Feb 2020 07:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=uR1WZ81GxPPew3zKl2Rej3bmtGaYITfkbNSr6zJFVzE=; b=NTiRUgl9tl8fys0UrJJQl+DeC4hQT+Roxjnq3HtbKLfgnqhpDYOLsXvvfl4EpfsTfl nsHxwse5ZrO61/CcfXDlyICnIXrbANVzDZ+k+PocAC3TWlgTaBVXGAks0hzuWR6rcDF5 Ye6JAfKRlYyjoAg7VpRVbuZ5QHgvVz13xzuGmAZOc7WZ3wgsPqZuKCSZu+UB9TNEI15R Jo092TPZ9qIIgrUhAgF7Zc2m6kjwM/aSv/knM0rJu/rIBrS1jVMa3c19NXLCuWifvxQG cURz3VVxu+SlL44FgiNm0Vyo1tv9942lT7A7N/Mdfb4PHLxRpkI3JYApWtz8wqHlWmIc Crrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=uR1WZ81GxPPew3zKl2Rej3bmtGaYITfkbNSr6zJFVzE=; b=tFhd/j1ZN1aW+L+FI9hEAZVMx8caMmNNFU8XwmCoOVEoq26uivy0kKJ4bxlq8KHP3P +MrfG+8wcq0QtE9eE4XqerfBkZ4LsL30kRCqAAoBrS+pdYmCpfLp7DJa9CHXe3GEGEmb h8HrrVEKHDdXDCGgwdkASTEK9nGxYRXtrnQZl2aoFcobR0ZnQgjipktUGCk9h8I4nCc0 COPLhvLBgO1m/fCrhSR2hp85G6JaSdhgfuzgy/iD1RyBAdr6nJeRiBfWYfAmDg/Gsy8D gv2grQlhxFyLXbaOpi6yNShlaUDhmYW0jbKBTlXxdWtfD3pPVjMhcfA9TiWzlZe4pBAC cS8A== X-Gm-Message-State: APjAAAVJKTnDQOXRpdSN4xuByVgq1aBl5bN2s35IPyBUq1ulQVBY+x3G 00o27jnWZPZNoQovUJZDu0TaSO8l X-Google-Smtp-Source: APXvYqxfYB9nfNWRnvbuq+M9bizocyz4tAXkdJO9iSkCwJh0/7j59PRYoEUuwirmZtjNgK6Kn+TAlg== X-Received: by 2002:a17:902:8f8e:: with SMTP id z14mr12463835plo.195.1581866929189; Sun, 16 Feb 2020 07:28:49 -0800 (PST) Original-Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id i3sm13291457pfg.94.2020.02.16.07.28.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Feb 2020 07:28:48 -0800 (PST) In-Reply-To: <87tv3q1tco.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::636 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:16181 Archived-At: On 2/16/20 6:48 AM, Ludovic Courtès wrote: > Hello Matt, > > Matt Wette skribis: > >> From configure.ac: >> >> guile_build_prefix=`$GUILE -c "(display (assq-ref %guile-build-info >> 'prefix))"` >> >> if test "$guile_build_prefix" == "$prefix"; then >>   echo "using paths for installed guile" >>   GUILE_SITE_DIR >>   GUILE_SITE_GO_DIR >>   GUILE_DATA_DIR >> else >>   echo "using default paths for guile" >>   GUILE_SITE=$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION >> GUILE_SITE_GO=$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache >>   GUILE_DATA=$prefix/share >>   AC_SUBST([GUILE_SITE]) >>   AC_SUBST([GUILE_SITE_GO]) >>   AC_SUBST([GUILE_DATA]) >> fi > I would recommend not even bothering with the first part of the ‘if’, > and instead always default to install files under $prefix (more > precisely: under $datadir and $libdir). > > The bits I’ve been using are: > > configure.ac: > > dnl We require guile.m4, from Guile. Make sure it's available. > m4_pattern_forbid([^GUILE_P]) > m4_pattern_allow([^GUILE_PKG_ERRORS]) > > GUILE_PKG([3.0 2.2 2.0]) > GUILE_PROGS > > Makefile.am: > > moddir = $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION) > godir = $(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache > > SOURCES = a.scm b.scm c.scm > GOBJECTS = $(SOURCES:%.scm=%.go) > nobase_mod_DATA = $(SOURCES) > nobase_go_DATA = $(GOBJECTS) > > I believe Hall¹ does the right thing, making it easier to get started > with all this! > > Thanks, > Ludo’. > > ¹ https://gitlab.com/a-sassmannshausen/guile-hall > What if you have a system that gives this (e.g., Ubuntu 18.04): mwette$ /usr/bin/guile -c "(display (assq-ref %guile-build-info 'prefix)) (newline)" /usr mwette$ /usr/bin/guile -c "(display (%site-ccache-dir)) (newline)" /usr/lib/x86_64-linux-gnu/guile/2.2/site-ccache I'm not sure that guile will find .go files installed in /usr/lib/guile/2.2/site-ccache.