0

I have a makefile that creates a certain executable. This executable has to be in a certain directory to be able to run, so everytime I compile and make, i have to move it manually
Is there any way to tell the makefile to also move the file to a location.
For example, "test" is the output, what is the instruction to move from /home/user/Desktop to /var/lib/asterisk

Thanks

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by ContactaCall
0

You could create a rule called 'install', which copies from the build directory to the target directory.

0

I tried this

install:
        $ mv /home/juan/Desktop/Codigos\IVR/ppal.agi /var/lib/asterisk/agi-bin

but doesn't seem to work when I make it.
I'm kinda noob to makefiles

0
install: /home/juan/Desktop/Codigos/IVR/ppal.agi
        mv /home/juan/Desktop/Codigos/IVR/ppal.agi /var/lib/asterisk/agi-bin

I was thinking along these lines

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.