diff options
Diffstat (limited to 'support/splint/examples/xxpression/Makefile')
-rw-r--r-- | support/splint/examples/xxpression/Makefile | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/support/splint/examples/xxpression/Makefile b/support/splint/examples/xxpression/Makefile index 4450e3126d..8d8b6877c6 100644 --- a/support/splint/examples/xxpression/Makefile +++ b/support/splint/examples/xxpression/Makefile @@ -1,12 +1,28 @@ +# Copyright 2012-2020, Alexander Shibakov +# This file is part of SPLinT +# +# SPLinT is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SPLinT is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SPLinT. If not, see <http://www.gnu.org/licenses/>. + # this Makefile uses a flat directory structure for demonstration # purposes; the main directory (../..) contains a slightly more # modular organization. -SPLINT_ROOT = $(shell pwd)/../.. -XXPRESSION_PREREQS = %.tex %.scn %.idx %.tok ${SPLINT_XPTABLES} ${SPLINT_XLTABLES} ${SPLINT_ROOT}/cweb/bo.tok xymmap.sty xtoks.sty +XXPRESSION_PREREQS = %.tex %.scn %.idx %.tok ${SPLINT_XPTABLES} ${SPLINT_XLTABLES} +XXPRESSION_PREREQS += ${SPLINT_ROOT}cweb/bo.tok ${SPLINT_ROOT}cweb/fo.tok xymmap.sty xtoks.sty -include ${SPLINT_ROOT}/makefile.inc -include ${SPLINT_ROOT}/makefile.loc +include ../../makefile.inc +include ${SPLINT_ROOT}makefile.loc # rules specific to this example @@ -20,13 +36,13 @@ step2: ptabout ltabout step3: ltab.tex ptab.tex step4: xymbols.sns -ptabout: ${SPLINT_ROOT}/cweb/mkeparser.c ${PARSER}.c +ptabout: ${SPLINT_ROOT}cweb/mkeparser.c ${PARSER}.c ${CC} -DPARSER_FILE=\"../examples/xxpression/$(lastword $^)\" -DYYPARSE_PARAMETERS= -o $@ $< ptab.tex: ptabout $< --optimize-actions $@ -ltabout: ${SPLINT_ROOT}/cweb/mkscanner.c ${LEXER}.c +ltabout: ${SPLINT_ROOT}cweb/mkscanner.c ${LEXER}.c ${CC} -DLEXER_FILE=\"../examples/xxpression/$(lastword $^)\" -o $@ $< ltab.tex: ltabout @@ -36,28 +52,35 @@ ${LEXER}.c: ${LEXER}.l ${FLEX} -o $@ $< test.tex xymbols.tex \ -${PARSER}.yy ${LEXER}.ll: xxpression.x +${PARSER}.yy ${LEXER}.ll: xxpression.x alphas.hx @${CTANGLE} $< ${UNLINE} test.txx test.tex ${UNLINE} xymbols.txx xymbols.tex -xymbols.sns: xymbols.tex xxpression.tok ${SPLINT_ROOT}/cweb/bo.tok ${SPLINT_XPTABLES} ${SPLINT_XLTABLES} ptab.tex +xymbols.sns: xymbols.tex xxpression.tok ${SPLINT_ROOT}cweb/bo.tok ${SPLINT_ROOT}cweb/fo.tok \ + ${SPLINT_XPTABLES} ${SPLINT_XLTABLES} ptab.tex ${PDFTEX} $< -xxpression.tex: xxpression.x - ${CWEAVE} $< +alphas.hx: + ${MISCCW} --alpha-list --alpha-length=1 $@ + +xxpression.tex: xxpression.x alphas.hx + ${CWEAVE} $< -xxpression.gdx: %.gdx: ${XXPRESSION_PREREQS} +xxpression.gdx:%.gdx: ${XXPRESSION_PREREQS} ${TEX} $*.tex -xxpression.pdf: %.pdf: ${XXPRESSION_PREREQS} %.gdy +xxpression.pdf:%.pdf: ${XXPRESSION_PREREQS} %.gdy ${PDFTEX} $* && touch $*.gdy && touch $*.pdf # if [ -f $*.gdx ] ; then ${BINDX} $*.gdx $*.gdy; fi -xxpression.tok: xxpression.tex ${SPLINT_XPTABLES} ${SPLINT_XLTABLES} ${SPLINT_ROOT}/cweb/bo.tok - ${PDFTEX} $< && touch xxpression.tok +xxpression.tok: xxpression.tex ${SPLINT_XPTABLES} ${SPLINT_XLTABLES} ${SPLINT_ROOT}cweb/bo.tok + ${PDFTEX} $< && touch xxpression.tok + +${SPLINT_ROOT}cweb/%: + cd ${SPLINT_ROOT}cweb/ && ${MAKE} $(notdir $@) -test: test.tex xymbols.sns xxpression.tok ptab.tex ltab.tex +test: test.tex xymbols.sns xxpression.tok ptab.tex ltab.tex ${SPLINT_ROOT}cweb/fo.tok tex test.tex docs: xxpression.pdf |