My project folders look like this
Makefile
/src
/flash
build.xml
/blabla
...
I wrote a Makefile like this
flash: src/flash/bin-debug/App.swf
src/flash/bin-debug/App.swf:
cd src/flash
ant
When I execute make flash, I get the following message:
cd src/flash/
ant
Buildfile: build.xml does not exist!
Build failed
make: *** [src/flash/bin-debug/App.swf] Error 1
How can I execute ant in src/flash
As explained by aix, you must write
cd src/flash; anton a single line.As you haven’t specified any dependencies for the App.swf target, make cannot rebuild when they change. You could add them. The problem is that you don’t want to duplicate the work you are already doing with ant.
With GNU Make the solution is to use a phony target. It is a type of target that is not interpreted as a file name and whose commands will be executed every time the target is built.
This looks something like this:
Typing
make flashrepeatedly will invoke ant every time.