*** make error
"*** make: No rule to make target `5 Sep 2011.mp3', needed by `mp3'. Stop."
This is the error when i use to run a script that convert .gsm file to .mp3.. Kindly look for the Makefile that i created: DIRWAV = $(shell dir *.wav) ALLWAV = $(DIRWAV:.wav=.mp3) DIRGSM = $(shell dir *.gsm) ALLGSM = $(DIRGSM:.gsm=.mp3) mp3: $(ALLWAV) $(ALLGSM) %.mp3: %.wav nice lame --quiet --preset phone $? $@ rm -f $? %.wav: %.gsm nice sox $? -r 8000 -c 1 -w -s $@ rm -f $? clean: rm -f *.mp3 rm -f *.wav rm -f *.raw rm -f *.gsm cp /dir/dir/dir/dir/*.wav . cp /dir/dir/dir/dir/a*.gsm . Please help on how to fix it..thanks.. |
Hi and Welcome to LQ!
Do you really need to use "make" on a (bash?) script? jdk |
Quote:
i use to type "make" on the CLI and it gaves me the error. It supposed to execute the nice command base on the script.. but when i try to type the script manually on the CLI it allow me to convert .gsm to .mp3 without any error.. |
Don't use make with a script. Read this: http://linux.about.com/od/itl_guide/a/gdeitl55t04.htm
ciao, jdk |
Quote:
this script is perfectly working on the old server but it got an error when I'am on the new server..the only reason that gives me an error is the quote.. i try to convert file with no spaces..and it works.. but when i try another file with spaces it gave me an error.. do u have any idea on how to fix the quote problem? I'm just wondering if there's an application,plugin or something like that..that allow CLI to read two words without quote.. |
Sorry I don't understand you. Maybe somebody else can.
ciao, jdk |
Quote:
for me to do that..I need to create a Makefile and that Makefile use to execute when I type "cd /dir/dir/dir; make" command on the CLI.. It will scan the directory and look for all .gsm file and convert it into .wav and convert again into the .mp3 format, that is how the above script do.. If the .gsm filename contains spaces the shell returns me an error like this: "dir: *.wav: No such file or directory make: *** No rule to make target `1 3.mp3', needed by `mp3'. Stop." But if there's no spaces in the filename of .gsm file it works perfectly and convert all the .gsm file into .mp3.. Please help.. |
You mean this? http://www.cyberciti.biz/tips/handli...s-in-bash.html
Does that fix your problem? jdk |
I think this one:
http://astrecipes.net/index.php?n=294 ........ What I'm working on is to record a phone call using the asterisk.. but the result is .gsm and i need to convert it into .wav and .mp3 by the help of sox and lame. and that Makefile is the solution.. the script is perfectly working when i was on the old server.. when i got a new server and transfer everything from old to new server including this project.. everything is messed up. I'm just wondering if it is the version of the new server..or the make command..I don't know.. Any idea?.. |
All times are GMT -5. The time now is 10:13 PM. |