| 1 |
# $Id: GNUmakefile,v 1.8 2026/01/03 18:54:23 karl Exp $ |
| 2 |
# Makefile for the mode_def collection. Public domain. |
| 3 |
|
| 4 |
version = 4.4 |
| 5 |
|
| 6 |
default: check |
| 7 |
|
| 8 |
testfonts = cmr5 cmtt8 cmti7 cmr10 cmti10 cmtt10 cmtt12 cmr17 |
| 9 |
%.600pk: %.600gf |
| 10 |
gftopk $< |
| 11 |
|
| 12 |
%.tfm %.600gf: modes.base |
| 13 |
mf '&./modes \mode:=ljfour; nonstopmode; input $*' |
| 14 |
|
| 15 |
test.ps: $(addsuffix .600pk,$(testfonts)) test.dvi |
| 16 |
dvips test -o |
| 17 |
|
| 18 |
test.dvi: $(addsuffix .tfm, $(testfonts)) test.tex |
| 19 |
tex test |
| 20 |
|
| 21 |
# Upload in directory modes/ per CTAN. |
| 22 |
distdir = modes |
| 23 |
distname = $(distdir)/modes.mf |
| 24 |
dist: badnames |
| 25 |
test -z `rcslocks` |
| 26 |
rm -rf $(distdir) && mkdir $(distdir) |
| 27 |
expand <modes.mf | sed 's/[ ]*$$//' >$(distname) |
| 28 |
# ensure no trailing spaces crept into the source (sigh): |
| 29 |
diff modes.mf $(distname) |
| 30 |
# these three commands are tiny shell scripts, not distributed (better to |
| 31 |
# start with the versioned file). |
| 32 |
add-version $(version) $(distname) |
| 33 |
add-date $(distname) |
| 34 |
fix-checksum $(distname) |
| 35 |
# |
| 36 |
cp -p ChangeLog GNUmakefile README $(distdir)/ |
| 37 |
cp -p modedpicheck $(distdir)/ |
| 38 |
cp -p list $(distdir)/modelist.txt |
| 39 |
cp -p shortlist $(distdir)/modenames.txt |
| 40 |
cd $(distdir) && mft ./modes.mf && pdftex ./modes.tex && rm -f *.log modes.tex |
| 41 |
rm -f modes.zip; zip -r modes.zip modes |
| 42 |
|
| 43 |
# old stuff for karl. |
| 44 |
# mv $$HOME/mail/2modes $(archive)/$(version).mail && gzip $(archive)/$(version).mail |
| 45 |
# cp -p $(distname) $(archive) && gzip -f $(archive)/$(distname) && rooo |
| 46 |
# cp -p $(distname) $(mfsys)/modes.mf |
| 47 |
#archive = $(HOME)/misc/archive/modes |
| 48 |
|
| 49 |
list: modes.mf |
| 50 |
grep \^mode_def modes.mf | grep -v help | sed 's/\\\[//' >list |
| 51 |
|
| 52 |
shortlist: list |
| 53 |
sed 's/^mode_def \(.*\) =.*$$/\1/' list >$@ |
| 54 |
|
| 55 |
badnames: shortlist |
| 56 |
sort $< | uniq -d |
| 57 |
# |
| 58 |
# don't check this any more; we don't need to limit to eight chars, |
| 59 |
# and hitexlaptop and hitexmobile are longer. |
| 60 |
# gawk '{if (length ($$0) > 8) {print $0; count++} } END {exit count}' $< |
| 61 |
|
| 62 |
dvi: modes.dvi |
| 63 |
modes.dvi: modes.tex |
| 64 |
tex '\scrollmode \input modes.tex' |
| 65 |
|
| 66 |
pdf: modes.pdf |
| 67 |
modes.pdf: modes.tex |
| 68 |
texfot pdftex '\nonstopmode \input modes.tex' |
| 69 |
|
| 70 |
modes.tex: modes.mf |
| 71 |
mft modes.mf |
| 72 |
|
| 73 |
modes.base: modes.mf |
| 74 |
mf -ini plain input modes\; dump |
| 75 |
mv plain.base $@ |
| 76 |
|
| 77 |
# systematically check all modes, and some known past problems. |
| 78 |
check: badnames modes.dvi checkx check-primitives check-modedpi \ |
| 79 |
cmr10.300pk logo10.2540gf test.ps cmbsy7.1200gf |
| 80 |
|
| 81 |
# Check that Xerox info is included if requested. Must use -ini because |
| 82 |
# mf.base includes modes.mf by default, and it intentionally stops |
| 83 |
# itself from being read twice. So, for development convenience, do it |
| 84 |
# all by hand (instead of depending on modes.base and dumping it anew |
| 85 |
# every time). The conditional here is exactly what mktextfm does. |
| 86 |
# |
| 87 |
checkx cx: |
| 88 |
rm -f plain.tfm |
| 89 |
-mf -ini '\input plain; nonstopmode; input modes; mode:=cx; if known mode_include_extra_info_available: mode_include_extra_info fi; input logo10' |
| 90 |
tftopl ./plain.tfm | fgrep CODING |
| 91 |
|
| 92 |
check-mktextfm: |
| 93 |
rm -f logo10.tfm |
| 94 |
mktextfm --destdir=`pwd` logo10 |
| 95 |
# no xerox info by default: |
| 96 |
! (tftopl ./logo10.tfm | fgrep CODING) |
| 97 |
# |
| 98 |
rm -f logo10.tfm |
| 99 |
env MF_MODE_EXTRA_INFO=1 mktextfm --destdir=`pwd` logo10 |
| 100 |
# xerox info if requested: |
| 101 |
tftopl ./logo10.tfm | fgrep CODING |
| 102 |
# This will fail unless the new mktextfm is in PATH, and |
| 103 |
# unless the correct modes.mf is compiled into mf.base. |
| 104 |
# It seems like overkill to have a new option to mktextfm so we can |
| 105 |
# specify a fake mf, something like "inimf \input plain \input modes ...". |
| 106 |
# We'll just test after installation. |
| 107 |
|
| 108 |
check-primitives: modes.base |
| 109 |
# test for knuth: primitives work as designed, no Xerox info by default. |
| 110 |
mf "&./modes \fontmaking:=1; end" |
| 111 |
! (tftopl ./mfput.tfm | fgrep CODING) |
| 112 |
|
| 113 |
check-modedpi: |
| 114 |
modedpicheck |
| 115 |
|
| 116 |
gft: cmr10.600gf |
| 117 |
gftype -m -i ./$< >cmr10.600gft |
| 118 |
cmr10.600gf: modes.base |
| 119 |
mf '&./modes \mode:=ricoh; mag:=2; input cmr10' |
| 120 |
|
| 121 |
# Make sure write-white works. |
| 122 |
cmr10.300pk: modes.base |
| 123 |
mf "&./modes \mode:=ricoh; scrollmode; input cmr10" |
| 124 |
|
| 125 |
# cmbsy7 fails with blacker >= 3 and pixels_per_inch >= 1200. |
| 126 |
cmbsy7.1200gf: modes.base |
| 127 |
mf "&./modes \mode:=lexmarkr; scrollmode; input cmbsy7" |
| 128 |
|
| 129 |
logo10.2540gf: shortlist modes.base |
| 130 |
for f in `cat shortlist`; do echo $${f}; \ |
| 131 |
mf "&./modes \mode:=$${f}; scrollmode; input logo10"; \ |
| 132 |
done |
| 133 |
|
| 134 |
realclean distclean clean mostlyclean: |
| 135 |
rm -f *gf *.gft *pk *.tfm *.pl *.ps *.log *.base *.dvi |
| 136 |
rm -f modes.dvi list shortlist modes.tex modes.pdf |