[m-rev.] diff: fix binary distribution
Simon Taylor
stayl at cs.mu.OZ.AU
Tue Oct 7 22:34:52 AEST 2003
Estimated hours taken: 0.2
Branches: main
Fix bugs in the binary distribution.
configure.in:
Move the code to work out the arguments to pass
when reconfiguring before macro calls which clobber
the argument list.
scripts/mercury_config.in:
Don't abort because tools/lmc.in and tools/dotime.in
when configuring the binary distribution.
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.375
diff -u -u -r1.375 configure.in
--- configure.in 17 Aug 2003 07:28:24 -0000 1.375
+++ configure.in 7 Oct 2003 00:59:23 -0000
@@ -45,6 +45,41 @@
fi
#-----------------------------------------------------------------------------#
+# Work out the default arguments to configure when reconfiguring,
+# for example when installing a binary distribution.
+# Strip out --no-create and --no-recursion added by config.status.
+# Remove any --prefix and --enable-reconfigure arguments passed by
+# mercury_config.
+# Also quote any args containing shell metacharacters.
+#
+# NOTE: Some macros, e.g. AC_CHECK_PROG, overwrite the argument list,
+# so this must come before any uses of those macros.
+
+prefix_arg=false
+RECONFIGURE_ARGS=
+for arg
+do
+ if test $prefix_arg = true
+ then
+ prefix_arg=false
+ else
+ case "$arg" in
+ --no-create | --no-recursion) ;;
+ --prefix) prefix_arg=true ;;
+ --prefix=*) ;;
+ --enable-reconfigure=*) ;;
+ *" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]]*)
+ # The argument needs to be quoted.
+ RECONFIGURE_ARGS="$RECONFIGURE_ARGS '$arg'"
+ ;;
+ *)
+ RECONFIGURE_ARGS="$RECONFIGURE_ARGS $arg"
+ ;;
+ esac
+ fi
+done
+AC_SUBST(RECONFIGURE_ARGS)
+#-----------------------------------------------------------------------------#
remake_dependencies=false
AC_CONFIG_HEADER(runtime/mercury_conf.h)
AC_PREFIX_DEFAULT(/usr/local/mercury-`. ./VERSION; echo $VERSION`)
@@ -68,7 +103,6 @@
;;
esac
-
# Using `cygpath -m' gives a path that works under both
# Cygwin and native Windows, without causing quoting
# problems in shell scripts. (`cygpath -m' converts the
@@ -94,37 +128,6 @@
AC_MSG_WARN(*** Read README.BSDI before proceeding!)
;;
esac
-#-----------------------------------------------------------------------------#
-# Work out the default arguments to configure when reconfiguring,
-# for example when installing a binary distribution.
-# Strip out --no-create and --no-recursion added by config.status.
-# Remove any --prefix and --enable-reconfigure arguments passed by
-# mercury_config.
-# Also quote any args containing shell metacharacters.
-prefix_arg=false
-RECONFIGURE_ARGS=
-for arg
-do
- if test $prefix_arg = true
- then
- prefix_arg=false
- else
- case "$arg" in
- --no-create | --no-recursion) ;;
- --prefix) prefix_arg=true ;;
- --prefix=*) ;;
- --enable-reconfigure=*) ;;
- *" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]]*)
- # The argument needs to be quoted.
- RECONFIGURE_ARGS="$RECONFIGURE_ARGS '$arg'"
- ;;
- *)
- RECONFIGURE_ARGS="$RECONFIGURE_ARGS $arg"
- ;;
- esac
- fi
-done
-AC_SUBST(RECONFIGURE_ARGS)
#-----------------------------------------------------------------------------#
# Don't document this -- it's only used by the mercury_config script
Index: scripts/mercury_config.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mercury_config.in,v
retrieving revision 1.3
diff -u -u -r1.3 mercury_config.in
--- scripts/mercury_config.in 15 May 2003 07:23:43 -0000 1.3
+++ scripts/mercury_config.in 7 Oct 2003 12:29:47 -0000
@@ -129,6 +129,9 @@
touch $TMPDIR/scripts/Mercury.config.bootstrap.in || exit 1
touch $TMPDIR/Mmake.common.in $TMPDIR/bindist/bindist.INSTALL.in || exit 1
touch $TMPDIR/bindist/bindist.Makefile.in || exit 1
+mkdir $TMPDIR/tools || exit 1
+touch $TMPDIR/tools/lmc.in || exit 1
+touch $TMPDIR/tools/dotime.in || exit 1
cd $TMPDIR
case $# in
--------------------------------------------------------------------------
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