unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: configuring apps for guile
Date: Sun, 16 Feb 2020 07:28:47 -0800	[thread overview]
Message-ID: <b72887eb-ec1e-b235-a46a-441ec70c928a@gmail.com> (raw)
In-Reply-To: <87tv3q1tco.fsf@gnu.org>

On 2/16/20 6:48 AM, Ludovic Courtès wrote:
> Hello Matt,
>
> Matt Wette <matt.wette@gmail.com> 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.





  reply	other threads:[~2020-02-16 15:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 13:54 configuring apps for guile Matt Wette
2020-02-12 14:04 ` Matt Wette
2020-02-13  6:59   ` Jeremy Korwin-Zmijowski
2020-02-13 21:59 ` Jan Wedekind
2020-02-16 14:48 ` Ludovic Courtès
2020-02-16 15:28   ` Matt Wette [this message]
2020-02-16 15:43     ` Matt Wette
2020-02-16 15:44       ` Matt Wette
2020-02-16 17:57     ` Ludovic Courtès
2020-02-16 18:12       ` Matt Wette
2020-02-17  9:21         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b72887eb-ec1e-b235-a46a-441ec70c928a@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).