Line | |
---|
1 | PAS := $(shell ls *.pas) |
---|
2 | |
---|
3 | CPP := $(shell ls *.cpp) |
---|
4 | |
---|
5 | TEX = ${PAS:.pas=.tex} ${CPP:.cpp=.tex} |
---|
6 | |
---|
7 | C2TEX = ./c2tex.exe |
---|
8 | |
---|
9 | |
---|
10 | DEFAULT: $(C2TEX) $(TEX) |
---|
11 | |
---|
12 | |
---|
13 | clean: |
---|
14 | rm -f $(TEX) |
---|
15 | |
---|
16 | |
---|
17 | $(C2TEX): |
---|
18 | g++ c2tex.cpp -o c2tex |
---|
19 | |
---|
20 | |
---|
21 | .SUFFIXES: .pas .cpp .tex |
---|
22 | |
---|
23 | |
---|
24 | |
---|
25 | .pas.tex: $(C2TEX) |
---|
26 | @echo "Converting $< to $@ ..." |
---|
27 | @$(C2TEX) $< $@ -pascal -numbers |
---|
28 | @echo "done." |
---|
29 | |
---|
30 | .cpp.tex: $(C2TEX) |
---|
31 | @echo "Converting $< to $@ ..." |
---|
32 | @$(C2TEX) $< $@ -numbers |
---|
33 | @echo "done." |
---|
34 | |
---|
Note: See
TracBrowser
for help on using the repository browser.