[m-rev.] diff: bug in outputting mercury and foreign type declarations in .opt file
Simon Taylor
stayl at cs.mu.OZ.AU
Fri Dec 13 22:10:37 AEDT 2002
On 13-Dec-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> fjh wrote:
> > On 12-Dec-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > > On 10-Dec-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> > > > I have built a test case for this, but the problems only shows up when
> you
> > > > build the .opt file in say a C grade and use the .opt file when
> building
> > > > in the IL grade.
> > >
> > > That's not a bug -- the `.opt' files are grade dependent.
> > > If this is causing test failures, the correct fix is probably
> > > to put `GRADEFLAGS-test = il' in Mercury.options.
> >
> > I think the issue shows up when running the tests against a workspace
> > (e.g. when the tests get run from tools/bootcheck).
> > The workspace typically gets compiled with a C grade,
> > but the IL tests need a .opt file that was built with an IL grade.
> >
> No the problem shows up with installed compilers, because only the copy of
> the .opt files built with the default grade are installed, So when they are
> used to compile an IL program you always get an error, about only a C
> foreign type for io:buffer being available.
The following diff should fix this problem. I don't have a Windows
box handy, so Pete, if you could test and commit it, that would be great.
Is there any reason why a generalised version of the code below
isn't in scripts/Mmake.rules?
Simon.
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.103
diff -u -u -r1.103 Mmakefile
--- Mmakefile 27 Nov 2002 11:33:58 -0000 1.103
+++ Mmakefile 13 Dec 2002 10:38:17 -0000
@@ -367,7 +367,9 @@
ifneq (,$(findstring il,$(GRADE)))
.PHONY: install_library
-install_library: mercury.dll install_grade_dirs install_gac install_strong_name
+install_library: mercury.dll install_grade_dirs install_gac \
+ install_strong_name lib$(STD_LIB_NAME).install_grade_hdrs \
+ lib$(STD_LIB_NAME).install_opts
cp `vpath_find $($(STD_LIB_NAME).foreign_dlls) $($(STD_LIB_NAME).dlls) \
mercury.dll` $(INSTALL_MERC_LIB_DIR)
--------------------------------------------------------------------------
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