You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kamran Hameed <ka...@gmail.com> on 2008/08/12 06:08:24 UTC

make file in build.xml

folks i previously posted one such post.

i want to call a Makefile in my build.xml. The Makefile generates a lib.so
file which i want to move to a a directory in my src called /lib

Here is what i do

<target name="compileC">
      <exec dir="${mpjdev.native.dir}" executable="/usr/bin/make">
        <arg value="Makefile"/>
    </exec>
    </target>

<target name="movelib" description="move lib.so to lib">
  <move file="${mpjdev.native.dir}/libnativempjdev.so" todir="${lib.dir}"/>
    </target>

Here is the Problem.

If i call the makefile manually [by going into that directory and executing
make] and then execute ant, it works perfect and moves the .so file to /lib

But if i call just ant, it gives error

/home/kamran/build.xml:120: Warning: Could not find file
/home/kamran//src/mpjdev/nativ/lib/libnativempjdev.so to copy.

i-e it is not generating the makefile which i am trying to do in my first
target.. Can you tell how can i call make Makefile in build.xml so that when
i call ant, it runs and generates .so file which is then copied to /lib

Thanks

-- 
Kamran Hameed

http://hpc.niit.edu.pk/~kamran

Re: make file in build.xml

Posted by David Weintraub <qa...@gmail.com>.
How are you calling your build.xml? What target are you hitting?

Are you calling the "compileC" target? Try changing:

<target name="movelib" description="move lib.so to lib">

to

<target name="movelib" description="move lib.so to lib" depends="compileC">

That way, when you call movelib, it will first call "compileC" before
executing the target movelib.

--
David Weintraub
qazwart@gmail.com



On Tue, Aug 12, 2008 at 12:08 AM, Kamran Hameed <ka...@gmail.com> wrote:
> folks i previously posted one such post.
>
> i want to call a Makefile in my build.xml. The Makefile generates a lib.so
> file which i want to move to a a directory in my src called /lib
>
> Here is what i do
>
> <target name="compileC">
>      <exec dir="${mpjdev.native.dir}" executable="/usr/bin/make">
>        <arg value="Makefile"/>
>    </exec>
>    </target>
>
> <target name="movelib" description="move lib.so to lib">
>  <move file="${mpjdev.native.dir}/libnativempjdev.so" todir="${lib.dir}"/>
>    </target>
>
> Here is the Problem.
>
> If i call the makefile manually [by going into that directory and executing
> make] and then execute ant, it works perfect and moves the .so file to /lib
>
> But if i call just ant, it gives error
>
> /home/kamran/build.xml:120: Warning: Could not find file
> /home/kamran//src/mpjdev/nativ/lib/libnativempjdev.so to copy.
>
> i-e it is not generating the makefile which i am trying to do in my first
> target.. Can you tell how can i call make Makefile in build.xml so that when
> i call ant, it runs and generates .so file which is then copied to /lib
>
> Thanks
>
> --
> Kamran Hameed
>
> http://hpc.niit.edu.pk/~kamran
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org