I use a makefile on Mac OS X and I try to zip a directory in another folder where my makefile is :
My makefile is in folder : /Volumes/Sources
And the folder to zip is : /Volumes/Bin/myapp
So I try to run zip command in makefile like this :
zip -r myapp.zip /Volumes/Bin/myapp
It works BUT in my zip archive, I have directories “Volumes”, “Bin”, “myapp”
And I don’t want, I would like all files and folders of /Volumes/Bin/myapp at the root of .zip archive.
I try “pushd” and “cd”, abut after changing directory, a “pwd” command shows that i didn’t change ! I’m still in /Volumes/Sources
Any help ?
Each command in a makefile rule acts in its own subshell. This won’t work:
Try this: