1 # This file is part of CWEB.
2 # It is distributed WITHOUT ANY WARRANTY, express or implied.
3 # Version 3.64 --- February 2002
5 # Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
7 # Permission is granted to make and distribute verbatim copies of this
8 # document provided that the copyright notice and this permission notice
9 # are preserved on all copies.
11 # Permission is granted to copy and distribute modified versions of this
12 # document under the conditions for verbatim copying, provided that the
13 # entire resulting derived work is given a different name and distributed
14 # under the terms of a permission notice identical to this one.
17 # Read the README file, then edit this file to reflect local conditions
20 # directory for TeX inputs (cwebmac.tex goes here)
21 MACROSDIR
= /usr
/share
/texmf
/tex/generic
23 # directory for CWEB inputs in @i files
24 CWEBINPUTS
= /usr
/local
/lib
/cweb
26 # extension for manual pages ("l" distinguishes local from system stuff)
30 # directory for manual pages (cweb.1 goes here)
31 MANDIR
= /usr
/share
/man
/man
$(MANEXT
)
33 # destination directory for executables; must end in /
34 DESTDIR
= /usr
/local
/bin
/
36 # directory for GNU EMACS Lisp code (cweb.el goes here)
37 EMACSDIR
= /usr
/share
/emacs
/site-lisp
39 # Set DESTPREF to null if you want to call the executables "tangle" and "weave"
40 # (probably NOT a good idea; we recommend leaving DESTPREF=c)
43 # Set CCHANGES to comm-foo.ch if you need changes to common.w
46 # Set TCHANGES to ctang-foo.ch if you need changes to ctangle.w
49 # Set WCHANGES to cweav-foo.ch if you need changes to cweave.w
52 # We keep debugging info around, for fun, but most users don't need it
56 #LINKFLAGS = -s # for smaller (stripped) executables on many UNIX systems
58 # What C compiler are you using?
61 # RM and CP are used below in case rm and cp are aliased
65 # uncomment the second line if you use pdftex to bypass .dvi files
69 ########## You shouldn't have to change anything after this point #######
73 SOURCES
= cweave.w common.w
ctangle.w
74 ALL
= common.w
ctangle.w
cweave.w prod.w \
75 Makefile common.c common.h
ctangle.c \
76 cwebman.
tex cwebmac.
tex comm-vms.ch ctang-vms.ch \
77 cweav-vms.ch comm-man.ch ctang-man.ch cweav-man.ch \
78 comm-pc.ch ctang-pc.ch cweav-pc.ch comm-amiga.ch \
79 comm-bs.ch ctang-bs.ch cweav-bs.ch makefile.bs \
80 comm-ql.ch ctang-ql.ch cweav-ql.ch readme.ql \
81 comm-w32.ch ctang-w32.ch cweav-w32.ch \
82 comm-os2.ch comm-mac.ch cweb
.1 cweb.el c
++lib.w README
84 .SUFFIXES
: .
dvi .
tex .w .pdf
105 case
"$(PDFTEX)" in \
106 dvipdfm
) tex "\let\pdf+ \input $*"; dvipdfm
$* ;; \
107 pdftex
) pdftex
$* ;; \
113 $(CP
) common.c SAVEcommon.c
114 .
/ctangle common
$(CCHANGES
)
115 diff common.c SAVEcommon.c
117 $(CP
) ctangle.c SAVEctangle.c
118 .
/ctangle ctangle $(TCHANGES
)
119 diff
ctangle.c SAVEctangle.c
123 $(CP
) ctangle.c SAVEctangle.c
126 $(CP
) common.c SAVEcommon.c
128 common.c
: common.w
$(CCHANGES
)
129 $(CTANGLE
) common
$(CCHANGES
)
132 $(CC
) $(CFLAGS
) -DCWEBINPUTS
=\"$(CWEBINPUTS
)\" -c common.c
134 ctangle: ctangle.o common.o
135 $(CC
) $(LINKFLAGS
) -o
ctangle ctangle.o common.o
137 ctangle.c
: ctangle.w
$(TCHANGES
)
138 $(CTANGLE
) ctangle $(TCHANGES
)
140 cweave: cweave.o common.o
141 $(CC
) $(LINKFLAGS
) -o
cweave cweave.o common.o
143 cweave.c
: cweave.w
$(WCHANGES
)
144 $(CTANGLE
) cweave $(WCHANGES
)
146 doc
: $(SOURCES
:.w
=.
dvi)
148 usermanual
: cwebman.
tex cwebmac.
tex
151 fullmanual
: usermanual
$(SOURCES
) comm-man.ch ctang-man.ch cweav-man.ch
153 .
/cweave common.w comm-man.ch
155 .
/cweave ctangle.w ctang-man.ch
157 .
/cweave cweave.w cweav-man.ch
160 # be sure to leave ctangle.c and common.c for bootstrapping
162 $(RM
) -f
-r
*~
*.o common.
tex cweave.
tex cweave.c
ctangle.
tex \
163 *.log
*.
dvi *.toc
*.idx
*.scn
*.pdf core
cweave ctangle
167 $(CP
) cweave $(DESTDIR
)$(DESTPREF
)weave
168 chmod
755 $(DESTDIR
)$(DESTPREF
)weave
169 $(CP
) ctangle $(DESTDIR
)$(DESTPREF
)tangle
170 chmod
755 $(DESTDIR
)$(DESTPREF
)tangle
172 $(CP
) cweb
.1 $(MANDIR
)/cweb.
$(MANEXT
)
173 chmod
644 $(MANDIR
)/cweb.
$(MANEXT
)
175 $(CP
) cwebmac.
tex $(MACROSDIR
)
176 chmod
644 $(MACROSDIR
)/cwebmac.
tex
178 $(CP
) cweb.el
$(EMACSDIR
)
179 chmod
644 $(EMACSDIR
)/cweb.el
180 - mkdir
$(CWEBINPUTS
)
181 $(CP
) c
++lib.w
$(CWEBINPUTS
)
182 chmod
644 $(CWEBINPUTS
)/c
++lib.w
184 floppy
: $(ALL
) examples
185 bar cvhf
/dev
/rfd0
$(ALL
) examples
192 tarfile
: $(ALL
) examples
193 tar cvhf
/tmp
/cweb.
tar $(ALL
) examples
194 gzip
-9 /tmp
/cweb.
tar