Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-08-30 02:32:59


On Wednesday 30 August 2006 04:01, Steve wrote:
> Steve <rev_benny_hinn <at> yahoo.com> writes:
> > I've tried registering .m files with the darwin.compile.c generator,
> > but when bjam runs I get a large number of complaints from g++ -
> > it appears to think that SDLMain.m is a c++ file as opposed to
> > an Objective-C file. I think I should be using gcc instead,
> > but am not sure how to write the appropriate jam code.
>
> Think I've managed to get this working. I hadn't noticed that you can
> use the '-x' flag to tell g++ which language it's compiling.
>
> I added the following lines to darwin.jam:
>
> # ------------------------------------------------------------
> # BEGIN Insertion into darwin.jam
> # ------------------------------------------------------------
>
> type.register M : m ;
>
> generators.register-c-compiler darwin.compile.m
>
> : M : OBJ : <toolset>darwin ;
>
> rule compile.m
> { LANG on $(<) = "-x objective-c" ; }
>
> actions compile.m
> { "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES)
> -I"$(INCLUDES)" -c -o "$(<)" "$(>)" }
>
> # ------------------------------------------------------------
> # END Insertion into darwin.jam
> # ------------------------------------------------------------
>
>
> Can anyone tell me if I've done this

Hi Steeve,
I think this is just fine. Would you like me to add this to mainline?
 
If so, the preferred way is to send a patch. The hacking.txt file describes
the submission details. Note that our preferred coding style puts braces on a
line by themself. Ah, and I'd also need your full name to properly give you
credit in changelog.

If you have no time for sending a patch, let me know and we'll integrate the
changes ourself.

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk