[mercury-users] Using libraries with mmc --make

Jonathan Morgan jonmmorgan at gmail.com
Mon Aug 14 12:45:54 AEST 2006


I have the following Mmakefile, which is used to link my code with extras/xml.

Mmakefile:
EXTRA_LIB_DIRS = /home/stude1/j/jmmorgan/mercury/xml/lib/mercury
EXTRA_LIBRARIES = xml
MCFLAGS = --mercury-linkage static
MLFLAGS=-static

default_target: mgtk_xml

depend: mgtk_xml.depend

clean: mgtk_xml.clean


However, if I translate it into an ordinary Makefile based on mmc
--make then it complains that it can't find xml.m and similar files.

Makefile:
TARGET=mgtk_xml
GRADE=asm_fast.gc
MCFLAGS=--infer-all --mercury-linkage static --ld-flag "-static"
$(TARGET):
	mmc --make $(MCFLAGS) --grade $(GRADE) \
	--mld /home/stude1/j/jmmorgan/mercury/xml/lib/mercury --ml xml $(TARGET)

clean:
	mmc --make $(TARGET).clean

The output is as follows, despite the fact that mmc --make and mmake
both end up using --mld and --ml:

mmc --make --infer-all --mercury-linkage static --ld-flag "-static"
--grade asm_fast.gc \
	--mld /home/stude1/j/jmmorgan/mercury/xml/lib/mercury --ml xml mgtk_xml
Making Mercury/int3s/mgtk_xml.int3
** Error reading file `xml.m' to generate dependencies: file `xml.m' not found.
** Module `xml' is imported or included by module `mgtk_xml'.
** Error reading file `xml.encoding.m' to generate dependencies: file
`xml.encoding.m' not found.
** Module `xml.encoding' is imported or included by module `mgtk_xml'.
** Error reading file `xml.cat.m' to generate dependencies: file
`xml.cat.m' not found.
** Module `xml.cat' is imported or included by module `xml'.
** Error reading file `xml.dtd.m' to generate dependencies: file
`xml.dtd.m' not found.
** Module `xml.dtd' is imported or included by module `xml.cat'.
** Error reading file `xml.doc.m' to generate dependencies: file
`xml.doc.m' not found.
** Module `xml.doc' is imported or included by module `xml'.
** Error reading file `xml.parse.m' to generate dependencies: file
`xml.parse.m' not found.
** Module `xml.parse' is imported or included by module `xml'.
** Error reading file `xml.parse.chars.m' to generate dependencies:
file `xml.parse.chars.m' not found.
** Module `xml.parse.chars' is imported or included by module `xml.parse'.
** Error reading file `xml.ns.m' to generate dependencies: file
`xml.ns.m' not found.
** Module `xml.ns' is imported or included by module `xml'.
** dependencies for `Mercury/ints/xml.int' do not exist: xml.m
** This indicates a bug in `mmc --make'.
make: *** [mgtk_xml] Error 1

Any idea why this might happen?

Jon
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list