guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installing scheme only programs


From: Tristan Colgate-McFarlane
Subject: Re: Installing scheme only programs
Date: Thu, 10 Mar 2011 09:57:56 +0000

I use the following trick to get things into the guile site directory
(and still pass a make distcheck).

In configure.ac
GUILE_PROGS
GUILE_FLAGS
GUILE_SITE_DIR

GUILE_PREFIX=`$GUILE_CONFIG info prefix`
AC_SUBST(GUILE_PREFIX)

In src/Makefile.am:
SUFFIXES = .scm .go
.scm.go:
        $(top_srcdir)/build-environ $(GUILE_COMPILE) -o "$@" "$<"

guilesite = @GUILE_SITE@
guileprefix = @GUILE_PREFIX@
guilesitesuffix = `echo $(guilesite) | sed -e 's!^$(guileprefix)!!'`
guilesnmpdir =  $(exec_prefix)/$(guilesitesuffix)/snmp
guilesnmp_DATA = $(SCHEMESOURCES) $(GOBJECTS)

On Thu, 2011-03-10 at 03:50 -0300, Diogo F.S.Ramos wrote: 
> I have a program written entirely in guile's scheme and I use
> autotools to distribute it.
> 
> Is there a guide to distribute guile programs?
> 
> I know that some languages have, but I can see any in the guile docs.
> 
> My biggest concern is about the .scm files that makes up my program.
> 
> For those who know autotools, I'm using pkgdata to install the files
> and them I use (load "/path/to/.scm") from a simple executable
> script. But it got me thinking that the .scm files are not exactly
> data.
> 
> I was thinking that the 'module' facility of guile could be the
> solution. I install them where guile's modules are installed and use
> (use-modules) to load. But then again, my .scm are not exactly modules
> because they are not, in any way, made for general purpose use.
> 
> I recently learn a technique where, during 'make', one 'cat' all the
> sources files together, forming a big, single executable script. Doing
> so, there is no need to install the .scm files, because they are all
> inside the same executable file.
> 
> This technique needs a little care, but is definitely doable, as I did
> a scratch of it and it works, although I felt that the bigger file
> made my application take a little more time to start than separate
> loaded files. I didn't do any benchmark, so don't take my word on it.
> 
> So, what do you guys think?
> 
> Is there a proper way to distribute and install scheme only programs?
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]