summaryrefslogtreecommitdiff
path: root/support/splint/makefile.inc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/splint/makefile.inc
Initial commit
Diffstat (limited to 'support/splint/makefile.inc')
-rw-r--r--support/splint/makefile.inc76
1 files changed, 76 insertions, 0 deletions
diff --git a/support/splint/makefile.inc b/support/splint/makefile.inc
new file mode 100644
index 0000000000..d48478bb1a
--- /dev/null
+++ b/support/splint/makefile.inc
@@ -0,0 +1,76 @@
+TEXINPUTS := .:${SPLINT_ROOT}/cweb/:${SPLINT_ROOT}/tex/:${SPLINT_ROOT}/:${TEXINPUTS}
+
+SPLINT_DRIVER_DIR = ${SPLINT_ROOT}/cweb
+
+SPLINT_TEXSTYLES = flex.sty yyfaststack.sty yyparse.sty yyunion.sty yyboth.sty yyinput.sty yystype.sty yy.sty
+SPLINT_TEXSTYLES += yyinit.sty yybootstrap.sty dcols.sty limbo.sty yycommon.sty yymisc.sty yytexlex.sty
+SPLINT_BOOTSTRAP_STYLES = grabstates.sty
+SPLINT_PTABLES = byytab.tex dyytab.tex fyytab.tex gyytab.tex small_tab.tex
+SPLINT_LTABLES = ltab.tex small_dfa.tex
+
+SPLINT_XTEXSTYLES = $(patsubst %, ${SPLINT_ROOT}/tex/%, ${SPLINT_TEXSTYLES})
+SPLINT_XBOOTSTRAP_STYLES = $(patsubst %, ${SPLINT_ROOT}/tex/%, ${SPLINT_BOOTSTRAP_STYLES})
+SPLINT_XPTABLES = $(patsubst %, ${SPLINT_ROOT}/cweb/%, ${SPLINT_PTABLES})
+SPLINT_XLTABLES = $(patsubst %, ${SPLINT_ROOT}/cweb/%, ${SPLINT_LTABLES})
+
+SPLINT_DOC_PREREQS = %.tex ${SPLINT_PTABLES} ${SPLINT_LTABLES} ${SPLINT_XTEXSTYLES} ${SPLINT_ROOT}/tex/btokenset.sty bo.tok
+SPLINT_DOC_PREREQS_XREF = ${SPLINT_DOC_PREREQS} %.scn %.idx
+
+PDFTEX = export TEXINPUTS=${TEXINPUTS} && pdftex
+TEX = export TEXINPUTS=${TEXINPUTS} && tex
+DVIPS = dvips
+PDFVIEW = evince
+CWEAVE = cweave -bhp
+CTANGLE = ctangle -bhp
+BISON = ${BISON_ROOT}bison -v
+FLEX = ${FLEX_ROOT}flex
+
+MODEBOOTSTRAP = \\def\\modeactive\{\\modebootstrap\}
+
+BRACK = ${SPLINT_ROOT}/scripts/brack.pl
+UNLINE = ${SPLINT_ROOT}/scripts/unline.pl
+BINDX = ${SPLINT_ROOT}/scripts/bindx.pl
+
+%.c: %.w
+%.c: %.y
+%.pdf: %.tex
+%.ps: %.dvi
+%.o: %.c
+%.c: %.l
+
+%.x: %.w
+ ${BRACK} $< $@
+
+%.c: %.y
+ ${BISON} $^ -o $@
+
+%.c: %.l
+ ${FLEX} -o $@ $^
+
+%.l: %.ll
+ ${UNLINE} $^ $@
+
+%.y: %.yy
+ cp -f $^ $@
+
+%.ps: %.dvi
+ ${DVIPS} $^ -o $@
+
+%.gdy: %.gdx
+ ${BINDX} $^ $@
+
+all: docs
+
+${SPLINT_ROOT}/cweb/%:
+ cd ${SPLINT_ROOT}/cweb && ${MAKE} $(notdir $@)
+
+clean_temp:
+ -rm -f *.o *.tab.* *.dvi *.pdf *.ps *~ *.log \
+ *.rli *.rls *.lpg *.output *.lst *.exl *.ftn *.*pk *.gdx
+
+clean_core: clean_temp
+ -rm -f *.c *.h *.tex *.idx *.scn *.toc *.tok *.sns *.gdy *.x *.yy *.ll *.y *.l
+
+# to ensure that interrupted and erroneous builds are cleaned up
+
+.DELETE_ON_ERROR: