diff: Installation changes for easier packaging.

Tyson Richard DOWD trd at cs.mu.oz.au
Tue Sep 9 00:52:28 AEST 1997


Hi folks,

Here's a change to the installation that was needed to fix the
Debian package. (The old Mercury package didn't work with shared
libraries, this one does).

Can someone review this change?

===================================================================

Estimated hours taken: 1

Changes to installation to ease package creation for Debian.

Mmake.common.in:
	Add a FINAL_INSTALL_PREFIX variable (and various other
	FINAL_INSTALL_* variables).
	The FINAL variables should be used for any hardcoded paths
	that will be used in the installation process, so that
	the installation can be put into a temporary directory,
	(by overriding INSTALL_PREFIX on the command line)
	then moved into its final destination later.
	In particular, shared library paths need to be treated this
	way.
	
doc/make_manpage:
	Fix spelling mistake.
	s/SYNOPSYS/SYNOPSIS

library/Mmakefile:
runtime/Mmakefile:
	Use FINAL_INSTALL_* variables for shared library paths.

Index: Mmake.common.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/Mmake.common.in,v
retrieving revision 1.22
diff -u -r1.22 Mmake.common.in
--- Mmake.common.in	1997/07/28 08:51:47	1.22
+++ Mmake.common.in	1997/09/08 13:52:32
@@ -26,9 +26,21 @@
 # In particular, you might want to find a better place for the DVI and
 # HTML files.
 
+# FINAL_INSTALL_PREFIX is provided so that you can install to
+# a particular directory, with the intention to move that install
+# to a different location at a later time. 
+# This makes it easier for packaging tools to install.
+# (As a consequence, if you want to override INSTALL_PREFIX on
+# the command line, you should override FINAL_INSTALL_PREFIX too,
+# unless you actually want to move the files to a final destination
+# later).
+# Note: Other FINAL_INSTALL_* variables have a similar meaning.
+
 INSTALL_PREFIX		= @prefix@
+FINAL_INSTALL_PREFIX	= @prefix@
 INSTALL_BINDIR 		= $(INSTALL_PREFIX)/bin
 INSTALL_LIBDIR 		= $(INSTALL_PREFIX)/lib/mercury
+FINAL_INSTALL_LIBDIR 	= $(FINAL_INSTALL_PREFIX)/lib/mercury
 INSTALL_INFO_DIR 	= $(INSTALL_PREFIX)/info
 INSTALL_DVI_DIR 	= $(INSTALL_PREFIX)/lib/mercury/doc
 INSTALL_TEXT_DIR 	= $(INSTALL_PREFIX)/lib/mercury/doc
@@ -125,7 +137,9 @@
 FULLARCH		= @FULLARCH@
 INSTALL_MERC_BIN_DIR	= $(INSTALL_LIBDIR)/bin/$(FULLARCH)
 INSTALL_MERC_GC_LIB_DIR	= $(INSTALL_LIBDIR)/lib/$(FULLARCH)
+FINAL_INSTALL_MERC_GC_LIB_DIR = $(FINAL_INSTALL_LIBDIR)/lib/$(FULLARCH)
 INSTALL_MERC_LIB_DIR	= $(INSTALL_LIBDIR)/lib/$(GRADE)/$(FULLARCH)
+FINAL_INSTALL_MERC_LIB_DIR = $(FINAL_INSTALL_LIBDIR)/lib/$(GRADE)/$(FULLARCH)
 INSTALL_NU_DIR		= $(INSTALL_LIBDIR)/nuprolog
 INSTALL_NU_ARCH_DIR 	= $(INSTALL_LIBDIR)/nuprolog/$(FULLARCH)
 INSTALL_SP_DIR		= $(INSTALL_LIBDIR)/sicstus
Index: doc/make_manpage
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/make_manpage,v
retrieving revision 1.4
diff -u -r1.4 make_manpage
--- make_manpage	1997/07/27 15:05:43	1.4
+++ make_manpage	1997/09/08 13:52:38
@@ -50,7 +50,7 @@
 		-e '/^.SH [A-Za-z ]*:/y/\
 abcdefghijklmnopqrstuvwxyz:/\
 ABCDEFGHIJKLMNOPQRSTUVWXYZ /' \
-		-e 's/^.SH USAGE/.SH SYNOPSYS/' \
+		-e 's/^.SH USAGE/.SH SYNOPSIS/' \
 	`"
 uppername="$name"
 
Index: library/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/Mmakefile,v
retrieving revision 1.12
diff -u -r1.12 Mmakefile
--- Mmakefile	1997/07/29 04:19:49	1.12
+++ Mmakefile	1997/09/08 13:52:39
@@ -145,8 +145,8 @@
 	ar cr libmercury.a $(library.os)
 	$(RANLIB) libmercury.a
 
-RPATH_1=$(SHLIB_RPATH_OPT)$(INSTALL_MERC_LIB_DIR)
-RPATH_2=$(SHLIB_RPATH_SEP)$(INSTALL_MERC_GC_LIB_DIR)
+RPATH_1=$(SHLIB_RPATH_OPT)$(FINAL_INSTALL_MERC_LIB_DIR)
+RPATH_2=$(SHLIB_RPATH_SEP)$(FINAL_INSTALL_MERC_GC_LIB_DIR)
 
 libmercury.so : $(library.pic_os)
 	$(LINK_SHARED_OBJ) -o libmercury.so $(library.pic_os)		\
Index: runtime/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/Mmakefile,v
retrieving revision 1.8
diff -u -r1.8 Mmakefile
--- Mmakefile	1997/07/27 15:07:59	1.8
+++ Mmakefile	1997/09/08 13:52:41
@@ -64,7 +64,7 @@
 
 libmer.so: $(PIC_OBJS)
 	$(LINK_SHARED_OBJ) -o libmer.so $(PIC_OBJS)			\
-		$(SHLIB_RPATH_OPT)$(INSTALL_MERC_GC_LIB_DIR) 		\
+		$(SHLIB_RPATH_OPT)$(FINAL_INSTALL_MERC_GC_LIB_DIR)	\
 		-L$(BOEHM_GC_DIR)					\
 		` case "$(GRADE)" in 					\
 		    *.gc.prof)	echo "-lgc_prof" ;;			\
-- 
       Tyson Dowd           #          Another great idea from the 
                            #            people who brought you
      trd at .cs.mu.oz.au      #               Beer Milkshakes!
http://www.cs.mu.oz.au/~trd #	         Confidence --- Red Dwarf



More information about the developers mailing list