[mercury-users] Using not installed libraries
Ondrej Bojar
oboj7042 at ss1000.ms.mff.cuni.cz
Fri Apr 4 20:21:43 AEST 2003
Hi.
Thanks for the hints.
For those interested in the simplified inclusion scenario I proposed in
the first mail, here are the generalized rules for Mmake:
I'm using three noninstalled libraries from two different directories, so
I've augmented my Mmakefile with these:
NONINSTALLED_LIBRARIES=lex sentence tools
NONINSTALLED_LIB_DIRS=$(HOME)/tools/obomerclib $(HOME)/tools/src/lex/
NONINSTALLED_LIB_INITS=$(HOME)/tools/obomerclib/sentence.init \
$(HOME)/tools/obomerclib/tools.init \
$(HOME)/tools/src/lex/lex.init
I do not like the necessity of specifing the .inits by hand, but I can't
do it better now.
Then to make these defined libraries to be actually used by mmake and
other tools, these generic lines must follow. (Maybe the could be added to
the default mmake rules for the whole installation.)
# Tell mmake to use the noninstalled libraries:
# First a 'make' hack for substituting a space
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_MCFLAGS) \
$(NONINSTALLED_LIB_DIRS:%=-L%)
MLLIBS=$(NONINSTALLED_LIBRARIES:%=-l%) $(EXTRA_MLLIBS)
C2INITARGS=$(NONINSTALLED_LIB_INITS)
CFLAGS+= $(NONINSTALLED_LIB_DIRS:%=-I%)
Cheers, Andrew.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list