Ep05: Streamline pattern rule explanation
gcapes opened this issue · comments
Gerard Capes commented
I wonder whether skipping straight over $*
in the following episode (5) on pattern rules would be advised? Its inclusion is slightly contrived, though its omission would only be showing 'half' of a pattern rule.
It is currently introduced like this
%.dat : books/%.txt countwords.py
python countwords.py $< $*.dat
but the pattern rule could be introduced more cleanly like this:
%.dat : countwords.py books/%.txt
python $^ $*.dat
Or, maybe more authentic still:
%.dat : countwords.py books/%.txt
python $^ $@
Originally posted by @gcapes in #166 (comment)