[mercury-users] mmc --make and not installed libraries
Ondrej Bojar
obo at cuni.cz
Wed Nov 8 02:36:10 AEDT 2006
Hi.
Recently, I started to prefer 'mmc --make' to 'mmake'. However, I am not
able to transform an older mmake trick for mmc. I want to use custom
mercury libraries in other mercury programs without the necessity of
installing the libraries over and over. (In fact, I'm debugging library
routines by using them in another program.)
For mmake, the trick was to add a few lines to Mmakefile of the program
and just compile the library in its place and then compile the program
in its place:
NONINSTALLED_LIBRARIES=tools concurrency
NONINSTALLED_LIB_DIRS=$(HOME)/tools/obomerclib \
$(HOME)/tools/src/concurrency
NONINSTALLED_LIB_INITS=$(HOME)/tools/obomerclib/tools.init \
$(HOME)/tools/src/concurrency/concurrency.init
# Tell mmake to use the noninstalled libraries:
empty:=
space:= $(empty) $(empty)
VPATH=$(subst $(space),:,$(NONINSTALLED_LIB_DIRS)):$(MMAKE_VPATH)
MCFLAGS=$(NONINSTALLED_LIB_DIRS:%=-I%) $(EXTRA_MCFLAGS)
MLFLAGS=$(NONINSTALLED_LIB_DIRS:%=-R%) $(EXTRA_MLFLAGS) \
$(NONINSTALLED_LIB_DIRS:%=-L%)
MLLIBS=$(NONINSTALLED_LIBRARIES:%=-l%) $(EXTRA_MLLIBS)
C2INITARGS=$(NONINSTALLED_LIB_INITS)
CFLAGS+= $(NONINSTALLED_LIB_DIRS:%=-I%)
# End of inclusion of non-installed libraries
Now, both the library and the main programs are compiled with 'mmc
--make --use-grade-subdirs'. Unfortunately all my attempts of adding the
library directory to various search paths of mmc ended with a simple
message: could not find some_library_module.m source file. I'm not
exactly sure about the semantics of (g)make VPATH, but it seems to me
that mmc would need to support a similar concept.
I only managed to reduce the number of libgrades, so that library
installation process is a bit faster, but I would be grateful for any
speedup.
Is there at least a way to reuse .c-files and .o-files (of various
libgrades) when installing the library with mmc? My mmc deletes them
after every installation.
Thanks, Ondrej.
P.S.: Sorry for multiple posting if my question arrives twice.
--
Ondrej Bojar (mailto:obo at cuni.cz)
http://www.cuni.cz/~obo
--------------------------------------------------------------------------
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