[mercury-users] mdb default settings

Jörg Roman Rudnick joerg.rudnick at t-online.de
Sat Sep 9 02:01:15 AEST 2006


Dear experienced ones,


in the hope this might be a no-brainer, allow me to stop experimenting 
and present the following problem, which might be of interest toi other 
beginners, too:

To save time, I refer to the interesting example of Fergus Henderson in 
regard of usage of separate directories of Mercury code -- using the 
0.13.0-beta version of Mercury.

Using separate directories is fine - so I tried to combine it with 
--use-subdirs:

°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
$ mmake --use-subdirs depend

cd dirA && mmake depend
make[1]: Entering directory `/opt/Art/mercury/Arbeit/Holiday/examp/dirA'
mmc --generate-dependencies --grade asm_fast.gc      --use-subdirs     
moduleA
make[1]: Leaving directory `/opt/Art/mercury/Arbeit/Holiday/examp/dirA'
cd dirB && mmake depend
make[1]: Entering directory `/opt/Art/mercury/Arbeit/Holiday/examp/dirB'
mmc --generate-dependencies --grade asm_fast.gc      --use-subdirs   
--mld ../dirA --ml moduleA mainmodule
make[1]: Leaving directory `/opt/Art/mercury/Arbeit/Holiday/examp/dirB'
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
$ mmake --use-subdirs

/tmp/mmake.fESaeI:901: Warning: undefined variable 
»MMAKE_USE_SUBDIRS_EXPLICIT«
/tmp/mmake.fESaeI:925: Warning: undefined variable 
»MMAKE_USE_SUBDIRS_EXPLICIT«
cd dirA && mmake
make[1]: Entering directory `/opt/Art/mercury/Arbeit/Holiday/examp/dirA'
/tmp/mmake.NqIfE4:1244: Warning: undefined variable 
»MMAKE_USE_SUBDIRS_EXPLICIT«
/tmp/mmake.NqIfE4:1268: Warning: undefined variable 
»MMAKE_USE_SUBDIRS_EXPLICIT«
mmc --compile-to-c --grade asm_fast.gc      --use-subdirs     moduleA > 
moduleA.err 2>&1
mgnuc --grade asm_fast.gc        --      -I. -IMercury/mihs/. -c 
Mercury/cs/moduleA.c -o Mercury/os/moduleA.o
rm -f libmoduleA.a
ar cr   libmoduleA.a Mercury/os/moduleA.o \

ranlib    libmoduleA.a
mgnuc --grade asm_fast.gc        --      -I. -IMercury/mihs/. -fpic 
-DMR_PIC \
                -c Mercury/cs/moduleA.c -o Mercury/os/moduleA.pic_o
ml --make-shared-lib --grade asm_fast.gc              --     -o 
libmoduleA.so \
                Mercury/os/moduleA.pic_o \

mmc --make-interface --grade asm_fast.gc      --use-subdirs     moduleA
mmc --make-short-interface --grade asm_fast.gc      --use-subdirs     
moduleA
echo > moduleA.init
mkinit -k Mercury/cs/moduleA.c  >> moduleA.init
 >> moduleA.init
make[1]: Leaving directory `/opt/Art/mercury/Arbeit/Holiday/examp/dirA'
cd dirB && mmake
make[1]: Entering directory `/opt/Art/mercury/Arbeit/Holiday/examp/dirB'
/tmp/mmake.i7Nnuj:1258: Warning: undefined variable 
»MMAKE_USE_SUBDIRS_EXPLICIT«
/tmp/mmake.i7Nnuj:1282: Warning: undefined variable 
»MMAKE_USE_SUBDIRS_EXPLICIT«
mmc --compile-to-c --grade asm_fast.gc      --use-subdirs   --mld 
../dirA --ml moduleA mainmo dule > mainmodule.err 2>&1
make[1]: *** [Mercury/c_dates/mainmodule.c_date] Error 1
make[1]: Leaving directory `/opt/Art/mercury/Arbeit/Holiday/examp/dirB'
make: *** [dirB] Error 2
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
$ less dirB/mainmodule.err

mercury_compile: cannot find `Mercury/ints/moduleA.int' in directories 
., ../dirA/ints, /usr/local/mercury-0.13.0-beta-2006-08-25/lib/mercury/ints.
mainmodule.m:008: In clause for predicate `mainmodule.main/2':
mainmodule.m:008:   in argument 1 of call to predicate `print/3':
mainmodule.m:008:   error: undefined symbol `foo/0'.

°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

I've tried tried a bunch of approaches now, but no one really convincing 
- so how do YOU manage projects to be spreading over several directories 
without sacrificing '--use-subdirs'??

Btw., the point seems to show in the first line of dirB/mainmodule.err,
"... cannot find `Mercury/ints/moduleA.int' in directories ., 
../dirA/ints, ...":

The first part seems to enforce in 'subdir'-mode, the second 
non-'subdir'-mode - this looks queer...


I will be grateful for any hint about how to get such jobs done in an 
efficient way.


Thank you in advance,

          Nick











-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-example.tar.gz
Type: application/x-gzip
Size: 649 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20060908/f4a5a23b/attachment.bin>


More information about the users mailing list