diff --git a/bindist/bindist.INSTALL b/bindist/bindist.INSTALL index 7621f416b..7e446d799 100755 --- a/bindist/bindist.INSTALL +++ b/bindist/bindist.INSTALL @@ -35,6 +35,13 @@ # documentation from the DVI files in # /usr/local/mercury-/lib/mercury/doc. # +# If the binary distribution includes the deep profiler, then check +# whether "make install" was able to copy scripts/mdprof to the web +# server's CGI directory (normally /usr/lib/cgi-bin). This directory +# is often writeable only by root or by the web server administrator, +# so you may need more than your usual set of privileges to do the +# copy (i.e. you may need to "su" to the appropriate user). +# # To use the emacs debugger interface ("M-x mdb"), you also need to # add the following lines to the `.emacs' file in your home directory: # diff --git a/bindist/bindist.Makefile.in b/bindist/bindist.Makefile.in index c900867a4..1689770f0 100644 --- a/bindist/bindist.Makefile.in +++ b/bindist/bindist.Makefile.in @@ -15,6 +15,7 @@ INSTALL_LIBDIR = $(INSTALL_PREFIX)/lib/mercury INSTALL_INFODIR = $(INSTALL_PREFIX)/info INSTALL_MAN_DIR = $(INSTALL_PREFIX)/man INSTALL_ELISP_DIR = $(INSTALL_PREFIX)/lib/mercury/elisp +INSTALL_CGI_DIR = @CGIDIR@ # These scripts are generated by configure from the corresponding `.in' file INSTALL_SCRIPTS = scripts/c2init scripts/mmc \ @@ -22,6 +23,8 @@ INSTALL_SCRIPTS = scripts/c2init scripts/mmc \ scripts/ml scripts/mmake scripts/mprof \ scripts/mdb scripts/mkfifo_using_mknod +INSTALL_CGI_SCRIPTS = scripts/mdprof + INSTALL_EMACS_SCRIPTS = scripts/gud.el INSTALL_MMAKE_EXTRAS = scripts/Mmake.rules scripts/Mmake.vars @@ -40,6 +43,8 @@ UTILS = $(UTIL_PROGFILENAMES) util/mtags \ util/mprof_merge_runs util/vpath_find \ util/mercury_cleanup_install +ENABLE_DEEP_PROFILER = @ENABLE_DEEP_PROFILER@ + #-----------------------------------------------------------------------------# all: @@ -50,12 +55,17 @@ all: .PHONY: install install: install_lib install_info install_man \ - install_scripts install_emacs_scripts \ + install_scripts install_emacs_scripts install_cgi_scripts \ install_mmake install_mdb install_util @echo @echo "-- Don't forget to add $(INSTALL_BINDIR) to your PATH," @echo "-- $(INSTALL_MAN_DIR) to your MANPATH," @echo "-- and $(INSTALL_INFODIR) to your INFOPATH," + @if test $(ENABLE_DEEP_PROFILER) != yes || \ + cmp -s scripts/mdprof.in $(INSTALL_CGI_DIR)/mdprof; \ + then true ; else \ + echo "-- to copy scripts/mdprof to $(INSTALL_CGI_DIR),"; \ + fi @echo "-- and to add the following lines to the \`.emacs' file" @echo "-- in your home directory:" @echo " (setq load-path (cons (expand-file-name " @@ -104,6 +114,17 @@ install_emacs_scripts: test -d $(INSTALL_ELISP_DIR) || mkdir -p $(INSTALL_ELISP_DIR) cp $(INSTALL_EMACS_SCRIPTS) $(INSTALL_ELISP_DIR) +.PHONY: install_cgi_scripts +install_cgi_scripts: $(INSTALL_CGI_SCRIPTS) + # $(INSTALL_CGI_DIR) is likely to be writeable only by root or + # the www system administrator, which is why we don't consider a + # failure of this action to be an error. If the command fails, + # the install action in ../Mmakefile will remind the user to do + # the copy later. + -if test $(ENABLE_DEEP_PROFILER) = yes ; then \ + cp $(INSTALL_CGI_SCRIPTS) $(INSTALL_CGI_DIR) ; \ + fi + .PHONY: install_mmake install_mmake: test -d $(INSTALL_LIBDIR)/mmake || mkdir -p $(INSTALL_LIBDIR)/mmake diff --git a/bindist/bindist.build_vars.in b/bindist/bindist.build_vars.in index ae20ec380..b164be47a 100644 --- a/bindist/bindist.build_vars.in +++ b/bindist/bindist.build_vars.in @@ -1,6 +1,6 @@ # @configure_input@ #---------------------------------------------------------------------------# -# Copyright (C) 1996-2000 The University of Melbourne. +# Copyright (C) 1996-2001 The University of Melbourne. # This file may only be copied under the terms of the GNU General # Public License - see the file COPYING in the Mercury distribution. #---------------------------------------------------------------------------# @@ -52,3 +52,5 @@ LINK_LIB="@LINK_LIB@" LINK_OPT_SEP="@LINK_OPT_SEP@" CYGPATH="@CYGPATH@" MATH_LIB="@MATH_LIB@" +CGIDIR="@CGIDIR@" +ENABLE_DEEP_PROFILER="@ENABLE_DEEP_PROFILER@" diff --git a/bindist/bindist.configure.in b/bindist/bindist.configure.in index 82b6fe748..77e956d77 100644 --- a/bindist/bindist.configure.in +++ b/bindist/bindist.configure.in @@ -85,6 +85,8 @@ AC_SUBST(LINK_OPT_SEP) AC_SUBST(CYGPATH) AC_SUBST(MATH_LIB) AC_SUBST(SHARED_LIBS_SH) +AC_SUBST(CGIDIR) +AC_SUBST(ENABLE_DEEP_PROFILER) #-----------------------------------------------------------------------------# AC_PROG_RANLIB @@ -221,7 +223,7 @@ AC_SUBST_FILE(CANONICAL_GRADE) #-----------------------------------------------------------------------------# MERCURY_CHECK_READLINE #-----------------------------------------------------------------------------# -AC_OUTPUT(Makefile scripts/mmc scripts/mercury.bat scripts/mprof +AC_OUTPUT(Makefile scripts/mmc scripts/mercury.bat scripts/mprof scripts/mdprof scripts/mercury_update_interface scripts/mgnuc scripts/ml scripts/mmake scripts/c2init scripts/sicstus_conv scripts/mkfifo_using_mknod scripts/Mmake.vars