[m-rev.] diff: fix mdprof_cgi bindist bug

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Dec 2 22:51:07 AEDT 2002


Estimated hours taken: 0.5
Branches: main, release

Fix a bug where building the binary distribution failed when deep
profiling was enabled, due to the mdprof_cgi program not having
been built.

deep_profiler/Mmakefile:
	Install mdprof_cgi in <prefix>/lib/mercury/<fullarch>/bin,
	as well as in /var/lib/cgi-bin.

bindist/Mmakefile:
	Use the installed mdprof_cgi from <prefix>/lib/mercury/<fullarch>/bin,
	rather than the version in the build directory (../deep_profiler),
	since the latter may not be around when the binary distribution
	is being created.

Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: bindist/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/Mmakefile,v
retrieving revision 1.35
diff -u -d -r1.35 Mmakefile
--- bindist/Mmakefile	2 Dec 2002 11:24:27 -0000	1.35
+++ bindist/Mmakefile	2 Dec 2002 11:44:17 -0000
@@ -33,7 +33,7 @@
 		  ../scripts/canonical_grade \
 		  ../scripts/gud.el
 
-CGI_PROG	= ../deep_profiler/mdprof_cgi
+CGI_PROG	= $(INSTALL_LIB_DIR)/mercury/bin/$(FULLARCH)/mdprof_cgi
 
 VIM_FILES	= ../vim/*
 
Index: deep_profiler/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/deep_profiler/Mmakefile,v
retrieving revision 1.6
diff -u -d -r1.6 Mmakefile
--- deep_profiler/Mmakefile	2 Dec 2002 11:24:32 -0000	1.6
+++ deep_profiler/Mmakefile	2 Dec 2002 11:39:12 -0000
@@ -132,6 +132,12 @@
 			$(INSTALL_CGI_DIR)/mdprof_cgi.was ; \
 		cp mdprof_cgi $(INSTALL_CGI_DIR) ; \
 	fi
+	# We also install mdprof_cgi in $(INSTALL_MERC_BIN_DIR).
+	# This is done just so that it can easily get put in the
+	# binary distribution (even if the step above failed).
+	-[ -d $(INSTALL_MERC_BIN_DIR) ] || mkdir -p $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mdprof_cgi$(EXT_FOR_EXE)` \
+		$(INSTALL_MERC_BIN_DIR)/mdprof_cgi
 
 uninstall:
 	# We try to uninstall mdprof_cgi, but failure to do so is not an

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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