diff --git a/.gitignore b/.gitignore
index 0165d6f..0c064fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,10 +14,12 @@ Makefile
configure
config.*
-# should be added using automake --add-missing
+# should be added using autoreconf -i
INSTALL
tools/install-sh
tools/missing
+tools/mdate-sh
+tools/texinfo.tex
# downloaded manually by user
tools/closure-compiler.jar
diff --git a/Makefile.am b/Makefile.am
index 4b54ceb..1291d01 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,7 @@
## ease.js Makefile.am
# see README
+SUBDIRS = doc
EXTRA_DIST = AUTHORS NEWS ChangeLog
path_build = $(top_builddir)/build
@@ -19,8 +20,8 @@ perf_tests = @PERF_TESTS@
path_externs_internal = $(path_build)/externs-internal.js
combine = $(path_tools)/combine
-compiler = $(path_tools)/closure-compiler.jar
-
+compiler = @CCJAR@
+MKDIR_P = @MKDIR_P@
.PHONY: mkbuild combine min doc test perf
@@ -31,7 +32,7 @@ mkbuild: $(path_build)
# create build dir
$(path_build):
- mkdir -p "$(path_build)"
+ $(MKDIR_P) "$(path_build)"
combine: $(path_combine_output) $(path_build)/browser-test.html
diff --git a/README b/README
index 23f29b2..f6969fa 100644
--- a/README
+++ b/README
@@ -34,10 +34,11 @@ If your distribution contains a `configure' file in the project root, you
may jump immediately to INSTALL.
Otherwise, you likely have the sources as they exist in the project
-repository, which does not contain the generature `configure' script; you
+repository, which does not contain the generated `configure' script; you
may generate it by issuing the following commands:
- $ aclocal && automake --add-missing --foreign && autoconf
+ $ autoreconf -fvi
-Please note that the --foreign argument is necessary to `automake' to ignore
-certain missing files (such as ChangeLog) that are generated at build time.
+Please note that certain files (such as AUTHORS, NEWS, and ChangeLog) are
+generated as part of the `dist' target and do not exist as part of the
+repository.
diff --git a/configure.ac b/configure.ac
index b5c7ee5..4843759 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,11 +20,12 @@
AC_INIT([ease.js], [0.2.0-dev], [bugs@easejs.org])
AC_CONFIG_AUX_DIR([tools])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
-AC_CONFIG_FILES([Makefile])
+AC_PROG_MKDIR_P
# check for node, which is required for nearly every operation
+AC_ARG_VAR([NODE], [The node.js interpreter])
AC_CHECK_PROGS(NODE, [node nodejs])
AM_CONDITIONAL(HAS_NODE, [test "$NODE"])
@@ -74,20 +75,28 @@ else
fi
# Java is used for Closure Compiler
+AC_ARG_VAR([JAVA], [The Java executable])
+AC_ARG_VAR([CCJAR], [The Clojure Compiler jar file])
AC_CHECK_PROGS(JAVA, [java])
AM_CONDITIONAL(HAS_JAVA, [test "$JAVA"])
ccjar=
-if test "$JAVA"; then
- AC_CHECK_FILE([tools/closure-compiler.jar], [ccjar=1], [AC_MSG_NOTICE([
+AS_IF(test "$JAVA" -a ! "$CCJAR",
+ [AC_CHECK_FILE([$srcdir/tools/closure-compiler.jar],
+ [AC_SUBST([CCJAR], [$srcdir/tools/closure-compiler.jar])],
+ [AC_MSG_NOTICE([
If you wish perform minification of the combined source file, you must
- download closure-compiler.jar into the tools directory; it is available
- here:
+ download closure-compiler.jar into the tools sub-directory; it is
+ available here:
https://developers.google.com/closure/compiler/
- ])])
-fi
-AM_CONDITIONAL(HAS_CCJAR, [test "$ccjar"])
+ If it is installed elsewhere on your system, specify its location with
+ the CCJAR environment variable.
+ ])])], [])
+
+AM_CONDITIONAL(HAS_CCJAR, [test "$CCJAR"])
+
+AC_CONFIG_FILES([Makefile doc/Makefile])
AC_OUTPUT
diff --git a/doc/.gitignore b/doc/.gitignore
index 8640841..8991c2e 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -10,3 +10,7 @@
*.vr
*.pdf
*.toc
+
+version.texi
+easejs.info
+stamp-vti
diff --git a/doc/Makefile b/doc/Makefile.am
similarity index 69%
rename from doc/Makefile
rename to doc/Makefile.am
index b94291e..b374175 100644
--- a/doc/Makefile
+++ b/doc/Makefile.am
@@ -1,4 +1,3 @@
-##
# ease.js manual Makefile
#
# Responsible for building the project documentation.
@@ -21,20 +20,27 @@
# along with this program. If not, see .
##
+info_TEXINFOS = easejs.texi
+easejs_TEXINFOS = license.texi about.texi classes.texi \
+impl-details.texi integration.texi mkeywords.texi source-tree.texi
+
+EXTRA_DIST = README highlight.pack.js interactive.js easejs.css \
+img/composition-uml.dia img/composition-uml.txt inheritance-ex.dia \
+inheritance-ex.txt visobj-collection-wide.dia \
+visobj-collection-wide.txt visobj.dia visobj.txt
+
path_doc=.
path_build=../build
path_lib=../lib
+docdir = @docdir@
path_doc_output=${path_build}/doc
-path_doc_output_info=${path_doc_output}/easejs.info
-path_doc_output_plain=${path_doc_output}/manual.txt
-path_doc_output_html=${path_doc_output}/manual
-path_doc_output_html1=${path_doc_output}/manual.html
-path_doc_css=${path_doc}/manual.css
+path_doc_output_plain=${path_doc_output}/easejs.txt
+path_doc_output_html=${path_doc_output}/easejs
+path_doc_output_html1=${path_doc_output}/easejs.html
+path_doc_css=${path_doc}/easejs.css
path_doc_img=${path_doc}/img
-path_doc_css_ref=manual.css
-path_manual_texi=${path_doc}/manual.texi
-
-path_info_install := /usr/local/share/info
+path_doc_css_ref=easejs.css
+path_easejs_texi=${path_doc}/easejs.texi
doc_src := $(wildcard $(path_doc)/*.texi)
doc_imgs := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.dia))
@@ -44,7 +50,7 @@ doc_replace := s/<\/body>/