1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 12:50:14 +02:00

clarify bundling documentation and improve autoconf macro

2006-07-06  Paolo Bonzini  <bonzini@gnu.org>
	    Ludovic Courtes  <ludovic.courtes@laas.fr>

	* doc/using.texi: Clarify "Using autoconf" section
	and rename it to "Bundling lightning"
	* lightning.m4: Work also if lightning is not bundled.

Patches applied:

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-2
   Fixed `LIGHTNING_CONFIGURE_IF_NOT_FOUND' in the case where `lightning.h' is not found.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-23
This commit is contained in:
Paolo Bonzini 2006-07-10 09:43:04 +00:00
parent 50b6e40e0d
commit e193b0939a
6 changed files with 63 additions and 32 deletions

View file

@ -1,3 +1,10 @@
2006-07-06 Paolo Bonzini <bonzini@gnu.org>
Ludovic Courtes <ludovic.courtes@laas.fr>
* doc/using.texi: Clarify "Using autoconf" section
and rename it to "Bundling lightning"
* lightning.m4: Work also if lightning is not bundled.
2006-07-06 Paolo Bonzini <bonzini@gnu.org>
Ludovic Courtes <ludovic.courtes@laas.fr>

View file

@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = 1.7 gnu
SUBDIRS = . doc lightning opcode tests
EXTRA_DIST = config/texi2dvi config/help2man
noinst_HEADERS = lightning.h
include_HEADERS = lightning.h
aclocaldir = $(datadir)/aclocal
dist_aclocal_DATA = lightning.m4

View file

