[m-rev.] diff: automate Java symlink creation
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Dec 10 02:44:19 AEDT 2003
Estimated hours taken: 1
Branches: main
More work on the Java back-end: ensure that it builds properly
without needing manual tweaking of symlinks.
library/Mmakefile:
Ensure that we create appropriate symlinks for building
in grade java.
tools/bootcheck:
Like the "java" directory into the stage 2 and 3 directories,
so that the symlinks created by stage*/library/Mmakefile won't be
dangling.
Workspace: /home/ceres/fjh/mercury
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.118
diff -u -d -r1.118 Mmakefile
--- library/Mmakefile 6 Aug 2003 12:38:13 -0000 1.118
+++ library/Mmakefile 9 Dec 2003 15:42:36 -0000
@@ -96,7 +96,7 @@
# so we need to pass `--allow-stubs' to get them to compile.
# Since the standard library is compiled with `--halt-at-warn',
# we also need `--no-warn-stubs'.
-ifneq ("","$(findstring il,$(GRADE))$(findstring java, $(GRADE))")
+ifneq ("$(filter il% java%,$(GRADE)))","")
MCFLAGS += --allow-stubs --no-warn-stubs
endif
@@ -226,8 +226,19 @@
# rather than compiling them separately. This is needed because
# otherwise javac doesn't handle cyclic dependencies between different
# modules.
-classes: javas
+classes: javas java_symlinks
$(JAVAC) $(JAVACFLAGS) $(JAVAS)
+
+# javac expects to find the sources for symbols named mercury.* in
+# files mercury/*, and likewise for symbols named mercury.runtime.*
+# in mercury/runtime/*. But in our sources, those symbols actually
+# come from this directory (library/*) and from java/runtime/*,
+# respectively. So we set up some symbolic links to help
+# javac find the way to the sources.
+.PHONY: java_symlinks
+java_symlinks:
+ [ -d mercury ] || ln -s . mercury
+ [ -d runtime ] || ln -s $(MERCURY_DIR)/java/runtime .
#-----------------------------------------------------------------------------#
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.155
diff -u -d -r1.155 bootcheck
--- tools/bootcheck 27 Oct 2003 06:00:47 -0000 1.155
+++ tools/bootcheck 9 Dec 2003 15:27:57 -0000
@@ -587,6 +587,7 @@
else
$LN_S $root/boehm_gc .
fi
+ $LN_S $root/java .
$LN_S $root/mps_gc .
$LN_S $root/bindist .
$LN_S $root/doc .
@@ -863,6 +864,7 @@
$LN_S $root/analysis/$ANALYSIS_LIB_NAME.init .
cd $root/stage3
$LN_S $root/boehm_gc .
+ $LN_S $root/java .
$LN_S $root/mps_gc .
$LN_S $root/bindist .
$LN_S $root/doc .
--
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