File: 04_parallel_build

package info (click to toggle)
cwebx 3.52-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,280 kB
  • sloc: ansic: 1,622; pascal: 228; makefile: 123; sh: 1
file content (73 lines) | stat: -rw-r--r-- 2,074 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@
 # If you don't, then your compiler might squirm about identifiers that it
 # predeclares without us having asked it to, and which conflict with the
 # identifiers actually used in the CWEBx source, which then fails to compile.
-CC = gcc
+# CC = gcc
 
 # Command line flags for CTANGLE and CWEAVE while building CWEB
 # We let CWEAVE report syntax errors by setting +d.
@@ -56,19 +56,16 @@
 CTANGLE = ./ctanglex $(CTFLAGS)
 PDFTEX = pdftex
 
-.SUFFIXES:
-.SUFFIXES: .w .c .o .tex .pdf
-
-.w.tex:
+%.tex: %.w cweavex
 	$(CWEAVE) $*
 
-.tex.pdf:
+%.pdf: %.tex
 	$(PDFTEX) $*.tex
 
-.w.c:
+%.c: %.w ctanglex
 	$(CTANGLE) $*
 
-.c.o:
+%.o: %.c
 	$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
 
 .PHONY: all cweb manual doc listings cautiously
@@ -100,30 +97,30 @@
 SAVEcommon.c:
 	$(CP) common.c SAVEcommon.c
 
-common.c: common.w $(CCHANGES) common.inc
+common.c: common.w $(CCHANGES) common.inc ctanglex
 	$(CTANGLE) common $(CCHANGES)
-common.h: common.w $(CCHANGES)
+common.h: common.w $(CCHANGES) ctanglex
 	$(CTANGLE) common $(CCHANGES)
 
-common.tex:  common.w common.inc
+common.tex: common.w common.inc cweavex
 	$(CWEAVE) common $(CCHANGES)
 
 ctanglex: ctangle.o common.o
 	$(CC) $(CFLAGS) $(LDFLAGS) -o ctanglex ctangle.o common.o
 
-ctangle.c: ctangle.w $(TCHANGES) common.inc common.h
+ctangle.c: ctangle.w $(TCHANGES) common.inc common.h ctanglex
 	$(CTANGLE) ctangle $(TCHANGES)
 
-ctangle.tex:  ctangle.w $(TCHANGES) common.inc intro.inc
+ctangle.tex:  ctangle.w $(TCHANGES) common.inc intro.inc cweavex
 	$(CWEAVE) ctangle $(TCHANGES)
 
 cweavex: cweave.o common.o
 	$(CC) $(CFLAGS) $(LDFLAGS) -o cweavex cweave.o common.o
 
-cweave.c: cweave.w $(WCHANGES) common.inc common.h parser.w rules.w
+cweave.c: cweave.w $(WCHANGES) common.inc common.h parser.w rules.w ctanglex
 	$(CTANGLE) cweave $(WCHANGES)
 
-cweave.tex:  cweave.w $(WCHANGES) parser.w rules.w common.inc intro.inc
+cweave.tex:  cweave.w $(WCHANGES) parser.w rules.w common.inc intro.inc cweavex
 	$(CWEAVE) cweave $(WCHANGES)
 
 manual.pdf: compare.tex