@ -40,7 +40,7 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = README $(am__configure_deps) $(dist_aclocal_DATA) \
$(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(srcdir)/lightningize.in \
$(top_srcdir)/configure AUTHORS COPYING COPYING.DOC \
COPYING.LESSER ChangeLog INSTALL NEWS THANKS \
@ -57,7 +57,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = lightningize
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(aclocaldir)"
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(aclocaldir)" \
"$(DESTDIR)$(includedir)"
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
SOURCES =
@ -76,7 +77,8 @@ am__vpath_adj = case $$p in \
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
dist_aclocalDATA_INSTALL = $(INSTALL_DATA)
DATA = $(dist_aclocal_DATA)
HEADERS = $(noinst_HEADERS)
includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(include_HEADERS)
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
@ -190,7 +192,7 @@ target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = 1.7 gnu
SUBDIRS = . doc lightning opcode tests
EXTRA_DIST = config/texi2dvi config/help2man
noinst_HEADERS = lightning.h
include_HEADERS = lightning.h
aclocaldir = $(datadir)/aclocal
dist_aclocal_DATA = lightning.m4
bin_SCRIPTS = lightningize
@ -287,6 +289,23 @@ uninstall-dist_aclocalDATA:
echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
done
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
rm -f "$(DESTDIR)$(includedir)/$$f"; \
done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@ -567,7 +586,7 @@ check: check-recursive
all-am: Makefile $(SCRIPTS) $(DATA) $(HEADERS) config.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(aclocaldir)"; do \
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
@ -613,7 +632,7 @@ info: info-recursive
info-am:
install-data-am: install-dist_aclocalDATA
install-data-am: install-dist_aclocalDATA install-includeHEADERS
install-exec-am: install-binSCRIPTS
@ -642,7 +661,7 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-binSCRIPTS uninstall-dist_aclocalDATA \
uninstall-info-am
uninstall-includeHEADERS uninstall-info-am
uninstall-info: uninstall-info-recursive
@ -654,13 +673,14 @@ uninstall-info: uninstall-info-recursive
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-binSCRIPTS \
install-data install-data-am install-dist_aclocalDATA \
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-binSCRIPTS uninstall-dist_aclocalDATA \
install-exec install-exec-am install-includeHEADERS \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-binSCRIPTS \
uninstall-dist_aclocalDATA uninstall-includeHEADERS \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View file

@ -4,11 +4,11 @@
@macro usingmenu{}
@ifset USING
* Installation:: Configuring and installing GNU lightning
* The instruction set:: The RISC instruction set used i GNU lightning
* GNU lightning macros:: GNU lightning's macros
* Reentrancy:: Re-entrant usage of GNU lightning
* Autoconf support:: Using @code{autoconf} with GNU lightning
* Installation:: Configuring and installing GNU lightning
* The instruction set:: The RISC instruction set used i GNU lightning
* GNU lightning macros:: GNU lightning's macros
* Reentrancy:: Re-entrant usage of GNU lightning
* Bundling GNU lightning:: Using GNU lightning in your programs
@end ifset
@end macro

View file

@ -1163,8 +1163,8 @@ constant. Of course, expressions like @code{JIT_R0} and
@code{JIT_R(0)} denote the same register, and likewise for
integer callee-saved, or floating-point, registers.
@node Autoconf support
@chapter Using @code{autoconf} with @lightning{}
@node Bundling GNU lightning
@chapter Using @lightning{} in your programs
It is very easy to include @lightning{}'s source code (without the
documentation and examples) into your program's distribution
@ -1180,10 +1180,13 @@ distribution directory.
@end example
@noindent
If you're using Automake, you might be pleased to know that
This will copy the source code for the @lightning{} back ends
into the @file{lightning} directory of your package.
@item If you're using Automake, you might be pleased to know that
@file{Makefile.am} files will be already there.
@item If you're not using Automake and @code{aclocal}, instead,
If you're not using Automake and @code{aclocal}, instead,
you should delete the @file{Makefile.am} files (they are of no use
to you) and copy the contents of the @file{lightning.m4} file, found in
@command{aclocal}'s macro repository (usually @file{/usr/share/aclocal},
@ -1195,12 +1198,12 @@ macro in your @file{configure.in} file.
@code{LIGHTNING_CONFIGURE_IF_NOT_FOUND} will first look for a
pre-installed copy of @lightning{} and, if it can be found, it will
use it; otherwise, it will do exactly the same things that
@lightning{}'s own configure script does. If @lightning{} is
already installed, or if the configuration process succeeds, it
will define the @code{HAVE_LIGHTNING} symbol.
use it; otherwise, it will test if there is a back-end for the host
system. If @lightning{} is already installed, or if the system is
supported by lightning, it will define the @code{HAVE_LIGHTNING}
symbol.
In addtion, an Automake conditional named @code{HAVE_INSTALLED_LIGHTNING}
In addition, an Automake conditional named @code{HAVE_INSTALLED_LIGHTNING}
will be set if @lightning{} is already installed, which can be used to
set up include paths appropriately.

View file

@ -18,12 +18,13 @@ else
powerpc) cpu_subdir=ppc ;;
*) ;;
esac
test -n "$cpu_subdir" && lightning=yes
test -n "$cpu_subdir" && test -d "$srcdir/lightning/$cpu_subdir" && \
lightning=yes
fi
ifdef([AC_HELP_STRING], [
dnl autoconf 2.50 style
if test -n "$cpu_subdir"; then
if test -n "$cpu_subdir" && test -d "$srcdir/lightning/$cpu_subdir"; then
AC_CONFIG_LINKS(lightning/asm.h:lightning/$cpu_subdir/asm.h
lightning/core.h:lightning/$cpu_subdir/core.h
lightning/fp.h:lightning/$cpu_subdir/fp.h
@ -34,7 +35,7 @@ ifdef([AC_HELP_STRING], [
], [
dnl autoconf 2.13 style
AC_OUTPUT_COMMANDS([
if test -n "$cpu_subdir"; then
if test -n "$cpu_subdir" && test -d "$srcdir/lightning/$cpu_subdir"; then
for i in asm fp core funcs; do
echo linking $srcdir/lightning/$cpu_subdir/$i.h to lightning/$i.h
(cd lightning && $LN_S -f $srcdir/$cpu_subdir/$i.h $i.h)