The problem with

  `gcc -L. -shared -o libcrlibm.dylib $(find . -d 1 -name *.o)`

is that the stuff inside $(...) is interpreted as julia code.

I'm not sure what's the best way to do this -- maybe something like:

  pipeline(`find . -d 1 -name *.o`, `xargs gcc -L. -shared -o libcrlibm.dylib`)

?

-Mike

On Thu, Sep 17, 2015 at 5:06 PM, David P. Sanders <[email protected]> wrote:
> Hi,
>
> I am almost ready to release a simple wrapper of the CRlibm library: see
> https://github.com/dpsanders/CRlibm.jl
>
> The last (?) step I need is to get the gcc command in the below build script
> in deps/build.jl to work.
> Could somone please suggest how to do this? The problem is that *.o is not
> expanded in Julia commands
> (maybe this could be added?)
>
> I found a previous discussion at
> https://groups.google.com/forum/#!topic/julia-users/hzBeluKU7P0
>
> I tried the solutions suggested, but the ones involving Julia code don't
> seem
> to work inside the @build_steps macro, and the one using find, implemented
> as
>
>  `gcc -L. -shared -o libcrlibm.dylib $(find . -d 1 -name *.o)`
>
> gives
> ERROR: ParseError("missing separator in tuple")
>
> Thanks,
> David
>
> Extract from script:
>
> provides(SimpleBuild,
>     (@build_steps begin
>         GetSources(libcrlibm)
>
>         @build_steps begin
>             ChangeDirectory(srcdir)
>             @build_steps begin
>                 `./configure CFLAGS=-fpic`
>                 `make`
>
>                 `gcc -L. -shared -o libcrlibm.dylib *.o`
>             end
>         end
>     end),
>     libcrlibm, os = :Unix
> )
>
> (How is one supposed to include code here??)

Reply via email to