home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 1B
/
DATAFILE_PDCD1B.iso
/
_languages
/
languages
/
cweb
/
Make_Unix
< prev
next >
Wrap
Text File
|
1993-12-15
|
3KB
|
108 lines
# This file is part of CWEB, version 3.x.
#
# Read the README file, then edit this file to reflect local conditions
#
# The C compiler should be ANSI compatible
CC = cc
# We run cweave with the `+d' flag, and ctangle with only default settings
CWFLAGS = +d
CTFLAGS =
# We keep debugging info around to enable the `+d' option of cweave
CFLAGS = -DDEBUG -DSTAT -g
# RM and CP are used below in case rm and cp are aliased
RM= /bin/rm
CP= /bin/cp
RENAME= /bin/mv
# Set CCHANGES to common-foo.ch if you need changes to common.w in another
# file than common.ch
CCHANGES=
# Set TCHANGES to ctangle-foo.ch if you need changes to ctangle.w in another
# file than ctangle.ch
TCHANGES=
# Set WCHANGES to cweave-foo.ch if you need changes to cweave.w in another
# file than cweave.ch
WCHANGES=
########## You shouldn't have to change anything after this point #######
CWEAVE = ./cweave
CTANGLE = ./ctangle
SOURCES = cweave.w common.w ctangle.w
.SUFFIXES: .tex .dvi .w
.w.tex:
$(CWEAVE) $(CWFLAGS) $*
.tex.dvi:
tex $*.tex
.w.c:
$(CTANGLE) $(CTFLAGS) $*
all: cweb doc listings
cweb: ctangle cweave
manual doc: manual.dvi
listings: common.dvi ctangle.dvi cweave.dvi
cautiously:
make common.c ctangle.c cweave.c
$(RENAME) ctangle SAVEctangle # save version in case things mess up
make ctangle
$(RENAME) common.c SAVEcommon.c
./ctangle common $(CCHANGES)
diff common.c SAVEcommon.c
$(RENAME) SAVEcommon.c common.c # restore date
$(RENAME) ctangle.c SAVEctangle.c
./ctangle ctangle $(TCHANGES)
diff ctangle.c SAVEctangle.c
$(RENAME) SAVEctangle.c ctangle.c # restore date
$(RENAME) cweave.c SAVEcweave.c
./ctangle cweave $(WCHANGES)
diff cweave.c SAVEcweave.c
$(RENAME) SAVEcweave.c cweave.c # restore date
$(RM) SAVEctangle # succeded, use new binary from now on
SAVEctangle.c:
$(CP) ctangle.c SAVEctangle.c
SAVEcommon.c:
$(CP) common.c SAVEcommon.c
common.c: common.w $(CCHANGES) common.inc
$(CTANGLE) common $(CCHANGES)
common.h: common.w $(CCHANGES)
$(CTANGLE) common $(CCHANGES)
common.tex: common.w common.inc
$(CWEAVE) common $(CCHANGES)
ctangle: ctangle.o common.o
$(CC) $(CFLAGS) -o ctangle ctangle.o common.o
ctangle.c: ctangle.w $(TCHANGES) common.inc common.h
$(CTANGLE) ctangle $(TCHANGES)
ctangle.tex: ctangle.w $(TCHANGES) common.inc
$(CWEAVE) ctangle $(TCHANGES)
cweave: cweave.o common.o
$(CC) $(CFLAGS) -o cweave cweave.o common.o
cweave.c: cweave.w $(WCHANGES) common.inc common.h parser.w rules.w
$(CTANGLE) cweave $(WCHANGES)
cweave.tex: cweave.w $(WCHANGES) parser.w rules.w common.inc
$(CWEAVE) cweave $(WCHANGES)
manual.dvi: compare.tex