summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am26
-rw-r--r--Makefile.in22
-rwxr-xr-xconfigure54
-rw-r--r--configure.ac8
-rw-r--r--doc/manual.tex2
5 files changed, 84 insertions, 28 deletions
diff --git a/Makefile.am b/Makefile.am
index 548382b0..a700dd3d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,7 +59,13 @@ bin/urweb: src/compiler.mlb src/urweb.mlb src/*.sig src/*.sml \
src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml
$(MLTON) -output $@ src/compiler.mlb
-install-exec-local:
+install-exec-emacs:
+if USE_EMACS
+ mkdir -p $(DESTDIR)$(SITELISP)
+ cp src/elisp/*.el $(DESTDIR)$(SITELISP)/
+endif
+
+install-exec-local-main:
mkdir -p $(DESTDIR)$(BIN)
cp bin/urweb $(DESTDIR)$(BIN)/
mkdir -p $(DESTDIR)$(LIB_UR)
@@ -70,11 +76,17 @@ install-exec-local:
mkdir -p $(DESTDIR)$(INCLUDE)
cp config.h $(DESTDIR)$(INCLUDE)/
cp include/*.h $(DESTDIR)$(INCLUDE)/
- mkdir -p $(DESTDIR)$(SITELISP)
- cp src/elisp/*.el $(DESTDIR)$(SITELISP)/
+
+install-exec-local: install-exec-local-main install-exec-emacs
-ldconfig
-uninstall-local:
+uninstall-emacs:
+if USE_EMACS
+ rm -f $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \
+ $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el
+endif
+
+uninstall-local-main:
rm -f $(DESTDIR)$(BIN)/urweb \
$(DESTDIR)$(LIB_UR)/basis.urs $(DESTDIR)$(LIB_UR)/char.urs $(DESTDIR)$(LIB_UR)/listPair.urs $(DESTDIR)$(LIB_UR)/list.urs \
$(DESTDIR)$(LIB_UR)/monad.urs $(DESTDIR)$(LIB_UR)/option.urs $(DESTDIR)$(LIB_UR)/string.urs $(DESTDIR)$(LIB_UR)/top.urs \
@@ -82,9 +94,9 @@ uninstall-local:
$(DESTDIR)$(LIB_UR)/monad.ur $(DESTDIR)$(LIB_UR)/option.ur $(DESTDIR)$(LIB_UR)/string.ur $(DESTDIR)$(LIB_UR)/top.ur \
$(DESTDIR)$(LIB_JS)/urweb.js \
$(DESTDIR)$(INCLUDE)/config.h $(DESTDIR)$(INCLUDE)/queue.h $(DESTDIR)$(INCLUDE)/request.h $(DESTDIR)$(INCLUDE)/types.h \
- $(DESTDIR)$(INCLUDE)/urweb.h \
- $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \
- $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el
+ $(DESTDIR)$(INCLUDE)/urweb.h
+
+uninstall-local: uninstall-local-main uninstall-emacs
package:
hg archive -t tgz -X tests /tmp/urweb.tgz
diff --git a/Makefile.in b/Makefile.in
index 5f53c6a1..54720566 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -777,7 +777,11 @@ bin/urweb: src/compiler.mlb src/urweb.mlb src/*.sig src/*.sml \
src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml
$(MLTON) -output $@ src/compiler.mlb
-install-exec-local:
+install-exec-emacs:
+@USE_EMACS_TRUE@ mkdir -p $(DESTDIR)$(SITELISP)
+@USE_EMACS_TRUE@ cp src/elisp/*.el $(DESTDIR)$(SITELISP)/
+
+install-exec-local-main:
mkdir -p $(DESTDIR)$(BIN)
cp bin/urweb $(DESTDIR)$(BIN)/
mkdir -p $(DESTDIR)$(LIB_UR)
@@ -788,11 +792,15 @@ install-exec-local:
mkdir -p $(DESTDIR)$(INCLUDE)
cp config.h $(DESTDIR)$(INCLUDE)/
cp include/*.h $(DESTDIR)$(INCLUDE)/
- mkdir -p $(DESTDIR)$(SITELISP)
- cp src/elisp/*.el $(DESTDIR)$(SITELISP)/
+
+install-exec-local: install-exec-local-main install-exec-emacs
-ldconfig
-uninstall-local:
+uninstall-emacs:
+@USE_EMACS_TRUE@ rm -f $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \
+@USE_EMACS_TRUE@ $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el
+
+uninstall-local-main:
rm -f $(DESTDIR)$(BIN)/urweb \
$(DESTDIR)$(LIB_UR)/basis.urs $(DESTDIR)$(LIB_UR)/char.urs $(DESTDIR)$(LIB_UR)/listPair.urs $(DESTDIR)$(LIB_UR)/list.urs \
$(DESTDIR)$(LIB_UR)/monad.urs $(DESTDIR)$(LIB_UR)/option.urs $(DESTDIR)$(LIB_UR)/string.urs $(DESTDIR)$(LIB_UR)/top.urs \
@@ -800,9 +808,9 @@ uninstall-local:
$(DESTDIR)$(LIB_UR)/monad.ur $(DESTDIR)$(LIB_UR)/option.ur $(DESTDIR)$(LIB_UR)/string.ur $(DESTDIR)$(LIB_UR)/top.ur \
$(DESTDIR)$(LIB_JS)/urweb.js \
$(DESTDIR)$(INCLUDE)/config.h $(DESTDIR)$(INCLUDE)/queue.h $(DESTDIR)$(INCLUDE)/request.h $(DESTDIR)$(INCLUDE)/types.h \
- $(DESTDIR)$(INCLUDE)/urweb.h \
- $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \
- $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el
+ $(DESTDIR)$(INCLUDE)/urweb.h
+
+uninstall-local: uninstall-local-main uninstall-emacs
package:
hg archive -t tgz -X tests /tmp/urweb.tgz
diff --git a/configure b/configure
index 863f3186..7e49d359 100755
--- a/configure
+++ b/configure
@@ -748,6 +748,8 @@ SITELISP
INCLUDE
LIB
BIN
+USE_EMACS_FALSE
+USE_EMACS_TRUE
MLYACC
MLLEX
MLTON
@@ -871,6 +873,7 @@ enable_fast_install
with_gnu_ld
enable_libtool_lock
with_openssl
+with_emacs
'
ac_precious_vars='build_alias
host_alias
@@ -1516,6 +1519,7 @@ Optional Packages:
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-openssl=DIR root of the OpenSSL directory
+ --without-emacs disable installation of Emacs mode
Some influential environment variables:
CC C compiler command
@@ -5332,13 +5336,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5335: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5339: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5338: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5342: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5341: output\"" >&5)
+ (eval echo "\"\$as_me:5345: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6543,7 +6547,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6546 "configure"' > conftest.$ac_ext
+ echo '#line 6550 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7805,11 +7809,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7808: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7812: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7812: \$? = $ac_status" >&5
+ echo "$as_me:7816: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8144,11 +8148,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8147: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8151: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8151: \$? = $ac_status" >&5
+ echo "$as_me:8155: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8249,11 +8253,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8252: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8256: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8256: \$? = $ac_status" >&5
+ echo "$as_me:8260: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8304,11 +8308,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8307: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8311: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8311: \$? = $ac_status" >&5
+ echo "$as_me:8315: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10688,7 +10692,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10691 "configure"
+#line 10695 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10784,7 +10788,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10787 "configure"
+#line 10791 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11317,6 +11321,24 @@ if test -z $SITELISP; then
fi
+# Check whether --with-emacs was given.
+if test "${with_emacs+set}" = set; then :
+ withval=$with_emacs;
+else
+ with_emacs=yes
+fi
+
+
+ if test "x$with_emacs" = xyes; then
+ USE_EMACS_TRUE=
+ USE_EMACS_FALSE='#'
+else
+ USE_EMACS_TRUE='#'
+ USE_EMACS_FALSE=
+fi
+
+
+
@@ -11439,6 +11461,10 @@ else
am__EXEEXT_FALSE=
fi
+if test -z "${USE_EMACS_TRUE}" && test -z "${USE_EMACS_FALSE}"; then
+ as_fn_error $? "conditional \"USE_EMACS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: ${CONFIG_STATUS=./config.status}
ac_write_fail=0
diff --git a/configure.ac b/configure.ac
index ce40adb6..633692e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,14 @@ if test [-z $SITELISP]; then
SITELISP=$prefix/share/emacs/site-lisp/urweb-mode
fi
+AC_ARG_WITH([emacs],
+ [AS_HELP_STRING([--without-emacs],
+ [disable installation of Emacs mode])],
+ [],
+ [with_emacs=yes])
+
+AM_CONDITIONAL(USE_EMACS, test "x$with_emacs" = xyes)
+
AC_SUBST(BIN)
AC_SUBST(LIB)
AC_SUBST(INCLUDE)
diff --git a/doc/manual.tex b/doc/manual.tex
index c39d92df..5deb66fc 100644
--- a/doc/manual.tex
+++ b/doc/manual.tex
@@ -85,6 +85,8 @@ To use the Emacs mode, you must have a modern Emacs installed. We assume that y
apt-get install emacs-goodies-el
\end{verbatim}
+If you don't want to install the Emacs mode, run \texttt{./configure} with the argument \texttt{--without-emacs}.
+
Even with the right packages installed, configuration and building might fail to work. After you run \texttt{./configure}, you will see the values of some named environment variables printed. You may need to adjust these values to get proper installation for your system. To change a value, store your preferred alternative in the corresponding UNIX environment variable, before running \texttt{./configure}. For instance, here is how to change the list of extra arguments that the Ur/Web compiler will pass to GCC on every invocation.
\begin{verbatim}