[m-dev.] diff: fix bug in Mmake rules for installing .int files
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Feb 9 14:39:14 AEDT 2000
This fixes a problem that showed up in the nightly tests.
----------
Estimated hours taken: 0.5
compiler/modules.m:
Fix a bug in the Mmake rules that we generate for installing
interface files: if the directory for the interface files
already exists, then don't try to create it.
Also add some additional quotes, to avoid problems here
if $(INSTALL_INT_DIR) contains spaces.
Workspace: /home/mercury0/fjh/mercury
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.115
diff -u -d -r1.115 modules.m
--- modules.m 2000/01/11 07:53:40 1.115
+++ modules.m 2000/02/09 03:37:54
@@ -2814,23 +2814,22 @@
LibInstallIntsTargetName),
{ InstallIntsRuleBody =
" for file in $$files; do \\
- target=$(INSTALL_INT_DIR)/`basename $$file`; \\
- if cmp -s $$file $$target; then \\
+ target=""$(INSTALL_INT_DIR)/`basename $$file`""; \\
+ if cmp -s ""$$file"" ""$$target""; then \\
echo \"$$target unchanged\"; \\
else \\
echo \"installing $$target\"; \\
- cp $$file $$target; \\
+ cp ""$$file"" ""$$target""; \\
fi; \\
done
# The following is needed to support the `--use-subdirs' option
# We try using `ln -s', but if that fails, then we just use `cp'.
for ext in int int2 int3 opt trans_opt; do \\
- dir=$${ext}s; \\
- rm -f $(INSTALL_INT_DIR)/Mercury/$$dir; \\
- ln -s .. $(INSTALL_INT_DIR)/Mercury/$$dir || { \\
- mkdir $(INSTALL_INT_DIR)/Mercury/$$dir && \\
- cp $(INSTALL_INT_DIR)/*.$$ext \\
- $(INSTALL_INT_DIR)/Mercury/$$dir; \\
+ dir=""$(INSTALL_INT_DIR)/Mercury/$${ext}s""; \\
+ rm -f ""$$dir""; \\
+ ln -s .. ""$$dir"" || { \\
+ { [ -d ""$$dir"" ] || mkdir ""$$dir""; } && \\
+ cp ""$(INSTALL_INT_DIR)""/*.$$ext ""$$dir""; \\
} || exit 1; \\
done\n\n" },
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list