[m-rev.] For post-commit review: Compatibility with Debian packaging.

Paul Bone pbone at csse.unimelb.edu.au
Tue Dec 14 18:03:15 AEDT 2010


Compatibility with Debian packaging.

Packaging Mercury for Debian requires creating some patches to make sure that
Mercury can be built under the control of dpkg-buildpackage.  It's recommended
that these patches are pushed upstream (into Mercury) so that everyone can
benefit from them, not just Debian packagers.

Mmake.common.in:
scripts/Mmake.vars.in:
    Install Mercury at $DESTDIR/@prefix@, $DESTDIR helps someone setup Mercury
    to run from @prefix@ while putting it in $DESTDIR.  $DESTDIR/* can easily
    be tared up and then deployed on other systems.

Mmakefile:
Makefile:
    Pass the $DESTDIR variable to make sub-processes.

scripts/Mercury.config.in:
scripts/Mercury.config.bootstrap.in:
    Remove the hash-bang line from these scripts since they are not executable.

    This change improves conformance with Debian packaging standards.

Index: Makefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Makefile,v
retrieving revision 1.14
diff -u -p -b -r1.14 Makefile
--- Makefile	9 Jul 2010 07:10:15 -0000	1.14
+++ Makefile	14 Dec 2010 06:41:30 -0000
@@ -34,7 +34,7 @@ libmmc:
 
 .PHONY: install
 install:
-	$(MMAKE) MMAKEFLAGS=$(PARALLEL) install
+	$(MMAKE) MMAKEFLAGS=$(PARALLEL) DESTDIR=$(DESTDIR) install
 
 # `mmake clean' has a different meaning to the usual GNU standard `make clean':
 # it removes the .c files, which makes bootstrapping impossible unless you
Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.99
diff -u -p -b -r1.99 Mmake.common.in
--- Mmake.common.in	8 Dec 2010 08:54:29 -0000	1.99
+++ Mmake.common.in	14 Dec 2010 06:41:30 -0000
@@ -118,7 +118,7 @@ SHARED_LIBS		= @SHARED_LIBS@
 # Set the installation prefix. This is done here as well as
 # in scripts/Mmake.vars to avoid accidentally overwriting an
 # existing installation when using an installed mmake.
-INSTALL_PREFIX		= @prefix@
+INSTALL_PREFIX          = $(DESTDIR)/@prefix@
 FINAL_INSTALL_PREFIX	= @prefix@
 
 INSTALLABLE_PREFIX	= @INSTALLABLE_PREFIX@
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.140
diff -u -p -b -r1.140 Mmakefile
--- Mmakefile	7 Dec 2010 13:56:15 -0000	1.140
+++ Mmakefile	14 Dec 2010 06:41:30 -0000
@@ -52,11 +52,13 @@ MMAKEFLAGS =
 SUBDIR_MMAKE =	PATH=../scripts:../util:$$PATH \
 		MMAKE_VPATH=. \
 		MMAKE_DIR=../scripts \
+		DESTDIR=$(DESTDIR) \
 		../scripts/mmake $(MMAKEFLAGS)
 
 SUBSUBDIR_MMAKE = PATH=../../scripts:../../util:$$PATH \
 		MMAKE_VPATH=. \
 		MMAKE_DIR=../../scripts \
+		DESTDIR=$(DESTDIR) \
 		../../scripts/mmake $(MMAKEFLAGS)
 
 GENERATED_DOCS = README INSTALL WORK_IN_PROGRESS TODO
Index: scripts/Mercury.config.bootstrap.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mercury.config.bootstrap.in,v
retrieving revision 1.10
diff -u -p -b -r1.10 Mercury.config.bootstrap.in
--- scripts/Mercury.config.bootstrap.in	30 Sep 2010 07:23:34 -0000	1.10
+++ scripts/Mercury.config.bootstrap.in	14 Dec 2010 06:52:10 -0000
@@ -1,4 +1,7 @@
-#! /bin/sh
+#
+# This file has no hash-bang line since it isn't intended to be executable,
+# instead it is 'sourced' by other scripts.
+#
 # @configure_input@
 #---------------------------------------------------------------------------#
 # Copyright (C) 2003-2004, 2006-2007, 2010 The University of Melbourne.
Index: scripts/Mercury.config.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mercury.config.in,v
retrieving revision 1.25
diff -u -p -b -r1.25 Mercury.config.in
--- scripts/Mercury.config.in	30 Sep 2010 07:23:34 -0000	1.25
+++ scripts/Mercury.config.in	14 Dec 2010 06:52:32 -0000
@@ -1,4 +1,7 @@
-#! /bin/sh
+#
+# This file has no hash-bang line since it isn't intended to be executable,
+# instead it is 'sourced' by other scripts.
+#
 # @configure_input@
 #---------------------------------------------------------------------------#
 # Copyright (C) 2003-2007, 2010 The University of Melbourne.
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.113
diff -u -p -b -r1.113 Mmake.vars.in
--- scripts/Mmake.vars.in	30 Sep 2010 07:23:34 -0000	1.113
+++ scripts/Mmake.vars.in	14 Dec 2010 06:41:30 -0000
@@ -686,7 +686,7 @@ INSTALL_MKDIR = mkdir -p
 # script (e.g. in the shell scripts mmc, ml, mmake, etc) that will not
 # be updated simply by overriding INSTALL_PREFIX.
 
-INSTALL_PREFIX		= @prefix@
+INSTALL_PREFIX		= $(DESTDIR)/@prefix@
 FINAL_INSTALL_PREFIX	= @prefix@
 INSTALL_BINDIR		= $(INSTALL_PREFIX)/bin
 INSTALL_LIBDIR		= $(INSTALL_PREFIX)/lib/mercury
@@ -700,7 +700,7 @@ INSTALL_MAN_DIR		= $(INSTALL_PREFIX)/man
 INSTALL_HTML_DIR	= $(INSTALL_PREFIX)/lib/mercury/html
 INSTALL_MDB_DOC_DIR	= $(INSTALL_PREFIX)/lib/mercury/mdb
 INSTALL_ELISP_DIR	= $(INSTALL_PREFIX)/lib/mercury/elisp
-INSTALL_CGI_DIR		= @CGIDIR@
+INSTALL_CGI_DIR		= $(DESTDIR)/@CGIDIR@
 
 # You should not need to override anything below here
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20101214/b9c5456f/attachment.sig>


More information about the reviews mailing list