hlitz
hlitz

Reputation: 655

makefile for latex aspell with multiple files

I neeed to run aspell on all tex files within a directory using a makefile

spellcheck:
    @aspell --lang=en -t -c sections/*tex

does not work as aspell cannot handle multiple files. How can I run multiple runs of aspell one after another?

Upvotes: 3

Views: 483

Answers (1)

RTLinuxSW
RTLinuxSW

Reputation: 842

Make a rule to run each file

TEX_FILES = $(wildcard sections/*.tex)
.PHONY: spellcheck
spellcheck: $(addsuffix .spchk,$(basename $(TEX_FILES)))

%.spchk: %.tex
    @aspell --lang=en -t -c $<

Upvotes: 4

Related Questions