From 2ef43af0215fc52966c9bbd8d5df6db6d6af224b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 28 Jun 2022 03:01:06 +0000 Subject: CTAN sync 202206280301 --- dviware/dvisirule/Makefile | 105 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 dviware/dvisirule/Makefile (limited to 'dviware/dvisirule/Makefile') diff --git a/dviware/dvisirule/Makefile b/dviware/dvisirule/Makefile new file mode 100644 index 0000000000..484b2c412e --- /dev/null +++ b/dviware/dvisirule/Makefile @@ -0,0 +1,105 @@ + +Dir ?= /tmp +export Dir + +InstallBase ?= ${Dir}/texmf-dist +InstallLib ?= ${InstallBase}/lib +InstallSty ?= ${InstallBase}/lib/texinputs +InstallBin ?= ${InstallBase}/bin +export InstallLib InstallSty InstallBin + +include cmd.mk +Lo = '\def\Dir{'${Dir}'}' +CFLAGS = -Wall -O + +######################################## + +Name = dvisirule +Pdf = ${Dir}/${Name}.pdf +Runtime = $(addprefix ${Dir}/, \ + ${Name}.sty ${Name} \ + $(addprefix ${Name}-, bin pgnum.awk expg.mk marker.awk) \ + ) +Tgt = ${Pdf} ${Runtime} +Dtx = ${Name}.dtx + +HelpTxt = ${Dir}/help.txt +Fig = demo +FigPdf = $(addprefix ${Dir}/, $(addsuffix .pdf, ${Fig})) +FigTex = $(addprefix ${Dir}/, $(addsuffix print.tex, ${Fig})) + +-include privar.mk + +######################################## + +all: ${Tgt} + +clean: + ${RM} *~ ${Tgt} ${HelpTxt} ${FigPdf} ${FigTex} + ${MAKE} -C src $@ + +install: ${Runtime} + install -m 444 -pD ${Dir}/${Name}.sty \ + ${InstallSty}/${Name}.sty + install -m 444 -pD ${Dir}/${Name}-pgnum.awk \ + ${Dir}/${Name}-marker.awk \ + ${Dir}/${Name}-expg.mk \ + ${InstallLib}/ + install -m 555 -pD ${Dir}/${Name} \ + ${InstallBin}/${Name} + install -m 555 -pD -s ${Dir}/${Name}-bin \ + ${InstallLib}/${Name}-bin +# echo ${MAKE} -C src $@ + +######################################## + +sty: ${Dir}/${Name}.sty +${Dir}/${Name}.sty: ${Name}.ins ${Dtx} + $(call Latex, $<) + ls -l $@ + +define MakePdf + $(call Latex, ${1}.dtx) + $(call Latex, ${1}.dtx) + cd ${Dir}; \ + ${DVIPDFMX} -o ${2} ${1}.dvi +endef + +${Dir}/${Name}.pdf: %.pdf: %.sty ${HelpTxt} ${FigPdf} ${FigTex} + $(call MakePdf,${Name},$@) + ls -l $@ + +${FigPdf}: bname = $(notdir $(basename $@)) +${FigPdf}: ${Dir}/%.pdf: ${CURDIR}/%.tex ${Runtime} + $(call Latex, $<) + cd ${Dir}; \ + cp -p ${bname}.dvi ${bname}.dvi.save && \ + ${Dir}/${Name} ${bname}.dvi ${bname}-si.dvi && \ + ${DVIPDFMX} ${bname}-si.dvi && \ + ${PDFCROP} ${bname}-si.pdf $@ + ebb $@ + +${FigTex}: demo.tex + sed -n -e '/definecolor/,/hskip0pt/p' $< |\ + egrep -v '(hfill|hskip)' > $@ + +${HelpTxt}: ${Dir}/${Name} + sh $< -h | sed -e 's/\.sh//' > $@ + +${Dir}/${Name}: ${Name}.sh + install -m 555 -pD $< $@ + +FORCE: +${Dir}/${Name}-bin: b = $(notdir $@) +${Dir}/${Name}-bin: FORCE + test -e src/Makefile || sh reconf.sh src + ${MAKE} -C src ${b} + cp -pu src/${b} $@ + +${Dir}/%.awk: %.awk + cp -pu $< $@ + +${Dir}/%.mk: %.mk + cp -pu $< $@ + +-include priv.mk -- cgit v1.2.3