Re: exec('make') Q
| From: | Roman Neuhauser | Date: | Tue, 23 Jan 2007 00:12:31 +0000 |
| Subject: | Re: exec('make') Q | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247583@lists.php.net to get a copy of this message | ||
# james@jwm-art.net / 2007-01-22 23:45:09 +0000:
> 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) > $@
Does that line in the real Makefile begin with a tab? It must.
Why is it so roundabout about $(DEPS)/$(FILES)? The target *actuall*
depends on different files than those declared in the sources list!
What does $(DEPS) (and $(FILES)) contain?
This is what your Makefile does, BTW:
grep ^keywords keylist.txt ... > keylist.txt
Try it with this instead (rename keylist.txt to key.list), but make sure
you have at least one file ending in .txt in that directory first!):
KEYLIST := key.list
FILES := $(wildcard *.txt)
$(KEYLIST): $(FILES) ; grep '^keywords' $^ > $@
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991