summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-03-27 14:03:03 -0700
committerAndy Wingo <wingo@pobox.com>2009-03-27 14:03:03 -0700
commit0b6d8fdc28ed8af56e93157179c305fef037e0a0 (patch)
treeef27c6f315e1f289639bc2febba5907bb313401a
parent0fe95f9c4ce063781e79a15bc123c57c33ef9755 (diff)
allow building against uninstalled guile; move some things to meta/
* README: Add more info about building against an uninstalled Guile. * meta/: New directory. The proximate cause of its creation is that I want to be able to build external packages against uninstalled Guile, and to do that I need guile-tools in the PATH, but I don't want $top_builddir/libtool in the path. But it seems like a good reorganization, for things that are /about/ Guile: pkg-config files, m4 files, guile-config... then we also include uninstalled info: the environment, the pre-inst-guile script, etc. * meta/guile-1.8-uninstalled.pc.in: New pkg-config template. pkg-config prefers -uninstalled pkg-config files, if they are in its path. * meta/Makefile.am: * meta/ChangeLog-2008: * meta/gdb-uninstalled-guile.in: * meta/guile-1.8.pc.in: * meta/guile-config.in: * meta/guile.m4: * meta/guile-tools.in: Moved to meta/. * meta/guile.in: This is the new name of pre-inst-guile.in. * meta/uninstalled-env.in: And this, pre-inst-guile-env.in. * Makefile.am: * am/guilec: * am/pre-inst-guile: * check-guile.in: * configure.in: * doc/ref/Makefile.am: * gc-benchmarks/run-benchmark.scm: * test-suite/standalone/Makefile.am: * test-suite/standalone/README: * testsuite/Makefile.am: Adapt to meta/ change.
-rw-r--r--Makefile.am9
-rw-r--r--README20
-rw-r--r--am/guilec2
-rw-r--r--am/pre-inst-guile2
-rw-r--r--check-guile.in4
-rw-r--r--configure.in14
-rw-r--r--doc/ref/Makefile.am4
-rwxr-xr-xgc-benchmarks/run-benchmark.scm2
-rw-r--r--meta/ChangeLog-2008 (renamed from guile-config/ChangeLog-2008)0
-rw-r--r--meta/Makefile.am (renamed from guile-config/Makefile.am)25
-rw-r--r--meta/gdb-uninstalled-guile.in (renamed from gdb-pre-inst-guile.in)10
-rw-r--r--meta/guile-1.8-uninstalled.pc.in8
-rw-r--r--meta/guile-1.8.pc.in (renamed from guile-1.8.pc.in)0
-rw-r--r--meta/guile-config.in (renamed from guile-config/guile-config.in)4
-rw-r--r--meta/guile-tools.in (renamed from guile-tools.in)0
-rw-r--r--meta/guile.in (renamed from pre-inst-guile.in)6
-rw-r--r--meta/guile.m4 (renamed from guile-config/guile.m4)0
-rw-r--r--meta/uninstalled-env.in (renamed from pre-inst-guile-env.in)17
-rw-r--r--test-suite/standalone/Makefile.am2
-rw-r--r--test-suite/standalone/README2
-rw-r--r--testsuite/Makefile.am2
21 files changed, 74 insertions, 59 deletions
diff --git a/Makefile.am b/Makefile.am
index 556b32141..0e61f531d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,16 +24,14 @@
#
AUTOMAKE_OPTIONS = 1.10
-SUBDIRS = lib libguile guile-config guile-readline emacs \
+SUBDIRS = lib meta libguile guile-readline emacs \
scripts srfi doc examples test-suite benchmark-suite lang am \
module testsuite
-bin_SCRIPTS = guile-tools
-
include_HEADERS = libguile.h
EXTRA_DIST = LICENSE HACKING GUILE-VERSION \
- m4/ChangeLog-2008 FAQ guile-1.8.pc.in \
+ m4/ChangeLog-2008 FAQ \
m4/autobuild.m4 ChangeLog-2008
TESTS = check-guile
@@ -42,7 +40,4 @@ ACLOCAL_AMFLAGS = -I m4
DISTCLEANFILES = check-guile.log
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = guile-1.8.pc
-
# Makefile.am ends here
diff --git a/README b/README
index 3af511b38..4e295f805 100644
--- a/README
+++ b/README
@@ -223,9 +223,23 @@ GUILE_FOR_BUILD variable, it defaults to just "guile".
Using Guile Without Installing It =========================================
-The top directory of the Guile sources contains a script called
-"pre-inst-guile" that can be used to run the Guile that has just been
-built.
+The "meta/" subdirectory of the Guile sources contains a script called
+"guile" that can be used to run the Guile that has just been built. Note
+that this is not the same "guile" as the one that is installed; this
+"guile" is a wrapper script that sets up the environment appropriately,
+then invokes the Guile binary.
+
+You may also build against an uninstalled Guile build tree. The
+"uninstalled-env" script in the "meta/" subdirectory will set up an
+environment with a path including "meta/", a modified dynamic linker
+path, a modified PKG_CONFIG_PATH, etc.
+
+For example, you can enter this environment via invoking
+
+ meta/uninstalled-env bash
+
+Within that shell, other packages should be able to build against
+uninstalled Guile.
Installing SLIB ===========================================================
diff --git a/am/guilec b/am/guilec
index aaa1747eb..fc2bdd0fa 100644
--- a/am/guilec
+++ b/am/guilec
@@ -10,6 +10,6 @@ CLEANFILES = $(GOBJECTS)
SUFFIXES = .scm .go
.scm.go:
$(MKDIR_P) `dirname $@`
- $(top_builddir)/pre-inst-guile \
+ $(top_builddir)/meta/guile \
-l $(top_builddir)/libguile/stack-limit-calibration.scm \
$(top_srcdir)/scripts/compile -o "$@" "$<"
diff --git a/am/pre-inst-guile b/am/pre-inst-guile
index c1a7407c9..353908dfb 100644
--- a/am/pre-inst-guile
+++ b/am/pre-inst-guile
@@ -28,7 +28,7 @@
## Code:
-preinstguile = $(top_builddir_absolute)/pre-inst-guile
+preinstguile = $(top_builddir_absolute)/meta/guile
preinstguiletool = GUILE="$(preinstguile)" $(top_srcdir)/scripts
## am/pre-inst-guile ends here
diff --git a/check-guile.in b/check-guile.in
index 9ee2ea3f6..1c0101275 100644
--- a/check-guile.in
+++ b/check-guile.in
@@ -1,6 +1,6 @@
#! /bin/sh
# Usage: check-guile [-i GUILE-INTERPRETER] [GUILE-TEST-ARGS]
-# If `-i GUILE-INTERPRETER' is omitted, use ${top_builddir}/pre-inst-guile.
+# If `-i GUILE-INTERPRETER' is omitted, use ${top_builddir}/meta/guile.
# See ${top_srcdir}/test-suite/guile-test for documentation on GUILE-TEST-ARGS.
#
# Example invocations:
@@ -21,7 +21,7 @@ if [ x"$1" = x-i ] ; then
shift
shift
else
- guile=${top_builddir}/pre-inst-guile
+ guile=${top_builddir}/meta/guile
fi
GUILE_LOAD_PATH=$TEST_SUITE_DIR
diff --git a/configure.in b/configure.in
index 60166d80f..68d0d6a24 100644
--- a/configure.in
+++ b/configure.in
@@ -1532,13 +1532,13 @@ AC_CONFIG_FILES([
doc/tutorial/Makefile
emacs/Makefile
examples/Makefile
- guile-config/Makefile
lang/Makefile
libguile/Makefile
scripts/Makefile
srfi/Makefile
test-suite/Makefile
test-suite/standalone/Makefile
+ meta/Makefile
module/Makefile
module/ice-9/Makefile
module/ice-9/debugger/Makefile
@@ -1549,13 +1549,15 @@ AC_CONFIG_FILES([
testsuite/Makefile
])
-AC_CONFIG_FILES([guile-1.8.pc])
+AC_CONFIG_FILES([meta/guile-1.8.pc])
+AC_CONFIG_FILES([meta/guile-1.8-uninstalled.pc])
AC_CONFIG_FILES([check-guile], [chmod +x check-guile])
AC_CONFIG_FILES([benchmark-guile], [chmod +x benchmark-guile])
-AC_CONFIG_FILES([guile-tools], [chmod +x guile-tools])
-AC_CONFIG_FILES([pre-inst-guile], [chmod +x pre-inst-guile])
-AC_CONFIG_FILES([pre-inst-guile-env], [chmod +x pre-inst-guile-env])
-AC_CONFIG_FILES([gdb-pre-inst-guile], [chmod +x gdb-pre-inst-guile])
+AC_CONFIG_FILES([meta/guile-config], [chmod +x meta/guile-config])
+AC_CONFIG_FILES([meta/guile-tools], [chmod +x meta/guile-tools])
+AC_CONFIG_FILES([meta/guile], [chmod +x meta/guile])
+AC_CONFIG_FILES([meta/uninstalled-env], [chmod +x meta/uninstalled-env])
+AC_CONFIG_FILES([meta/gdb-uninstalled-guile], [chmod +x meta/gdb-uninstalled-guile])
AC_CONFIG_FILES([libguile/guile-snarf],
[chmod +x libguile/guile-snarf])
AC_CONFIG_FILES([libguile/guile-doc-snarf],
diff --git a/doc/ref/Makefile.am b/doc/ref/Makefile.am
index 9799a5e0b..d534351dd 100644
--- a/doc/ref/Makefile.am
+++ b/doc/ref/Makefile.am
@@ -89,8 +89,8 @@ include $(top_srcdir)/am/pre-inst-guile
# Automated snarfing
autoconf.texi: autoconf-macros.texi
-autoconf-macros.texi: $(top_srcdir)/guile-config/guile.m4
- $(preinstguiletool)/snarf-guile-m4-docs $(top_srcdir)/guile-config/guile.m4 \
+autoconf-macros.texi: $(top_srcdir)/meta/guile.m4
+ $(preinstguiletool)/snarf-guile-m4-docs $(top_srcdir)/meta/guile.m4 \
> $(srcdir)/$@
lib-version.texi: $(top_srcdir)/GUILE-VERSION
diff --git a/gc-benchmarks/run-benchmark.scm b/gc-benchmarks/run-benchmark.scm
index 509f978ee..a50fb48c2 100755
--- a/gc-benchmarks/run-benchmark.scm
+++ b/gc-benchmarks/run-benchmark.scm
@@ -233,7 +233,7 @@ Report bugs to <bug-guile@gnu.org>.~%"))
(ref-env (assoc-ref args 'reference-environment))
(bdwgc-env (or (assoc-ref args 'bdwgc-environment)
(string-append "GUILE=" bench-dir
- "/../pre-inst-guile")))
+ "/../meta/guile")))
(prof-opts (assoc-ref args 'profile-options)))
(for-each (lambda (benchmark)
(let ((ref (parse-result (run-reference-guile ref-env
diff --git a/guile-config/ChangeLog-2008 b/meta/ChangeLog-2008
index d450f2536..d450f2536 100644
--- a/guile-config/ChangeLog-2008
+++ b/meta/ChangeLog-2008
diff --git a/guile-config/Makefile.am b/meta/Makefile.am
index cedcba968..76544b30d 100644
--- a/guile-config/Makefile.am
+++ b/meta/Makefile.am
@@ -20,27 +20,14 @@
## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
## Floor, Boston, MA 02110-1301 USA
-bin_SCRIPTS=guile-config
-CLEANFILES=guile-config
-EXTRA_DIST=guile-config.in guile.m4 ChangeLog-2008
+bin_SCRIPTS=guile-config guile-tools
+EXTRA_DIST=guile-config.in guile-tools.in guile.m4 ChangeLog-2008 \
+ guile-1.8.pc.in guile-1.8-uninstalled.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = guile-1.8.pc
## FIXME: in the future there will be direct automake support for
## doing this. When that happens, switch over.
aclocaldir = $(datadir)/aclocal
aclocal_DATA = guile.m4
-
-## We use @-...-@ as the substitution brackets here, instead of the
-## usual @...@, so autoconf doesn't go and substitute the values
-## directly into the left-hand sides of the sed substitutions. *sigh*
-guile-config: guile-config.in ${top_builddir}/libguile/libpath.h
- rm -f guile-config.tmp
- sed < ${srcdir}/guile-config.in > guile-config.tmp \
- -e 's|@-bindir-@|${bindir}|' \
- -e s:@-GUILE_VERSION-@:${GUILE_VERSION}:
- chmod +x guile-config.tmp
- mv guile-config.tmp guile-config
-
-## Get rid of any copies of the configuration script under the old
-## name, so people don't end up running ancient copies of it.
-install-exec-local:
- rm -f ${bindir}/build-guile
diff --git a/gdb-pre-inst-guile.in b/meta/gdb-uninstalled-guile.in
index d1f4e38ec..457ab2bd7 100644
--- a/gdb-pre-inst-guile.in
+++ b/meta/gdb-uninstalled-guile.in
@@ -21,18 +21,18 @@
# Commentary:
-# Usage: gdb-pre-inst-guile [ARGS]
+# Usage: gdb-uninstalled-guile [ARGS]
#
# This script runs Guile from the build tree under GDB. See
-# ./pre-inst-guile for more information.
+# ./guile for more information.
#
-# In addition to running ./gdb-pre-inst-guile, sometimes it's useful to
-# run e.g. ./check-guile -i ./gdb-pre-inst-guile foo.test.
+# In addition to running ./gdb-uninstalled-guile, sometimes it's useful to
+# run e.g. ./check-guile -i meta/gdb-uninstalled-guile foo.test.
# Code:
set -e
# env (set by configure)
top_builddir="@top_builddir_absolute@"
-exec ${top_builddir}/pre-inst-guile-env libtool --mode=execute \
+exec ${top_builddir}/uninstalled-env libtool --mode=execute \
gdb --args ${top_builddir}/libguile/guile "$@"
diff --git a/meta/guile-1.8-uninstalled.pc.in b/meta/guile-1.8-uninstalled.pc.in
new file mode 100644
index 000000000..50d337fd3
--- /dev/null
+++ b/meta/guile-1.8-uninstalled.pc.in
@@ -0,0 +1,8 @@
+builddir=@abs_top_builddir@
+srcdir=@abs_top_srcdir@
+
+Name: GNU Guile (uninstalled)
+Description: GNU's Ubiquitous Intelligent Language for Extension (uninstalled)
+Version: @GUILE_VERSION@
+Libs: -L${builddir}/libguile -lguile @GUILE_LIBS@
+Cflags: -I${srcdir} -I${builddir} @GUILE_CFLAGS@
diff --git a/guile-1.8.pc.in b/meta/guile-1.8.pc.in
index 15c83d84b..15c83d84b 100644
--- a/guile-1.8.pc.in
+++ b/meta/guile-1.8.pc.in
diff --git a/guile-config/guile-config.in b/meta/guile-config.in
index b782292d8..23c72e237 100644
--- a/guile-config/guile-config.in
+++ b/meta/guile-config.in
@@ -1,4 +1,4 @@
-#!@-bindir-@/guile \
+#!@bindir@/guile \
-e main -s
!#
;;;; guile-config --- utility for linking programs with Guile
@@ -47,7 +47,7 @@
(define program-name #f)
(define subcommand-name #f)
-(define program-version "@-GUILE_VERSION-@")
+(define program-version "@GUILE_VERSION@")
;;; Given an executable path PATH, set program-name to something
;;; appropriate f or use in error messages (i.e., with leading
diff --git a/guile-tools.in b/meta/guile-tools.in
index ca940a0da..ca940a0da 100644
--- a/guile-tools.in
+++ b/meta/guile-tools.in
diff --git a/pre-inst-guile.in b/meta/guile.in
index 5adbabea2..d7bc893e6 100644
--- a/pre-inst-guile.in
+++ b/meta/guile.in
@@ -21,7 +21,7 @@
# Commentary:
-# Usage: pre-inst-guile [ARGS]
+# Usage: guile [ARGS]
#
# This script arranges for the environment to support, and eventaully execs,
# the uninstalled binary guile executable located somewhere under libguile/,
@@ -43,9 +43,9 @@ GUILE=${top_builddir}/libguile/guile
export GUILE
# do it
-exec ${top_builddir}/pre-inst-guile-env $GUILE "$@"
+exec ${top_builddir}/meta/uninstalled-env $GUILE "$@"
# never reached
exit 1
-# pre-inst-guile ends here
+# guile ends here
diff --git a/guile-config/guile.m4 b/meta/guile.m4
index bcded2bdc..bcded2bdc 100644
--- a/guile-config/guile.m4
+++ b/meta/guile.m4
diff --git a/pre-inst-guile-env.in b/meta/uninstalled-env.in
index bb0a81c06..fa8285d94 100644
--- a/pre-inst-guile-env.in
+++ b/meta/uninstalled-env.in
@@ -18,17 +18,17 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-# NOTE: If you update this file, please update pre-inst-guile.in as
+# NOTE: If you update this file, please update uninstalled.in as
# well, if appropriate.
-# Usage: pre-inst-guile-env [ARGS]
+# Usage: uninstalled-env [ARGS]
# This script arranges for the environment to support running Guile
# from the build tree. The following env vars are modified (but not
# clobbered): GUILE_LOAD_PATH, LTDL_LIBRARY_PATH, and PATH.
-# Example: pre-inst-guile-env guile -c '(display "hello\n")'
-# Example: ../../pre-inst-guile-env ./guile-test-foo
+# Example: uninstalled-env guile -c '(display "hello\n")'
+# Example: ../../uninstalled-env ./guile-test-foo
# config
subdirs_with_ltlibs="srfi guile-readline libguile" # maintain me
@@ -83,9 +83,18 @@ export LTDL_LIBRARY_PATH
DYLD_LIBRARY_PATH="${dyld_prefix}${top_builddir}/libguile/.libs:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH
+if [ x"$PKG_CONFIG_PATH" = x ]
+then
+ PKG_CONFIG_PATH="${top_builddir}"
+else
+ PKG_CONFIG_PATH="${top_builddir}:$PKG_CONFIG_PATH"
+fi
+export PKG_CONFIG_PATH
+
# handle PATH (no clobber)
PATH="${top_builddir}/guile-config:${PATH}"
PATH="${top_builddir}/libguile:${PATH}"
+PATH="${top_builddir}/meta:${PATH}"
export PATH
exec "$@"
diff --git a/test-suite/standalone/Makefile.am b/test-suite/standalone/Makefile.am
index 854a4a028..b8d6e81e4 100644
--- a/test-suite/standalone/Makefile.am
+++ b/test-suite/standalone/Makefile.am
@@ -28,7 +28,7 @@ check_SCRIPTS =
BUILT_SOURCES =
EXTRA_DIST =
-TESTS_ENVIRONMENT = "${top_builddir}/pre-inst-guile-env"
+TESTS_ENVIRONMENT = "${top_builddir}/meta/uninstalled-env"
test_cflags = \
-I$(top_srcdir)/test-suite/standalone \
diff --git a/test-suite/standalone/README b/test-suite/standalone/README
index 4e0bd652e..164c6ab46 100644
--- a/test-suite/standalone/README
+++ b/test-suite/standalone/README
@@ -12,7 +12,7 @@ If you want to use a scheme script, prefix it as follows:
!#
Makefile.am will arrange for all tests (scripts or executables) to be
-run under pre-inst-guile-env so that the PATH, LD_LIBRARY_PATH, and
+run under uninstalled-env so that the PATH, LD_LIBRARY_PATH, and
GUILE_LOAD_PATH will be augmented appropriately.
The Makefile.am has an example of creating a shared library to be used
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index c523eff8d..2bc78142c 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -1,5 +1,5 @@
TESTS_ENVIRONMENT = \
- $(top_builddir)/pre-inst-guile \
+ $(top_builddir)/meta/guile \
-l $(srcdir)/run-vm-tests.scm -e run-vm-tests
TESTS = \