Here's a simple makefile I want PHP's exec to execute make on: KEYLIST := keylist.txt DEPS := $(wildcard *.txt) FILES := *.txt
$(KEYLIST): $(DEPS) grep ^keywords $(FILES) > $@ now when I use make from command line, it works as expected, the keylist.txt file is created. however, when I use PHP exec to run make on the makefile, the keylist.txt file is not generated. * if keylist.txt does not need updating, PHP exec make works, make says keylist.txt is up to date. * if i remove redirection, PHP exec make shows that grep is making the same matches as make from commandline. Why does the redirection of the grep command (within the makefile) only work when I execute make from the commandline but not from PHP exec||shell_exec? One sollution is to abandon redirection and get the output from grep into a string and then get PHP to create keylist.txt, but why do that? Any help appreciated. Cheers, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php