unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Matt Wette <matt.wette@gmail.com>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: configuring apps for guile
Date: Sun, 16 Feb 2020 15:48:07 +0100	[thread overview]
Message-ID: <87tv3q1tco.fsf@gnu.org> (raw)
In-Reply-To: <5f967b74-9704-bd49-de82-97a2f1c665df@gmail.com> (Matt Wette's message of "Wed, 12 Feb 2020 05:54:18 -0800")

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



  parent reply	other threads:[~2020-02-16 14:48 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 [this message]
2020-02-16 15:28   ` Matt Wette
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=87tv3q1tco.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=matt.wette@gmail.com \
    /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).