[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie and not very techie - using GNU make for non-C-development ta
From: |
John Christopher |
Subject: |
Re: Newbie and not very techie - using GNU make for non-C-development tasks |
Date: |
Mon, 7 Jul 2014 04:30:23 -0700 |
John Christopher wrote:
> I have the following Makefile:
> $ cat Makefile
> out/%.txt: in/%.txt
> foo $< > $@
> This does not work as expected (I get an error message I do not understand).
Paul Smith <address@hidden> replied:
> You may not understand it, but WE would probably understand it.
> If you told us what it was.
Right. Sorry.
$ ls in
file01.txt file02.txt file03.txt
$ ls out
$ cat Makefile
out/%.txt: in/%.txt
sed 's/happy/glad/g' $< > $@
$ make
make: *** No targets. Stop.
$ ls out
$ vi Makefile (changed % to *)
$ cat Makefile
out/*.txt: in/*.txt
sed 's/happy/glad/g' $< > $@
$ make
sed 's/happy/glad/g' in/file01.txt > out/*.txt
$ ls out
*.txt
$
Hope that's more clear. Thanks again for your help.