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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
# This file is part of CWEB.
# It is distributed WITHOUT ANY WARRANTY, express or implied.
# Version 3.0 --- June 1993
# Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
# Permission is granted to make and distribute verbatim copies of this
# document provided that the copyright notice and this permission notice
# are preserved on all copies.
# Permission is granted to copy and distribute modified versions of this
# document under the conditions for verbatim copying, provided that the
# entire resulting derived work is given a different name and distributed
# under the terms of a permission notice identical to this one.
#
# Read the README file, then edit this file to reflect local conditions
#
# directory for TeX inputs (cwebmac.tex goes here)
#MACROSDIR= /usr/local/lib/tex/inputs
MACROSDIR= debian/tmp/usr/lib/texmf/tex/generic/misc
# directory for CWEB inputs in @i files
CWEBINPUTS= /usr/lib/cweb
# extension for manual pages ("l" distinguishes local from system stuff)
#MANEXT= l
MANEXT= 1
# directory for manual pages (cweb.1 goes here)
MANDIR= debian/tmp/usr/man/man$(MANEXT)
# destination directory for executables; must end in /
#DESTDIR= /usr/local/bin/
DESTDIR= debian/tmp/usr/bin/
# directory for GNU EMACS Lisp code (cweb.el goes here)
EMACSDIR= debian/tmp/usr/share/emacs/site-lisp
# Set DESTPREF to null if you want to call the executables "tangle" and "weave"
# (probably NOT a good idea; we recommend leaving DESTPREF=c)
DESTPREF=c
# Set CCHANGES to comm-foo.ch if you need changes to common.w
CCHANGES=
# Set TCHANGES to ctang-foo.ch if you need changes to ctangle.w
TCHANGES=
# Set WCHANGES to cweav-foo.ch if you need changes to cweave.w
WCHANGES=
# We keep debugging info around, for fun, but most users don't need it
#CFLAGS = -g
CFLAGS = -O2
#LINKFLAGS = -g
LINKFLAGS = -s # for smaller (stripped) executables on many UNIX systems
# What C compiler are you using?
CC = gcc
# RM and CP are used below in case rm and cp are aliased
RM= /bin/rm
CP= /bin/cp
########## You shouldn't have to change anything after this point #######
CWEAVE = ./cweave
CTANGLE = ./ctangle
SOURCES = cweave.w common.w ctangle.w
ALMOSTALL = common.w ctangle.w Makefile README common.c common.h ctangle.c \
cwebman.tex cwebmac.tex examples comm-vms.ch ctang-vms.ch \
cweav-vms.ch comm-man.ch ctang-man.ch cweav-man.ch \
comm-pc.ch ctang-pc.ch cweav-pc.ch comm-amiga.ch \
comm-bs.ch ctang-bs.ch cweav-bs.ch makefile.bs \
comm-ql.ch ctang-ql.ch cweav-ql.ch readme.ql \
comm-os2.ch cweb.1 cweb.el prod.w
ALL = $(ALMOSTALL) cweave.w
.SUFFIXES: .dvi .tex .w
.w.tex:
$(CWEAVE) $*
.tex.dvi:
tex $<
.w.dvi:
make $*.tex
make $*.dvi
.w.c:
$(CTANGLE) $*
.w.o:
make $*.c
make $*.o
all: ctangle cweave
cautiously: ctangle
$(CP) common.c SAVEcommon.c
./ctangle common $(CCHANGES)
diff common.c SAVEcommon.c
$(RM) SAVEcommon.c
$(CP) ctangle.c SAVEctangle.c
./ctangle ctangle $(TCHANGES)
diff ctangle.c SAVEctangle.c
$(RM) SAVEctangle.c
SAVEctangle.c:
$(CP) ctangle.c SAVEctangle.c
SAVEcommon.c:
$(CP) common.c SAVEcommon.c
common.c: common.w $(CCHANGES)
$(CTANGLE) common $(CCHANGES)
common.o: common.c
$(CC) $(CFLAGS) -DCWEBINPUTS=\"$(CWEBINPUTS)\" -c common.c
ctangle: ctangle.o common.o
$(CC) $(LINKFLAGS) -o ctangle ctangle.o common.o
ctangle.c: ctangle.w $(TCHANGES)
$(CTANGLE) ctangle $(TCHANGES)
cweave: cweave.o common.o
$(CC) $(LINKFLAGS) -o cweave cweave.o common.o
cweave.c: cweave.w $(WCHANGES)
$(CTANGLE) cweave $(WCHANGES)
doc: $(SOURCES:.w=.dvi)
usermanual: cwebman.tex cwebmac.tex
tex cwebman
fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch
make cweave
./cweave common.w comm-man.ch
tex common.tex
./cweave ctangle.w ctang-man.ch
tex ctangle.tex
./cweave cweave.w cweav-man.ch
tex cweave.tex
# be sure to leave ctangle.c and common.c for bootstrapping
clean:
$(RM) -f -r *~ *.o common.tex cweave.tex cweave.c ctangle.tex \
*.log *.dvi *.toc *.idx *.scn core cweave.w.[12] cweave ctangle
install: all
$(CP) cweave $(DESTDIR)$(DESTPREF)weave
chmod 755 $(DESTDIR)$(DESTPREF)weave
$(CP) ctangle $(DESTDIR)$(DESTPREF)tangle
chmod 755 $(DESTDIR)$(DESTPREF)tangle
$(CP) cweb.1 $(MANDIR)/cweb.$(MANEXT)
chmod 644 $(MANDIR)/cweb.$(MANEXT)
$(CP) cwebmac.tex $(MACROSDIR)
chmod 644 $(MACROSDIR)/cwebmac.tex
$(CP) cweb.el $(EMACSDIR)
chmod 644 $(EMACSDIR)/cweb.el
bundle: $(ALL)
sed -n '1,2200 p' cweave.w > cweave.w.1
sed -n '2201,$$ p' cweave.w > cweave.w.2
/usr/local/bin/shar -m100000 -c -v -f cweb $(ALMOSTALL) cweave.w.[12]
tags: $(ALL)
etags -z $(ALL)
cweb.tar: $(ALL)
tar cvhf cweb.tar $(ALL)
floppy: $(ALL)
bar cvhf /dev/rfd0 $(ALL)
bar tvf /dev/rfd0
eject
|