[mercury-users] Ouch! The .m extension and Objective-C
Roy Ward
roy at videoscript.com
Sat Aug 18 09:52:06 AEST 2001
Hi all,
I'm in the possibly unusual situation of being someone
who deveops in both Mercury and Objective-C (just
starting on Objective-C). As you may know, there is
an extension conflict here. (I'm not using them in the
same project yet, but I can see wanting to do that one
day - Objective-C with cocoa is suitable for front ends
and Mercury is great for engines).
Given that I don't think I stand any hope of convincing
all the objective-C tools to use a more sensible
extension (thus leaving the .m extension to Mercury where
it so obviously belongs ;-), has anyone done any work
on munging Mercury to use another extension?
I've included a post from Tue Oct 05 1999 from
Fergus Henderson, is it still relevant, and has anyone
looked at doing this?
[Aside - this the sort of reason that I don't like
filename extensions in the first place - but I imagine
that getting Mercury or GNU tools to work with Apple
type/creator codes is an even bigger ask]
Looking forward to having Mercury and Objective-C
behaving nicely on my MacOSX box.
Cheers,
Roy Ward.
> A new string-value option, called say `--source-extension',
> would need to be added in compiler/options.m, together with
> a predicate to look up the value of this option in the options
> table.
>
> The commands
>
> fgrep '".m"' compiler/*.m
> fgrep ".m'" compiler/*.m
>
> show all the places in the compiler that would need to be changed
> to call this new predicate.
>
> In addition, scripts/Mmake.rules contains lots of occurrences
> of `.m' that would need to change. The best way to do it
> would be to define a variable called say MERCURY_SOURCE_EXTENSION
> in scripts/Mmake.vars.in and then replace all the occurrences
> of `.m' in scripts/Mmake.rules with $(MERCURY_SOURCE_EXTENSION).
> For extra credit you could introduce a new option called say
> `--source-extension' in scripts/mmake.in, which would set that
> variable.
>
> I think that is all, but it is possible that I may have missed
> some other places that might need to be changed.
> If anyone does want to have a go at this, make sure you start
> with a relatively recent release-of-the-day release, to minimize
> difficulty in merging your changes with our latest development
> version.
--------------------------------------------------------------------------
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