[m-rev.] diff: install the deep profiler from the binary distribution

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Jul 9 18:31:57 AEST 2001


This is also for an after-the-fact review by Fergus.

Add rules for installing the deep profiler from binary distributions.

bindist/bindist.INSTALL:
	Document the installation of the deep profiler.

bindist/bindist.Makefile.in:
	Add rules for installing the deep profiler.

bindist/bindist.build_vars.in:
	Add the variables needed by the rules for installing the deep profiler.

bindist/bindist.configure.in:
	Define the variables needed by the rules for installing the deep
	profiler.

Zoltan.

cvs diff: Diffing bindist
Index: bindist/bindist.INSTALL
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.INSTALL,v
retrieving revision 1.8
diff -u -b -r1.8 bindist.INSTALL
--- bindist/bindist.INSTALL	1999/03/30 05:45:29	1.8
+++ bindist/bindist.INSTALL	2001/07/09 08:05:31
@@ -35,6 +35,13 @@
 #	   documentation from the DVI files in
 #	   /usr/local/mercury-<VERSION>/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:
 #
Index: bindist/bindist.Makefile.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.Makefile.in,v
retrieving revision 1.25
diff -u -b -r1.25 bindist.Makefile.in
--- bindist/bindist.Makefile.in	2001/05/30 06:05:16	1.25
+++ bindist/bindist.Makefile.in	2001/07/09 08:15:44
@@ -15,6 +15,7 @@
 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 @@
 			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 @@
 			  util/mprof_merge_runs util/vpath_find \
 			  util/mercury_cleanup_install
 
+ENABLE_DEEP_PROFILER    = @ENABLE_DEEP_PROFILER@
+
 #-----------------------------------------------------------------------------#
 
 all:
@@ -50,12 +55,17 @@
 
 .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 "
@@ -103,6 +113,17 @@
 	@echo "-- Installing Emacs lisp scripts in $(INSTALL_ELISP_DIR)"
 	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: 
Index: bindist/bindist.build_vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.build_vars.in,v
retrieving revision 1.17
diff -u -b -r1.17 bindist.build_vars.in
--- bindist/bindist.build_vars.in	2001/05/18 14:23:48	1.17
+++ bindist/bindist.build_vars.in	2001/07/09 08:07:27
@@ -52,3 +52,5 @@
 LINK_OPT_SEP="@LINK_OPT_SEP@"
 CYGPATH="@CYGPATH@"
 MATH_LIB="@MATH_LIB@"
+CGIDIR="@CGIDIR@"
+ENABLE_DEEP_PROFILER="@ENABLE_DEEP_PROFILER@"
Index: bindist/bindist.configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.configure.in,v
retrieving revision 1.34
diff -u -b -r1.34 bindist.configure.in
--- bindist/bindist.configure.in	2001/07/04 15:06:20	1.34
+++ bindist/bindist.configure.in	2001/07/09 08:18:05
@@ -85,6 +85,8 @@
 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 @@
 #-----------------------------------------------------------------------------#
 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
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list