aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-09-02 05:09:26 +0000
committerdos-reis <gdr@axiomatics.org>2007-09-02 05:09:26 +0000
commit98cd1f5a4b6469760944d4455c04185d571c67ed (patch)
tree996b82c815c616255defeb7a7a9dad96ef812447
parentc866e56d51d4b19c8e9526137e8ffae5db233ea9 (diff)
downloadopen-axiom-98cd1f5a4b6469760944d4455c04185d571c67ed.tar.gz
2007-09-01 Gabriel Dos Reis <gdr@cs.tamu.edu>
* configure.ac.pamphlet (<<find lisp>>): Keep gcl directory test simple. * Makefile.pamphlet (maybe-cp-noweb-srcdir): New rule. Factored from the rule below. ($(addprefix $(axiom_build_bindir)/, notangle noweave)): Make it a prerequisite. * config/var-def.mk (WEAVE): Export. (WEAVE): Likewise. src/scripts/ 2007-09-01 Gabriel Dos Reis <gdr@cs.tamu.edu> * document.in (TANGLE): New environment variable. Use in place nacked notangle. (WEAVE): New environment variable. Use in place of noweave.
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.in27
-rw-r--r--Makefile.pamphlet27
-rw-r--r--config/var-def.mk3
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
-rw-r--r--configure.ac.pamphlet2
-rw-r--r--src/scripts/ChangeLog6
-rwxr-xr-xsrc/scripts/document.in14
9 files changed, 74 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 58492f77..bdca43cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-09-01 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * configure.ac.pamphlet (<<find lisp>>): Keep gcl directory test
+ simple.
+ * Makefile.pamphlet (maybe-cp-noweb-srcdir): New rule. Factored
+ from the rule below.
+ ($(addprefix $(axiom_build_bindir)/, notangle noweave)): Make it a
+ prerequisite.
+ * config/var-def.mk (WEAVE): Export.
+ (WEAVE): Likewise.
+
2007-08-26 Gabriel Dos Reis <gdr@cs.tamu.edu>
* Makefile.pamphlet ($(AXIOM_SRC_TARGETS)): Don't augment the PATH
diff --git a/Makefile.in b/Makefile.in
index 62150ed2..deb3a906 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -42,16 +42,33 @@ stamp-rootdirs: $(axiom_build_document)
.PHONY: all-noweb
all-noweb: $(addprefix $(axiom_build_bindir)/, notangle noweave)
-$(addprefix $(axiom_build_bindir)/, notangle noweave):
+.PHONY: maybe-cp-noweb-srcdir
+maybe-cp-noweb-srcdir: $(srcdir)/noweb
+ ## Even though out-of-source build is what we recommend,
+ ## noweb does not directly support that sort of build.
+ ## So we copy the source to the build directory.
+ ## We try to be nice to those who chose otherwise
+ ## to build directly from the OpenAxiom source dir.
+ if test "$(srcdir)" != "$(builddir)" -a ! -d noweb; then \
+ cp -r $(srcdir)/noweb $(builddir); \
+ fi
+
+$(addprefix $(axiom_build_bindir)/, notangle noweave): maybe-cp-noweb-srcdir
+ ## Noweb would like to install many things even if we
+ ## are not interested in those. Prepare the ground.
$(mkinstalldirs) $(axiom_build_bindir)
$(mkinstalldirs) $(axiom_build_libdir)
$(mkinstalldirs) $(axiom_build_texdir)
$(mkinstalldirs) $(axiom_build_mandir)
- if test "$(srcdir)" != "$(builddir)" -a ! -d noweb; then \
- cp -r $(srcdir)/noweb $(builddir); \
- fi;
$(TOUCH) $(wildcard $(builddir)/noweb/src/c/*.h) \
- $(wildcard $(builddir)/noweb/src/c/*.c) && \
+ $(wildcard $(builddir)/noweb/src/c/*.c)
+ ## noweb's Makefile needs editing before we can build to suit
+ ## our needs. In particular, we must say when helper programs go,
+ ## where the noweb style file goes, where the man pages go (even though
+ ## in this specific context, they are not needed). Finally,
+ ## noweb insists on running `texhash' after installation, which is
+ ## of no practical value for us in ths specific context. We must
+ ## convince it not to go there.
cd noweb/src && \
cat Makefile \
| sed -e "s,^BIN=.*,BIN=$(axiom_abs_build_bindir)," \
diff --git a/Makefile.pamphlet b/Makefile.pamphlet
index 540467c8..397806be 100644
--- a/Makefile.pamphlet
+++ b/Makefile.pamphlet
@@ -524,16 +524,33 @@ necessary to extract codes and documentations.
.PHONY: all-noweb
all-noweb: $(addprefix $(axiom_build_bindir)/, notangle noweave)
-$(addprefix $(axiom_build_bindir)/, notangle noweave):
+.PHONY: maybe-cp-noweb-srcdir
+maybe-cp-noweb-srcdir: $(srcdir)/noweb
+ ## Even though out-of-source build is what we recommend,
+ ## noweb does not directly support that sort of build.
+ ## So we copy the source to the build directory.
+ ## We try to be nice to those who chose otherwise
+ ## to build directly from the OpenAxiom source dir.
+ if test "$(srcdir)" != "$(builddir)" -a ! -d noweb; then \
+ cp -r $(srcdir)/noweb $(builddir); \
+ fi
+
+$(addprefix $(axiom_build_bindir)/, notangle noweave): maybe-cp-noweb-srcdir
+ ## Noweb would like to install many things even if we
+ ## are not interested in those. Prepare the ground.
$(mkinstalldirs) $(axiom_build_bindir)
$(mkinstalldirs) $(axiom_build_libdir)
$(mkinstalldirs) $(axiom_build_texdir)
$(mkinstalldirs) $(axiom_build_mandir)
- if test "$(srcdir)" != "$(builddir)" -a ! -d noweb; then \
- cp -r $(srcdir)/noweb $(builddir); \
- fi;
$(TOUCH) $(wildcard $(builddir)/noweb/src/c/*.h) \
- $(wildcard $(builddir)/noweb/src/c/*.c) && \
+ $(wildcard $(builddir)/noweb/src/c/*.c)
+ ## noweb's Makefile needs editing before we can build to suit
+ ## our needs. In particular, we must say when helper programs go,
+ ## where the noweb style file goes, where the man pages go (even though
+ ## in this specific context, they are not needed). Finally,
+ ## noweb insists on running `texhash' after installation, which is
+ ## of no practical value for us in ths specific context. We must
+ ## convince it not to go there.
cd noweb/src && \
cat Makefile \
| sed -e "s,^BIN=.*,BIN=$(axiom_abs_build_bindir)," \
diff --git a/config/var-def.mk b/config/var-def.mk
index 874e3b8a..ef7941ea 100644
--- a/config/var-def.mk
+++ b/config/var-def.mk
@@ -211,6 +211,9 @@ axiom_build_nowebdir = $(axiom_builddir)/noweb
TANGLE = @NOTANGLE@
WEAVE = @NOWEAVE@
+## We export TANGLE and WEAVE for use in subshells, such as document.
+export TANGLE
+export WEAVE
AXIOM_LISP = @AXIOM_LISP@
# Extension of the output file name returned by compile-file
diff --git a/configure b/configure
index 39bcf4d2..6e70ce87 100755
--- a/configure
+++ b/configure
@@ -20591,7 +20591,7 @@ fi
## A lisp may not be available AND the GCL source may also
## be missing. Instruct user to either build one or get
## the dependencies from our website.
- if test -z $AXIOM_LISP -a ! -d ${srcdir}/gcl; then
+ if test -z $AXIOM_LISP && test ! -d ${srcdir}/gcl; then
{ { echo "$as_me:$LINENO: error: OpenAxiom needs GCL. Either separately build one, or get the dependency tarball from OpenAxiom website." >&5
echo "$as_me: error: OpenAxiom needs GCL. Either separately build one, or get the dependency tarball from OpenAxiom website." >&2;}
{ (exit 1); exit 1; }; }
diff --git a/configure.ac b/configure.ac
index 9f51d743..7cb5f339 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,7 +144,7 @@ if test -z $axiom_lisp; then
## A lisp may not be available AND the GCL source may also
## be missing. Instruct user to either build one or get
## the dependencies from our website.
- if test -z $AXIOM_LISP -a ! -d ${srcdir}/gcl; then
+ if test -z $AXIOM_LISP && test ! -d ${srcdir}/gcl; then
AC_MSG_ERROR([OpenAxiom needs GCL. Either separately build one, or get the dependency tarball from OpenAxiom website.])
fi
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index 4e130c06..ccce5409 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -770,7 +770,7 @@ if test -z $axiom_lisp; then
## A lisp may not be available AND the GCL source may also
## be missing. Instruct user to either build one or get
## the dependencies from our website.
- if test -z $AXIOM_LISP -a ! -d ${srcdir}/gcl; then
+ if test -z $AXIOM_LISP && test ! -d ${srcdir}/gcl; then
AC_MSG_ERROR([OpenAxiom needs GCL. Either separately build one, or get the dependency tarball from OpenAxiom website.])
fi
diff --git a/src/scripts/ChangeLog b/src/scripts/ChangeLog
index b6f55ee2..86419485 100644
--- a/src/scripts/ChangeLog
+++ b/src/scripts/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-01 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * document.in (TANGLE): New environment variable. Use in place
+ nacked notangle.
+ (WEAVE): New environment variable. Use in place of noweave.
+
2007-06-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
* document.in (check_mode_value): Remove save-image support.
diff --git a/src/scripts/document.in b/src/scripts/document.in
index 93425720..bafdd1e2 100755
--- a/src/scripts/document.in
+++ b/src/scripts/document.in
@@ -237,9 +237,9 @@ if test x$do_tangle = xyes; then
# Alternatively, we could initialize chunk to '*' and
# unconditionally use -R"$chunk".
if [ -z "$chunk" ]; then
- notangle $file > $output
+ $TANGLE $file > $output
else
- notangle -R"$chunk" $file > $output
+ $TANGLE -R"$chunk" $file > $output
fi
# FIXME: Handle errors.
exit $?;
@@ -248,7 +248,7 @@ fi
if test x$do_weave = xyes; then
file=`basename $1 .pamphlet`
- noweave -delay $1 > $file.tex
+ $WEAVE -delay $1 > $file.tex
if test x$do_latex != xyes; then
exit 0;
fi
@@ -304,8 +304,8 @@ esac
if [ "$#" = "3" ]; then
REDIRECT=$2
FILE=`basename $3 .pamphlet`
- notangle -t8 $FILE.pamphlet >$FILE
- noweave -delay $FILE.pamphlet >$FILE.tex
+ $TANGLE -t8 $FILE.pamphlet >$FILE
+ $WEAVE -delay $FILE.pamphlet >$FILE.tex
latex --interaction nonstopmode $FILE.tex >$REDIRECT
latex --interaction nonstopmode $FILE.tex >$REDIRECT
rm -f $FILE~
@@ -318,8 +318,8 @@ if [ "$#" = "3" ]; then
fi
if [ "$#" = "1" ]; then
FILE=`basename $1 .pamphlet`
- notangle -t8 $FILE.pamphlet >$FILE
- noweave -delay $FILE.pamphlet >$FILE.tex
+ $TANGLE -t8 $FILE.pamphlet >$FILE
+ $WEAVE -delay $FILE.pamphlet >$FILE.tex
latex $FILE.tex
latex $FILE.tex
rm -f $FILE~