@@@ Makefile, Project.mk: Replace the build system.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 7 Sep 2020 12:35:12 +0000 (13:35 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 7 Sep 2020 16:50:10 +0000 (17:50 +0100)
Abolish Autoconf, and the awful `m4' thing.  The new build system
scrapes most of the information it needs out of the `docstrip' input.

@@@ shared files currently hacky symlinks

.gitignore
Makefile [new symlink]
Makefile.m4 [deleted file]
Project.mk [new file with mode: 0644]
configure.in [deleted file]
debian/rules
update-version [new symlink]

index 6a71e17..c2e7407 100644 (file)
@@ -1,35 +1,24 @@
-COPYING
-Makefile.in
-Makefile.am
-Makefile
-auto-version
-autom4te.cache
-configure
-aclocal.m4
-build
-config.log
-config.status
-install-sh
-missing
-mdwfonts.tex
-gpl.tex
 *.dvi
-*.log
-*.tfm
-*.vpl
+*.etx
 *.fd
-*.toc
+*.log
 *.map
-*.vf
-*.sty
-*.etx
-p*.mtx
-c*.mtx
-p*.pl
-*.aux
-*.idx
-*.ilg
-*.ind
-*.ps
+*.mtx
+*.pl
 *.pdf
-auto-version
+*.ps
+*.sty
+*.tar.gz
+*.tfm
+*.vf
+*.vpl
+
+!/cmmi10.pl
+!/cmr10.pl
+!/zrhax.mtx
+!/zrmhax.mtx
+
+/COPYING
+/auto-version
+/mdwfonts.tex
+/gpl.tex
diff --git a/Makefile b/Makefile
new file mode 120000 (symlink)
index 0000000..ac99b27
--- /dev/null
+++ b/Makefile
@@ -0,0 +1 @@
+/home/mdw/src/mdwtools/Makefile
\ No newline at end of file
diff --git a/Makefile.m4 b/Makefile.m4
deleted file mode 100644 (file)
index 4bf66da..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-## -*-m4-*-
-##
-## Build system for mdwfonts
-##
-## (c) 2002 Mark Wooding
-##
-
-##----- Licensing notice ----------------------------------------------------
-##
-## This file is part of the mdwfonts font configuration system.
-##
-## mdwfonts 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 2 of the License, or
-## (at your option) any later version.
-##
-## mdwfonts 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 mdwfonts; if not, write to the Free Software Foundation,
-## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = foreign
-
-pkglatexdir = ${texmfdir}/tex/latex/${PACKAGE}
-pkgdocdir = ${texmfdir}/doc/latex/${PACKAGE}
-pkgtfmdir = ${texmfdir}/fonts/tfm/${PACKAGE}
-pkgvfdir = ${texmfdir}/fonts/vf/${PACKAGE}
-pkgetxdir = ${texmfdir}/tex/fontinst/${PACKAGE}
-pkmapdir = ${texmfdir}/fonts/map/${PACKAGE}
-
-FONTINST = @FONTINST@
-
-define(`addsuffix', `patsubst(`$1', `\>', `$2')')
-define(`BASE', `mdwfonts')
-define(`TFMBASE', `\
-       pcrb8rn pcrbo8rn pcrr8rn pcrro8rn')
-define(`VFBASE', `\
-       pcrb7tn pcrb8tn pcrbc7tn pcrbc8tn pcrbo7tn pcrbo8tn pcrr7tn pcrr8tn \
-       pcrrc7tn pcrrc8tn pcrro7tn pcrro8tn zpplcmr zpplcmrm')
-
-AUX = gpl.tex
-SRC = addsuffix(BASE, `.dtx')
-DVI = addsuffix(BASE, `.dvi')
-PS = addsuffix(BASE, `.ps')
-PDF = addsuffix(BASE, `.pdf')
-ETX = ot1tt.etx ot1ctt.etx
-INS = mdwfonts.sty mdwfonts.tex mttpcr.fd
-MAP = mdwfonts.map
-FD = omlpplcm.fd ot1pplcm.fd
-PL = addsuffix(TFMBASE, `.pl')
-VPL = addsuffix(VFBASE, `.vpl')
-TFM = addsuffix(TFMBASE, `.tfm') addsuffix(VFBASE, `.tfm')
-VF = addsuffix(VFBASE, `.vf')
-
-pkglatex_DATA = $(INS) $(FD)
-pkgdoc_DATA = $(DVI) $(PS) $(PDF)
-pkgtfm_DATA = $(TFM)
-pkgvf_DATA = $(VF)
-pkgetx_DATA = $(ETX)
-pkmap_DATA = $(MAP)
-
-SUFFIXES = .dtx .dvi .vf .tfm .pl .vpl .ps .pdf
-define(`run_latex', `rm -rf t.$`'@/ && mkdir t.$`'@/ && \
-       cd t.$`'@/ && \
-       TEXINPUTS=..:$$TEXINPUTS && export TEXINPUTS && \
-       $1 "\def\indexing{n} \nonstopmode \input $<" && \
-       $1 "\def\indexing{y} \nonstopmode \input $<" && \
-       makeindex -s gind.ist $`'*.idx && \
-       $1 "\def\indexing{n} \nonstopmode \input $<" && \
-       mv $`'@ ../ && cd ../ && rm -rf t.$`'@/')
-
-$(DVI) $(PDF): $(AUX) $(INS) $(FD)
-.dtx.dvi:; run_latex(`latex')
-.dtx.pdf:; run_latex(`pdflatex')
-.dvi.ps:; dvips $<
-.vpl.tfm:; vptovf $<
-.pl.tfm:; pltotf $<
-.vpl.vf:; vptovf $<
-clean-local::; rm -rf t.*/
-
-$(wordlist 2,$(words $(ETX)),$(ETX)) $(MAP) $(INS): $(firstword $(ETX))
-$(firstword $(ETX)): $(SRC) mdwfonts.ins
-       tex "\nonstopmode \input mdwfonts.ins"
-$(wordlist 2,$(words $(FD)),$(FD)) $(VF) $(PL) $(VPL): $(firstword $(FD))
-$(firstword $(FD)): mdwfonts.tex $(ETX)
-       $(FONTINST) "\nonstopmode \input mdwfonts.tex"
-
-EXTRA_DIST = \
-       $(SRC) $(AUX) $(INS) $(ETX) $(FD) $(TFM) $(VF) $(PL) $(VPL) $(DVI) \
-       $(MAP) $(PS) $(PDF) \
-       zrhax.mtx zrmhax.mtx \
-       mdwfonts.ins Makefile.m4
-
-MAINTAINERCLEANFILES = $(INS) $(ETX) $(TFM) $(VF) $(DVI) *.fd
-CLEANFILES = \
-       *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans *.vpl \
-       p*.pl p*.mtx c*.mtx *.ps *.pdf
-
-Makefile.am: Makefile.m4
-       cd $(srcdir) && m4 Makefile.m4 >Makefile.am
-
-dist-hook::
-       echo $(VERSION) >$(distdir)/RELEASE
-EXTRA_DIST += auto-version
-
-EXTRA_DIST += debian/changelog debian/control debian/copyright debian/compat
-EXTRA_DIST += debian/rules
-
-EXTRA_DIST += debian/mdwfonts.install
-EXTRA_DIST += debian/mdwfonts.docs debian/mdwfonts.maps
-
-.PHONY: dvi
-
-##----- That's all, folks ---------------------------------------------------
diff --git a/Project.mk b/Project.mk
new file mode 100644 (file)
index 0000000..3abcb4c
--- /dev/null
@@ -0,0 +1,99 @@
+### -*-makefile-gmake-*-
+###
+### Package-specfic definitions for the build script
+###
+### (c) 2020 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the `mdwfonts' LaTeX package collection.
+###
+### `mdwfonts' 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 2 of the License, or (at your
+### option) any later version.
+###
+### `mdwfonts' 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 `mdwfonts'.  If not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+###--------------------------------------------------------------------------
+### Easy stuff.
+
+## Package identification.
+PACKAGE                         = mdwfonts
+
+## Installation files.
+INS                     = mdwfonts.ins
+
+## Format the licence text.
+EXTRA                  += gpl.tex
+
+###--------------------------------------------------------------------------
+### Installing the fonts.
+
+## Additional tools.
+FONTINST                = fontinst
+VPTOVF                  = vptovf
+PLTOTF                  = pltotf
+
+## Transformed fonts (made by `\transformfont'; produces a `.pl' from which
+## we make a `.tfm').
+XFORM                  += $(foreach s,b bo r ro, pcr$s8rn)
+XFORM                  += pplr8r pplri8r
+XFORM                  += pzcmi8r
+mdwfonts.tex_OUT       += $(addsuffix .pl,$(XFORM))
+TFM                    += $(addsuffix .tfm,$(XFORM))
+OUT                    += $(TFM)
+
+%.tfm: %.pl; $(call v_tag,PLTOTF,$@)$(PLTOTF) $< 2>$*.log
+
+## Installed fonts (made by `\installfont'; produces a `.vpl' from which we
+## make a `.tfm' and a `.vf').
+INST                   += $(foreach f,pcrb pcrbc pcrbo pcrr pcrrc pcrro, \
+                               $f7tn $f8tn)
+INST                   += zpplcmr zpplcmrm
+mdwfonts.tex_OUT       += $(addsuffix .vpl,$(INST))
+TFM                    += $(addsuffix .tfm,$(INST))
+VF                     += $(addsuffix .vf,$(INST))
+OUT                    += $(VF)
+
+%.tfm %.vf: %.vpl; $(call v_tag,VPTOVF,$@)$(VPTOVF) $< 2>$*.log
+
+## Installed families (made by `\installfamily'; produces a `.fd').
+FAM                    += ot1pplcm omlpplcm
+mdwfonts.tex_OUT       += $(addsuffix .fd,$(FAM))
+
+## Run `fontinst' to generate the necessary things.
+$(eval $(call output-targets,$$(FONTINST),FONTINST,mdwfonts.tex))
+OUT                    += $(mdwfonts.tex_OUT)
+
+## Explain where to put all the files.
+pkglatex_FILES          = $(filter %.fd %.sty %.tex,$(OUT))
+
+INSTALLDIRS            += pkgetx
+pkgetxdir               = $(texmfdir)/tex/fontinst/$(PACKAGE)
+pkgetx_FILES            = $(filter %.etx,$(OUT))
+
+INSTALLDIRS            += pkgmap
+pkgmapdir               = $(texmfdir)/fonts/map/$(PACKAGE)
+pkgmap_FILES            = $(filter %.map,$(OUT))
+
+INSTALLDIRS            += pkgtfm
+pkgtfmdir               = $(texmfdir)/fonts/tfm/$(PACKAGE)
+pkgtfm_FILES            = $(filter %.tfm,$(OUT))
+
+INSTALLDIRS            += pkgvf
+pkgvfdir                = $(texmfdir)/fonts/vf/$(PACKAGE)
+pkgvf_FILES             = $(filter %.vf,$(OUT))
+
+## Additional Debian machinery.
+DISTFILES              += debian/mdwfonts.maps
+
+###----- That's all, folks --------------------------------------------------
diff --git a/configure.in b/configure.in
deleted file mode 100644 (file)
index 8eb3bb3..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-dnl -*-autoconf-*-
-dnl
-dnl Configuration script for mdwfonts
-dnl
-dnl (c) 2002 Mark Wooding
-dnl
-
-dnl ----- Licensing notice --------------------------------------------------
-dnl
-dnl This file is part of the mdwfonts font configuration system.
-dnl
-dnl mdwfonts is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl mdwfonts is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with mdwfonts; if not, write to the Free Software Foundation,
-dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-mdw_AUTO_VERSION
-AC_INIT(mdwfonts, AUTO_VERSION, mdw@distorted.org.uk)
-AC_CONFIG_SRCDIR(mdwfonts.ins)
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(foreign)
-mdw_DIR_TEXMF
-AC_CHECK_PROGS(FONTINST, fontinst, tex)
-AC_OUTPUT(Makefile)
-
-dnl ----- That's all, folks -------------------------------------------------
index 7fd9d2e..85dd0b7 100755 (executable)
@@ -2,10 +2,9 @@
 
 %:; dh $@ --parallel --with tex
 
+override_dh_auto_install:
+       dh_auto_install -- texmfdir=/usr/share/texmf
+
 override_dh_clean:
        dh_clean
        rm -f *.dvi *.ps *.pdf *.etx *.sty *.fd *.map *.pl *.vpl *.tfm *.vf
-
-override_dh_auto_install:
-       make install DESTDIR=debian/tmp
-       dh_install -a
diff --git a/update-version b/update-version
new file mode 120000 (symlink)
index 0000000..db45344
--- /dev/null
@@ -0,0 +1 @@
+/home/mdw/src/mdwtools/update-version
\ No newline at end of file