diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/web2w/Makefile |
Initial commit
Diffstat (limited to 'web/web2w/Makefile')
-rw-r--r-- | web/web2w/Makefile | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/web/web2w/Makefile b/web/web2w/Makefile new file mode 100644 index 0000000000..f35b168618 --- /dev/null +++ b/web/web2w/Makefile @@ -0,0 +1,86 @@ + + +all: ctex ctex.dvi + + +cweb/cweave.w: cweave.patch + patch --verbose cweb/cweave.w cweave.patch + +cweb/ctangle.w: ctangle.patch + patch --verbose cweb/ctangle.w ctangle.patch + +cweb/common.w: common.patch + patch --verbose cweb/common.w common.patch + +CWEAVE=cweb/cweave +CTANGLE=cweb/ctangle + +cweb/ctangle: cweb/ctangle.w cweb/common.w + cd cweb ;\ + if [ ! -x ./ctangle ] ; then $(CC) $(CFLAGS) -o ctangle ctangle.c common.c ; fi ;\ + ./ctangle ctangle.w ; \ + ./ctangle common.w ; \ + $(CC) $(CFLAGS) -o ctangle ctangle.c common.c ; \ + cd .. + +cweb/cweave: $(CTANGLE) cweb/cweave.w cweb/common.w + cd cweb ;\ + ./ctangle cweave.w ; \ + ./ctangle common.w ; \ + $(CC) $(CFLAGS) -o cweave cweave.c common.c ; \ + cd .. + + +web.lex.c : web.l web2w.h pascal.tab.h + flex -o web.lex.c web.l + +pascal.tab.c pascal.tab.h: pascal.y + bison -d -v $(NAMEPREFIX) pascal.y + +web2w.c web2w.h: $(CTANGLE) web2w.w + $(CTANGLE) web2w.w + + +web2w: web2w.c web.lex.c pascal.tab.c + $(CC) -o web2w web2w.c web.lex.c pascal.tab.c + +web2w.tex: $(CWEAVE) web2w.w + $(CWEAVE) web2w.w + +ctex.w: tex.w + patch --verbose -o ctex.w tex.w ctex.patch + +tex.w: web2w + ./web2w -o tex.w tex/tex.web + +ctex.c: $(CTANGLE) ctex.w + $(CTANGLE) ctex.w + +ctex.tex: $(CWEAVE) ctex.w + $(CWEAVE) ctex.w + +ctex: ctex.c + $(CC) ctex.c -lm -o ctex + +cinitex: ctex.c + $(CC) -DINIT ctex.c -lm -o cinitex + + +ctex.pdf: ctex.tex + pdftex ctex.tex + + +plain.fmt: cinitex + echo "plain \\dump" | ./cinitex + cp plain.fmt TeXformats/ + +ctex.dvi: ctex ctex.tex plain.fmt + echo "&plain ctex" | ./ctex + + + +clean: + rm -f *.idx *.log *.dvi *.scn *.toc *~ + rm -f cinitex ctex web2w + $(MAKE) -C cweb clean + |