groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 16/46: Build and install fonts.


From: Bertrand Garrigues
Subject: [groff] 16/46: Build and install fonts.
Date: Tue, 27 Jan 2015 22:59:23 +0000

bgarrigues pushed a commit to branch automake3
in repository groff.

commit b101574cae1b3019d4109d72b81e4c0a33bb5a86
Author: Bertrand Garrigues <address@hidden>
Date:   Thu Aug 28 00:59:10 2014 +0200

    Build and install fonts.
---
 Makefile.am                   |   18 +++++
 TESTS                         |   41 +++++++++++-
 font/devX100-12/Makefile.sub  |   37 ----------
 font/devX100-12/devX100-12.am |   40 +++++++++++
 font/devX100/Makefile.sub     |   37 ----------
 font/devX100/devX100.am       |   41 +++++++++++
 font/devX75-12/Makefile.sub   |   37 ----------
 font/devX75-12/devX75-12.am   |   40 +++++++++++
 font/devX75/Makefile.sub      |   37 ----------
 font/devX75/devX75.am         |   40 +++++++++++
 font/devascii/Makefile.sub    |   68 ------------------
 font/devascii/devascii.am     |   42 +++++++++++
 font/devcp1047/Makefile.sub   |   68 ------------------
 font/devcp1047/devcp1047.am   |   42 +++++++++++
 font/devdvi/Makefile.sub      |   58 ----------------
 font/devdvi/devdvi.am         |   87 +++++++++++++++++++++++
 font/devhtml/Makefile.sub     |   71 -------------------
 font/devhtml/devhtml.am       |   51 ++++++++++++++
 font/devlatin1/Makefile.sub   |   65 -----------------
 font/devlatin1/devlatin1.am   |   42 +++++++++++
 font/devlbp/Makefile.sub      |   54 --------------
 font/devlbp/devlbp.am         |   52 ++++++++++++++
 font/devlj4/Makefile.sub      |   77 ---------------------
 font/devlj4/devlj4.am         |   99 ++++++++++++++++++++++++++
 font/devpdf/Makefile.sub      |  139 -------------------------------------
 font/devpdf/devpdf.am         |  127 ++++++++++++++++++++++++++++++++++
 font/devps/Makefile.sub       |   92 ------------------------
 font/devps/devps.am           |  153 +++++++++++++++++++++++++++++++++++++++++
 font/devutf8/Makefile.sub     |   65 -----------------
 font/devutf8/devutf8.am       |   42 +++++++++++
 font/scripts/gendesc.sh       |   18 +++++
 font/scripts/genfonts.sh      |   23 ++++++
 32 files changed, 997 insertions(+), 906 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7bbcb64..4f1ca9d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -516,6 +516,10 @@ man7_MANS =
 # for lex/yacc
 AM_YFLAGS = -d -v
 
+# Scripts for font files generation
+GENFONTSSH=$(top_srcdir)/font/scripts/genfonts.sh
+GENDESCSH = $(top_srcdir)/font/scripts/gendesc.sh
+
 # Non-recursive makefile system. See Automake manual '7.3 An
 # Alternative Approach to Subdirectories'. We use a single Makefile.am
 # that includes other .am files, rather than using SUBDIRS.  Note that
@@ -525,6 +529,20 @@ AM_YFLAGS = -d -v
 include $(top_srcdir)/lib/gnulib.mk
 include $(top_srcdir)/arch/mingw/mingw.am
 include $(top_srcdir)/arch/misc/misc.am
+include $(top_srcdir)/font/devX100/devX100.am
+include $(top_srcdir)/font/devX100-12/devX100-12.am
+include $(top_srcdir)/font/devX75/devX75.am
+include $(top_srcdir)/font/devX75-12/devX75-12.am
+include $(top_srcdir)/font/devascii/devascii.am
+include $(top_srcdir)/font/devcp1047/devcp1047.am
+include $(top_srcdir)/font/devdvi/devdvi.am
+include $(top_srcdir)/font/devhtml/devhtml.am
+include $(top_srcdir)/font/devlatin1/devlatin1.am
+include $(top_srcdir)/font/devlbp/devlbp.am
+include $(top_srcdir)/font/devlj4/devlj4.am
+include $(top_srcdir)/font/devpdf/devpdf.am
+include $(top_srcdir)/font/devps/devps.am
+include $(top_srcdir)/font/devutf8/devutf8.am
 include $(top_srcdir)/src/include/include.am
 include $(top_srcdir)/src/libs/libbib/libbib.am
 include $(top_srcdir)/src/libs/libdriver/libdriver.am
diff --git a/TESTS b/TESTS
index 94f5654..3ef5afc 100644
--- a/TESTS
+++ b/TESTS
@@ -17,6 +17,7 @@ Current status
   - Build src/preproc/*
   - Build src/devices/*
   - Build src/roff/*
+  - Build font/*
 
 Tests
 -----
@@ -118,6 +119,19 @@ from src/roff
   - nroff
   - troff
 
+from font: font files in 
+  - devascii
+  - devcp1047
+  - devdvi
+  - devhtml
+  - devlatin1
+  - devlbp
+  - devlj4
+  - devpdf
+  - devps
+  - devutf8
+
+
 In order to check and improve the dependencies, the following targets
 were built from a clean environment:
   - make lib/libgnu.a
@@ -158,6 +172,8 @@ were built from a clean environment:
 
 2.2 make clean
 
+TODO: font files are not cleaned
+
 The following files remain (this is expected):
   - Makefile
   - config.status
@@ -172,6 +188,8 @@ The following files remain (this is expected):
 
 2.3 make mostlyclean
 
+TODO: font files
+
   Like 'make clean', but the following files also remain (expected):
   - lib*.a
   - libgroff.a's charset.alias, ref-add.sed, ref-del.sed, and
@@ -220,17 +238,32 @@ Differences with former build system:
   - If file charset.alias is always present in
     $(DESTDIR)/usr/local/lib, make install update it by adding 'groff'
     to the list of programs using it. Otherwise nothing is installed.
+
   - programs from src/utils are installed in $(DESTDIR)/usr/local/bin
+
   - man files from src/utils, src/devices are installed in
     $(DESTDIR)/usr/local/share/man/man1 or man5
-  - $(DESTDIR)/usr/local/share/groff/1.22/eign (from src/utils/indxbib)
+
+  - $(DESTDIR)/usr/local/share/groff/1.22.3/eign (from src/utils/indxbib)
+
   - In $(DESTDIR)/usr/local/lib/X11/app-defaults: GXditview and
     GXditview-color. If these files are already present, they are
     first moved to GXditview.old and GXditview-color.old.
+
   - groff_opts_no_arg.txt and groff_opts_with_arg.txt are installed
 
+  - font files are installed in $(DESTDIR)/usr/local/groff/1.22.3/font
+    and oldfont and identical to the one installed with the previous
+    build system, except the fonts from devpdf which are not generated
+    identically at each build.
+
+Diff with previous build system:
+  - devcp1047 fonts are installed $(DESTDIR)/usr/local/groff/1.22.3/font
+
 2.7 make uninstall
 
+TODO: currently fails (fails to remove $(DESTDIR)/usr/local/share/groff/1.22.3)
+
   Removes:
 
   - $(DESTDIR)/usr/local/lib/charset.alias if exists
@@ -246,6 +279,9 @@ Differences with former build system:
   
 2.8 make dist
 
+TODO: missing fonts, some files which should not be distributed are
+present in the tarball.
+
   groff-1.22.3.tar.gz is generated.
 
   - Files/directories that are not distributed on purpose:
@@ -284,6 +320,8 @@ Differences with former build system:
     
 2.9 make distcheck
   
+To be checked when install, clean, and dist are fixed.
+
   This will attempt to make a tarball, and from this tarball, build
 the package(out-of-source build), clean it (checking that no file
 remains), install it, uninstall it (checking that no file remains in
@@ -298,3 +336,4 @@ Notes
 
   - Gnulib: some files of src/libs/libgroff could be replaced by their
     gnulib equivalent
+  - Gnulib: git-version-gen could be used
diff --git a/font/devX100-12/Makefile.sub b/font/devX100-12/Makefile.sub
deleted file mode 100644
index afc4107..0000000
--- a/font/devX100-12/Makefile.sub
+++ /dev/null
@@ -1,37 +0,0 @@
-# Makefile.sub for `font devX100-12'
-#
-# File position: <groff-source>/font/devX100-12/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=X100-12
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devX100-12/devX100-12.am b/font/devX100-12/devX100-12.am
new file mode 100644
index 0000000..db3d3c7
--- /dev/null
+++ b/font/devX100-12/devX100-12.am
@@ -0,0 +1,40 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'.
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+DEVX10012FONTS = \
+  font/devX100-12/DESC \
+  font/devX100-12/TR \
+  font/devX100-12/TI \
+  font/devX100-12/TB \
+  font/devX100-12/TBI \
+  font/devX100-12/CR \
+  font/devX100-12/CI \
+  font/devX100-12/CB \
+  font/devX100-12/CBI \
+  font/devX100-12/HR \
+  font/devX100-12/HI \
+  font/devX100-12/HB \
+  font/devX100-12/HBI \
+  font/devX100-12/NR \
+  font/devX100-12/NI \
+  font/devX100-12/NB \
+  font/devX100-12/NBI \
+  font/devX100-12/S
+
+devX10012fontdir = $(fontdir)/devX100-12
+devX10012font_DATA = $(DEVX10012FONTS)
diff --git a/font/devX100/Makefile.sub b/font/devX100/Makefile.sub
deleted file mode 100644
index f0947fd..0000000
--- a/font/devX100/Makefile.sub
+++ /dev/null
@@ -1,37 +0,0 @@
-# Makefile.sub for `font devX100'
-#
-# File position: <groff-source>/font/devX100/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=X100
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devX100/devX100.am b/font/devX100/devX100.am
new file mode 100644
index 0000000..742e600
--- /dev/null
+++ b/font/devX100/devX100.am
@@ -0,0 +1,41 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'.
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+DEVX100FONTS = \
+  font/devX100/DESC \
+  font/devX100/TR \
+  font/devX100/TI \
+  font/devX100/TB \
+  font/devX100/TBI \
+  font/devX100/CR \
+  font/devX100/CI \
+  font/devX100/CB \
+  font/devX100/CBI \
+  font/devX100/HR \
+  font/devX100/HI \
+  font/devX100/HB \
+  font/devX100/HBI \
+  font/devX100/NR \
+  font/devX100/NI \
+  font/devX100/NB \
+  font/devX100/NBI \
+  font/devX100/S
+
+devX100fontdir = $(fontdir)/devX100
+devX100font_DATA = $(DEVX100FONTS)
+
diff --git a/font/devX75-12/Makefile.sub b/font/devX75-12/Makefile.sub
deleted file mode 100644
index 5b359f4..0000000
--- a/font/devX75-12/Makefile.sub
+++ /dev/null
@@ -1,37 +0,0 @@
-# Makefile.sub for `font devX75-12'
-#
-# File position: <groff-source>/font/devX75-12/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=X75-12
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devX75-12/devX75-12.am b/font/devX75-12/devX75-12.am
new file mode 100644
index 0000000..b588f78
--- /dev/null
+++ b/font/devX75-12/devX75-12.am
@@ -0,0 +1,40 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+DEVX7512FONTS = \
+  font/devX75-12/DESC \
+  font/devX75-12/TR \
+  font/devX75-12/TI \
+  font/devX75-12/TB \
+  font/devX75-12/TBI \
+  font/devX75-12/CR \
+  font/devX75-12/CI \
+  font/devX75-12/CB \
+  font/devX75-12/CBI \
+  font/devX75-12/HR \
+  font/devX75-12/HI \
+  font/devX75-12/HB \
+  font/devX75-12/HBI \
+  font/devX75-12/NR \
+  font/devX75-12/NI \
+  font/devX75-12/NB \
+  font/devX75-12/NBI \
+  font/devX75-12/S
+
+devX7512fontdir = $(fontdir)/devX75-12
+devX7512font_DATA = $(DEVX7512FONTS)
diff --git a/font/devX75/Makefile.sub b/font/devX75/Makefile.sub
deleted file mode 100644
index a4d344d..0000000
--- a/font/devX75/Makefile.sub
+++ /dev/null
@@ -1,37 +0,0 @@
-# Makefile.sub for `font devX75'
-#
-# File position: <groff-source>/font/devX75/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=X75
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devX75/devX75.am b/font/devX75/devX75.am
new file mode 100644
index 0000000..90e661d
--- /dev/null
+++ b/font/devX75/devX75.am
@@ -0,0 +1,40 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+DEVX75FONTS = \
+  font/devX75/DESC \
+  font/devX75/TR \
+  font/devX75/TI \
+  font/devX75/TB \
+  font/devX75/TBI \
+  font/devX75/CR \
+  font/devX75/CI \
+  font/devX75/CB \
+  font/devX75/CBI \
+  font/devX75/HR \
+  font/devX75/HI \
+  font/devX75/HB \
+  font/devX75/HBI \
+  font/devX75/NR \
+  font/devX75/NI \
+  font/devX75/NB \
+  font/devX75/NBI \
+  font/devX75/S
+
+devX75fontdir = $(fontdir)/devX75
+devX75font_DATA = $(DEVX75FONTS)
diff --git a/font/devascii/Makefile.sub b/font/devascii/Makefile.sub
deleted file mode 100644
index 93b0ebd..0000000
--- a/font/devascii/Makefile.sub
+++ /dev/null
@@ -1,68 +0,0 @@
-# Makefile.sub for `font devascii'
-#
-# File position: <groff-source>/font/devascii/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=ascii
-FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-MOSTLYCLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-RM=rm -f
-
-$(FONTS): R.proto
-       @echo Making $@
-       @$(RM) $@
-       @charwidth=`expr $(RES) / $(CPI)` ; \
-        sed -e "s/^name [A-Z]*$$/name $@/" \
-            -e \
-             "s/^\\([^ ]*\\)   [0-9][0-9]*     /\\1    $$charwidth     /" \
-            -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
-            -e "s/^internalname .*$$/internalname $@/" \
-            -e "/^internalname/s/BI/3/" \
-            -e "/^internalname/s/B/2/" \
-            -e "/^internalname/s/I/1/" \
-            -e "/^internalname .*[^ 0-9]/d" \
-            $(srcdir)/R.proto >$@
-
-DESC: DESC.proto
-       @echo Making $@
-       @sed -e "s/^res .*$$/res $(RES)/" \
-            -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
-            -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
-            -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
-            $(srcdir)/DESC.proto >$@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devascii/devascii.am b/font/devascii/devascii.am
new file mode 100644
index 0000000..9325234
--- /dev/null
+++ b/font/devascii/devascii.am
@@ -0,0 +1,42 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devascii_srcdir = $(top_srcdir)/font/devascii
+DEVASCIIFONTS = R I B BI
+DEVASCIIFONTSFILES = \
+  font/devascii/R font/devascii/I font/devascii/B font/devascii/BI
+
+DEVASCIIRES = 240
+DEVASCIICPI = 10
+DEVASCIILPI = 6
+
+devasciifontdir = $(fontdir)/devascii
+devasciifont_DATA = $(DEVASCIIFONTSFILES) font/devascii/DESC
+
+$(DEVASCIIFONTSFILES): $(devascii_srcdir)/R.proto
+       @echo Making $@
+       $(MKDIR_P) `dirname address@hidden
+       $(RM) $@
+       $(SHELL) $(GENFONTSSH) $(devascii_srcdir)/R.proto \
+         $(DEVASCIIRES) $(DEVASCIICPI) `basename address@hidden > $@
+
+font/devascii/DESC: $(devascii_srcdir)/DESC.proto
+       @echo Making $@
+       $(MKDIR_P) `dirname address@hidden
+       $(SHELL) $(GENDESCSH) $(devascii_srcdir)/DESC.proto \
+         $(DEVASCIIRES) $(DEVASCIICPI) $(DEVASCIILPI) $(DEVASCIIFONTS) > $@
diff --git a/font/devcp1047/Makefile.sub b/font/devcp1047/Makefile.sub
deleted file mode 100644
index eac7306..0000000
--- a/font/devcp1047/Makefile.sub
+++ /dev/null
@@ -1,68 +0,0 @@
-# Makefile.sub for `font devcp1047'
-#
-# File position: <groff-source>/font/devcp1047/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=cp1047
-FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-MOSTLYCLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-RM=rm -f
-
-$(FONTS): R.proto
-       @echo Making $@
-       @$(RM) $@
-       @charwidth=`expr $(RES) / $(CPI)` ; \
-        sed -e "s/^name [A-Z]*$$/name $@/" \
-            -e \
-             "s/^\\([^ ]*\\)   [0-9][0-9]*     /\\1    $$charwidth     /" \
-            -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
-            -e "s/^internalname .*$$/internalname $@/" \
-            -e "/^internalname/s/BI/3/" \
-            -e "/^internalname/s/B/2/" \
-            -e "/^internalname/s/I/1/" \
-            -e "/^internalname .*[^ 0-9]/d" \
-            $(srcdir)/R.proto >$@
-
-DESC: DESC.proto
-       @echo Making $@
-       @sed -e "s/^res .*$$/res $(RES)/" \
-            -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
-            -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
-            -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
-            $(srcdir)/DESC.proto >$@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devcp1047/devcp1047.am b/font/devcp1047/devcp1047.am
new file mode 100644
index 0000000..9df9c73
--- /dev/null
+++ b/font/devcp1047/devcp1047.am
@@ -0,0 +1,42 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devcp1047_srcdir = $(top_srcdir)/font/devcp1047
+DEVCP1047FONTS = R I B BI
+DEVCP1047FONTSFILES = \
+  font/devcp1047/R font/devcp1047/I font/devcp1047/B font/devcp1047/BI
+
+DEVCP1047RES = 240
+DEVCP1047CPI = 10
+DEVCP1047LPI = 6
+
+devcp1047fontdir = $(fontdir)/devcp1047
+devcp1047font_DATA = $(DEVCP1047FONTSFILES) font/devcp1047/DESC
+
+$(DEVCP1047FONTSFILES): $(devcp1047_srcdir)/R.proto
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @$(RM) $@
+       @$(SHELL) $(GENFONTSSH) $(devcp1047_srcdir)/R.proto \
+        $(DEVCP1047RES) $(DEVCP1047CPI) `basename address@hidden > $@
+
+font/devcp1047/DESC: $(devcp1047_srcdir)/DESC.proto
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @$(SHELL) $(GENDESCSH) $(devcp1047_srcdir)/DESC.proto \
+        $(DEVCP1047RES) $(DEVCP1047CPI) $(DEVCP1047LPI) $(DEVCP1047FONTS) > $@
diff --git a/font/devdvi/Makefile.sub b/font/devdvi/Makefile.sub
deleted file mode 100644
index 8e1384d..0000000
--- a/font/devdvi/Makefile.sub
+++ /dev/null
@@ -1,58 +0,0 @@
-# Makefile.sub for `font devdvi'
-#
-# File position: <groff-source>/font/devdvi/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=dvi
-DEVFILES=DESC \
-  TR TI TB TBI CW CWI HR HI HB HBI \
-  TREC TIEC TBEC TBIEC CWEC CWIEC HREC HIEC HBEC HBIEC \
-  TRTC TITC TBTC TBITC CWTC CWITC HRTC HITC HBTC HBITC \
-  MI S EX SA SB SC \
-  generate/Makefile \
-  generate/msam.map generate/msbm.map \
-  generate/texb.map generate/texex.map generate/texi.map generate/texmi.map \
-  generate/texr.map generate/texsy.map generate/textt.map generate/textex.map \
-  generate/ec.map generate/tc.map
-DEVSCRIPTS=generate/CompileFonts
-
-MOSTLYCLEANADD=DESC
-
-DESC: DESC.in
-       cat $(srcdir)/DESC.in >DESC
-       if test "$(PAGE)" = A4; then \
-         echo "papersize a4" >>DESC; \
-       else \
-         echo "papersize letter" >>DESC; \
-       fi
-       test -z '$(DVIPRINT)' || echo print '$(DVIPRINT)' >>DESC
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devdvi/devdvi.am b/font/devdvi/devdvi.am
new file mode 100644
index 0000000..4126f4a
--- /dev/null
+++ b/font/devdvi/devdvi.am
@@ -0,0 +1,87 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devdvi_srcdir = $(top_srcdir)/font/devdvi
+DEVDVIFONTFILES = \
+  font/devdvi/TR \
+  font/devdvi/TI \
+  font/devdvi/TB \
+  font/devdvi/TBI \
+  font/devdvi/CW \
+  font/devdvi/CWI \
+  font/devdvi/HR \
+  font/devdvi/HI \
+  font/devdvi/HB \
+  font/devdvi/HBI \
+  font/devdvi/TREC \
+  font/devdvi/TIEC \
+  font/devdvi/TBEC \
+  font/devdvi/TBIEC \
+  font/devdvi/CWEC \
+  font/devdvi/CWIEC \
+  font/devdvi/HREC \
+  font/devdvi/HIEC \
+  font/devdvi/HBEC \
+  font/devdvi/HBIEC \
+  font/devdvi/TRTC \
+  font/devdvi/TITC \
+  font/devdvi/TBTC \
+  font/devdvi/TBITC \
+  font/devdvi/CWTC \
+  font/devdvi/CWITC \
+  font/devdvi/HRTC \
+  font/devdvi/HITC \
+  font/devdvi/HBTC \
+  font/devdvi/HBITC \
+  font/devdvi/MI \
+  font/devdvi/S \
+  font/devdvi/EX \
+  font/devdvi/SA \
+  font/devdvi/SB \
+  font/devdvi/SC
+devdvifontdir = $(fontdir)/devdvi
+devdvifont_DATA = $(DEVDVIFONTFILES) font/devdvi/DESC
+
+DEVDVIGENFILES = \
+  font/devdvi/generate/Makefile \
+  font/devdvi/generate/msam.map \
+  font/devdvi/generate/msbm.map \
+  font/devdvi/generate/texb.map \
+  font/devdvi/generate/texex.map \
+  font/devdvi/generate/texi.map \
+  font/devdvi/generate/texmi.map \
+  font/devdvi/generate/texr.map \
+  font/devdvi/generate/texsy.map \
+  font/devdvi/generate/textt.map \
+  font/devdvi/generate/textex.map \
+  font/devdvi/generate/ec.map \
+  font/devdvi/generate/tc.map \
+  font/devdvi/generate/CompileFonts
+devdvigendir = $(fontdir)/devdvi/generate
+devdvigen_DATA = $(DEVDVIGENFILES)
+
+font/devdvi/DESC: $(devdvi_srcdir)/DESC.in
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @cat $(devdvi_srcdir)/DESC.in >$@
+       @if test "$(PAGE)" = A4; then \
+         echo "papersize a4" >>$@; \
+       else \
+         echo "papersize letter" >>$@; \
+       fi
+       @test -z '$(DVIPRINT)' || echo print '$(DVIPRINT)' >>$@
diff --git a/font/devhtml/Makefile.sub b/font/devhtml/Makefile.sub
deleted file mode 100644
index e2b2e1e..0000000
--- a/font/devhtml/Makefile.sub
+++ /dev/null
@@ -1,71 +0,0 @@
-# Makefile.sub for `font devhtml'
-#
-# File position: <groff-source>/font/devhtml/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=html
-PROTOFONTS=R I B BI CR CI CB CBI
-FONTS=$(PROTOFONTS) S
-DEVFILES=$(FONTS) DESC
-MOSTLYCLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-RM=rm -f
-
-$(FONTS): R.proto
-       @echo Making $@
-       @$(RM) $@
-       @charwidth=`expr $(RES) / $(CPI)` ; \
-        sed -e "s/^name [A-Z]*$$/name $@/" \
-            -e \
-             "s/^\\([^ ]*\\)   [0-9][0-9]*     /\\1    $$charwidth     /" \
-            -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
-            -e "s/^internalname .*$$/internalname $@/" \
-            -e "/^internalname/s/CR/4/" \
-            -e "/^internalname/s/BI/3/" \
-            -e "/^internalname/s/B/2/" \
-            -e "/^internalname/s/I/1/" \
-            -e "/^internalname .*[^ 0-9]/d" \
-            $(srcdir)/R.proto >$@
-
-DESC: DESC.proto
-       @echo Making $@
-       @sed -e "s/^res .*$$/res $(RES)/" \
-            -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
-            -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
-            -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
-            $(srcdir)/DESC.proto >$@
-       @echo "image_generator $(GHOSTSCRIPT)" >> $@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devhtml/devhtml.am b/font/devhtml/devhtml.am
new file mode 100644
index 0000000..1224238
--- /dev/null
+++ b/font/devhtml/devhtml.am
@@ -0,0 +1,51 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devhtml_srcdir = $(top_srcdir)/font/devhtml
+DEVHTMLFONTS = R I B BI CR CI CB CBI S
+DEVHTMLFONTSFILES = \
+  font/devhtml/R \
+  font/devhtml/I \
+  font/devhtml/B \
+  font/devhtml/BI \
+  font/devhtml/CR \
+  font/devhtml/CI \
+  font/devhtml/CB \
+  font/devhtml/CBI \
+  font/devhtml/S
+
+DEVHTMLRES = 240
+DEVHTMLCPI = 10
+DEVHTMLLPI = 6
+
+devhtmlfontdir = $(fontdir)/devhtml
+devhtmlfont_DATA = $(DEVHTMLFONTSFILES) font/devhtml/DESC
+
+$(DEVHTMLFONTSFILES): $(devhtml_srcdir)/R.proto
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @$(RM) $@
+       @$(SHELL) $(GENFONTSSH) $(devhtml_srcdir)/R.proto \
+        $(DEVHTMLRES) $(DEVHTMLCPI) `basename address@hidden > $@
+
+font/devhtml/DESC: $(devhtml_srcdir)/DESC.proto
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @$(SHELL) $(GENDESCSH) $(devhtml_srcdir)/DESC.proto \
+        $(DEVHTMLRES) $(DEVHTMLCPI) $(DEVHTMLLPI) $(DEVHTMLFONTS) > $@
+       @echo "image_generator $(GHOSTSCRIPT)" >> $@
diff --git a/font/devlatin1/Makefile.sub b/font/devlatin1/Makefile.sub
deleted file mode 100644
index ae8eb28..0000000
--- a/font/devlatin1/Makefile.sub
+++ /dev/null
@@ -1,65 +0,0 @@
-# Makefile.sub for `font devlatin1'
-#
-# File position: <groff-source>/font/devlatin1/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=latin1
-FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-MOSTLYCLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-RM=rm -f
-
-$(FONTS): R.proto
-       @echo Making $@
-       @$(RM) $@
-       @charwidth=`expr $(RES) / $(CPI)` ; \
-        sed -e "s/^name [A-Z]*$$/name $@/" \
-            -e \
-             "s/^\\([^ ]*\\)   [0-9][0-9]*     /\\1    $$charwidth     /" \
-            -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
-            -e "s/^internalname .*$$/internalname $@/" \
-            -e "/^internalname/s/BI/3/" \
-            -e "/^internalname/s/B/2/" \
-            -e "/^internalname/s/I/1/" \
-            -e "/^internalname .*[^ 0-9]/d" \
-            $(srcdir)/R.proto >$@
-
-DESC: DESC.proto
-       @echo Making $@
-       @sed -e "s/^res .*$$/res $(RES)/" \
-            -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
-            -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
-            -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
-            $(srcdir)/DESC.proto >$@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devlatin1/devlatin1.am b/font/devlatin1/devlatin1.am
new file mode 100644
index 0000000..854235e
--- /dev/null
+++ b/font/devlatin1/devlatin1.am
@@ -0,0 +1,42 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devlatin1_srcdir = $(top_srcdir)/font/devlatin1
+DEVLATIN1FONTS = R I B BI
+DEVLATIN1FONTSFILES = \
+  font/devlatin1/R font/devlatin1/I font/devlatin1/B font/devlatin1/BI
+
+DEVLATIN1RES = 240
+DEVLATIN1CPI = 10
+DEVLATIN1LPI = 6
+
+devlatin1fontdir = $(fontdir)/devlatin1
+devlatin1font_DATA = $(DEVLATIN1FONTSFILES) font/devlatin1/DESC
+
+$(DEVLATIN1FONTSFILES): $(devlatin1_srcdir)/R.proto
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @$(RM) $@
+       @$(SHELL) $(GENFONTSSH) $(devlatin1_srcdir)/R.proto \
+        $(DEVLATIN1RES) $(DEVLATIN1CPI) `basename address@hidden > $@
+
+font/devlatin1/DESC: $(devlatin1_srcdir)/DESC.proto
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @$(SHELL) $(GENDESCSH) $(devlatin1_srcdir)/DESC.proto \
+        $(DEVLATIN1RES) $(DEVLATIN1CPI) $(DEVLATIN1LPI) $(DEVLATIN1FONTS) > $@
diff --git a/font/devlbp/Makefile.sub b/font/devlbp/Makefile.sub
deleted file mode 100644
index c015c8e..0000000
--- a/font/devlbp/Makefile.sub
+++ /dev/null
@@ -1,54 +0,0 @@
-# Makefile.sub for `font devlbp'
-#
-# File position: <groff-source>/font/devlbp/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=lbp
-LBPPRINT=$(PSPRINT)
-DEVFILES=DESC \
-  HB HBI HI HR \
-  HNB HNBI HNI HNR \
-  TB TBI TI TR \
-  CR CB CI \
-  ER EB EI
-
-MOSTLYCLEANADD=DESC
-
-DESC: DESC.in
-       cat $(srcdir)/DESC.in >DESC
-       if test "$(PAGE)" = A4; then \
-         echo "papersize a4" >>DESC; \
-       else \
-         echo "papersize letter" >>DESC; \
-       fi
-       test -z '$(LBPPRINT)' || echo print '$(LBPPRINT)' >>DESC
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devlbp/devlbp.am b/font/devlbp/devlbp.am
new file mode 100644
index 0000000..58e94fb
--- /dev/null
+++ b/font/devlbp/devlbp.am
@@ -0,0 +1,52 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+LBPPRINT=$(PSPRINT)
+devlbp_srcdir = $(top_srcdir)/font/devlbp
+DEVLBPFONTFILES = \
+  font/devlbp/HB \
+  font/devlbp/HBI \
+  font/devlbp/HI \
+  font/devlbp/HR \
+  font/devlbp/HNB \
+  font/devlbp/HNBI \
+  font/devlbp/HNI \
+  font/devlbp/HNR \
+  font/devlbp/TB \
+  font/devlbp/TBI \
+  font/devlbp/TI \
+  font/devlbp/TR \
+  font/devlbp/CR \
+  font/devlbp/CB \
+  font/devlbp/CI \
+  font/devlbp/ER \
+  font/devlbp/EB \
+  font/devlbp/EI
+devlbpfontdir = $(fontdir)/devlbp
+devlbpfont_DATA = $(DEVLBPFONTFILES) font/devlbp/DESC
+
+font/devlbp/DESC: $(devlbp_srcdir)/DESC.in
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @cat $(devlbp_srcdir)/DESC.in >$@
+       @if test "$(PAGE)" = A4; then \
+         echo "papersize a4" >>$@; \
+       else \
+         echo "papersize letter" >>$@; \
+       fi
+       @test -z '$(LBPPRINT)' || echo print '$(LBPPRINT)' >>$@
diff --git a/font/devlj4/Makefile.sub b/font/devlj4/Makefile.sub
deleted file mode 100644
index 6d499db..0000000
--- a/font/devlj4/Makefile.sub
+++ /dev/null
@@ -1,77 +0,0 @@
-# Makefile.sub for `font devlj4'
-#
-# File position: <groff-source>/font/devlj4/Makefile.sub
-#
-# Copyright (C) 2014
-#   Free Software Foundation, Inc.
-#   Written by Werner Lemberg <address@hidden> and
-#   Bernd Warken <address@hidden>.
-#
-# Last update: 2 Sep 2014
-#
-# This file is part of `groffer' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=lj4
-LJ4RES=1200
-LJ4PRINT=$(PSPRINT)
-DEVFILES=DESC \
-  AB ABI AI AR \
-  ALBB ALBR \
-  AOB AOI AOR \
-  CB CBI CI CR \
-  GB GBI GI GR \
-  LGB LGI LGR \
-  OB OBI OI OR \
-  TB TBI TI TR \
-  TNRB TNRBI TNRI TNRR \
-  UB UBI UI UR \
-  UCB UCBI UCI UCR \
-  CLARENDON CORONET MARIGOLD S \
-  SYMBOL WINGDINGS \
-  generate/Makefile \
-  generate/special.map \
-  generate/symbol.map \
-  generate/text.map \
-  generate/wingdings.map \
-  generate/special.awk
-
-MOSTLYCLEANADD=DESC
-
-DESC: DESC.in
-       echo "res $(LJ4RES)" >DESC
-       echo "unitwidth `expr 7620000 / $(LJ4RES)`" >>DESC
-       cat $(srcdir)/DESC.in >>DESC
-       if test "$(PAGE)" = A4; then \
-         echo "papersize a4" >>DESC; \
-       else \
-         echo "papersize letter" >>DESC; \
-       fi
-       test -z '$(LJ4PRINT)' || echo print '$(LJ4PRINT)' >>DESC
-
-fonts:
-       $(MAKE) -f $(srcdir)/generate/Makefile srcdir=$(srcdir)/generate \
-         HPFTODIT=$(top_builddir)/src/utils/hpftodit/hpftodit
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devlj4/devlj4.am b/font/devlj4/devlj4.am
new file mode 100644
index 0000000..a66427e
--- /dev/null
+++ b/font/devlj4/devlj4.am
@@ -0,0 +1,99 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devlj4_srcdir = $(top_srcdir)/font/devlj4
+LJ4RES = 1200
+LJ4PRINT = $(PSPRINT)
+DEVLJ4FONTFILES = \
+  font/devlj4/AB \
+  font/devlj4/ABI \
+  font/devlj4/AI \
+  font/devlj4/AR \
+  font/devlj4/ALBB \
+  font/devlj4/ALBR \
+  font/devlj4/AOB \
+  font/devlj4/AOI \
+  font/devlj4/AOR \
+  font/devlj4/CB \
+  font/devlj4/CBI \
+  font/devlj4/CI \
+  font/devlj4/CR \
+  font/devlj4/GB \
+  font/devlj4/GBI \
+  font/devlj4/GI \
+  font/devlj4/GR \
+  font/devlj4/LGB \
+  font/devlj4/LGI \
+  font/devlj4/LGR \
+  font/devlj4/OB \
+  font/devlj4/OBI \
+  font/devlj4/OI \
+  font/devlj4/OR \
+  font/devlj4/TB \
+  font/devlj4/TBI \
+  font/devlj4/TI \
+  font/devlj4/TR \
+  font/devlj4/TNRB \
+  font/devlj4/TNRBI \
+  font/devlj4/TNRI \
+  font/devlj4/TNRR \
+  font/devlj4/UB \
+  font/devlj4/UBI \
+  font/devlj4/UI \
+  font/devlj4/UR \
+  font/devlj4/UCB \
+  font/devlj4/UCBI \
+  font/devlj4/UCI \
+  font/devlj4/UCR \
+  font/devlj4/CLARENDON \
+  font/devlj4/CORONET \
+  font/devlj4/MARIGOLD \
+  font/devlj4/S \
+  font/devlj4/SYMBOL \
+  font/devlj4/WINGDINGS
+
+devlj4fontdir = $(fontdir)/devlj4
+devlj4font_DATA = $(DEVLJ4FONTFILES) font/devlj4/DESC
+
+DEVLJ4GENFILES = \
+  font/devlj4/generate/Makefile \
+  font/devlj4/generate/special.map \
+  font/devlj4/generate/symbol.map \
+  font/devlj4/generate/text.map \
+  font/devlj4/generate/wingdings.map \
+  font/devlj4/generate/special.awk
+devlj4fontgendir = $(devlj4fontdir)/generate
+devlj4fontgen_DATA = $(DEVLJ4GENFILES)
+
+font/devlj4/DESC: $(devlj4_srcdir)/DESC.in
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @echo "res $(LJ4RES)" >$@
+       @echo "unitwidth `expr 7620000 / $(LJ4RES)`" >>$@
+       @cat $(devlj4_srcdir)/DESC.in >>$@
+       @if test "$(PAGE)" = A4; then \
+          echo "papersize a4" >>$@; \
+       else \
+          echo "papersize letter" >>$@; \
+       fi
+       @test -z '$(LJ4PRINT)' || echo print '$(LJ4PRINT)' >>$@
+
+fonts: devlj4_fonts
+devlj4_fonts: hpftodit font/devlj4/DESC
+       $(MAKE) -f $(devlj4_srcdir)/generate/Makefile \
+         srcdir=$(devlj4_srcdir)/generate HPFTODIT=$(top_builddir)/hpftodit
diff --git a/font/devpdf/Makefile.sub b/font/devpdf/Makefile.sub
deleted file mode 100644
index e367a34..0000000
--- a/font/devpdf/Makefile.sub
+++ /dev/null
@@ -1,139 +0,0 @@
-# Makefile.sub for `font devpdf'
-#
-# File position: <groff-source>/font/devpdf/Makefile.sub
-#
-# Copyright (C) 2011-2014 Free Software Foundation, Inc.
-#      Written by Deri James <address@hidden>
-#
-# This file is part of groff.
-#
-# groff 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.
-#
-# groff 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 this program. If not, see <http://www.gnu.org/licenses/>.
-
-DEV=pdf
-GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
-                  && find * -maxdepth 0 -type f ! -name 'Makefile.sub*' \
-                            -exec grep -l internalname {} \;`
-ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*`
-MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*`
-
-MOSTLYCLEANADD=\
-  download \
-  DESC \
-  Foundry \
-  util/BuildFoundries \
-  $(GROFF_FONT_FILES) \
-  $(ENC_FILES) \
-  $(MAP_FILES)
-
-MOSTLYCLEANDIRADD=enc map
-
-DEVFILES=\
-  Foundry
-
-#DEVSCRIPTS=util/BuildFoundries
-
-DISTFILES=\
-  $(DEVFILES) \
-  $(DEVSCRIPTS)
-
-RM=rm -f
-
-all: DESC
-
-DESC: DESC.in
-       $(RM) DESC
-       cat $(srcdir)/DESC.in >$(top_builddir)/font/devpdf/DESC
-       if test "$(PAGE)" = A4; then \
-         echo "papersize a4" >>$(top_builddir)/font/devpdf/DESC; \
-       else \
-         echo "papersize letter" >>$(top_builddir)/font/devpdf/DESC; \
-       fi
-       $(RM) Foundry
-       cat $(srcdir)/Foundry.in >$(top_builddir)/font/devpdf/Foundry
-       -test -d $(top_builddir)/font/devpdf/enc \
-         || $(mkinstalldirs) $(top_builddir)/font/devpdf/enc
-       -test -d $(top_builddir)/font/devpdf/map \
-         || $(mkinstalldirs) $(top_builddir)/font/devpdf/map
-       cp -f $(top_srcdir)/font/devps/text.enc \
-         $(top_builddir)/font/devpdf/enc
-       cp -f $(top_srcdir)/font/devps/symbolmap \
-         $(top_builddir)/font/devpdf/map
-       cp -f $(top_srcdir)/font/devps/generate/dingbats.map \
-         $(top_builddir)/font/devpdf/map
-       cp -f $(top_srcdir)/font/devps/generate/textmap \
-         $(top_builddir)/font/devpdf/map
-       cp -f $(top_srcdir)/font/devps/generate/symbolchars \
-         $(top_builddir)/font/devpdf/map
-       -test -d util || $(mkinstalldirs) util
-       $(RM) util/BuildFoundries
-       if test -n "$(PERL)"; then \
-         sed -f $(SH_DEPS_SED_SCRIPT) \
-             -e "s|/usr/bin/perl|$(PERL)|" \
-             -e "s|@GROFF_GHOSTSCRIPT_INTERPRETERS@|$(GHOSTSCRIPT)|" \
-             -e "s|@VERSION@|$(version)$(revision)|" \
-             -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \
-             $(srcdir)/util/BuildFoundries.pl \
-         >$(top_builddir)/font/devpdf/util/BuildFoundries ;\
-       else \
-         sed -f $(SH_DEPS_SED_SCRIPT) \
-             -e "s|@VERSION@|$(version)$(revision)|" \
-             -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \
-             $(srcdir)/util/BuildFoundries.pl \
-         >$(top_builddir)/font/devpdf/util/BuildFoundries ;\
-       fi
-       chmod +x util/BuildFoundries
-       echo "# foundry ps name psfile" > $(top_builddir)/font/devpdf/download
-       
PATH="$(top_builddir)/src/utils/afmtodit:$(GROFF_PATH_SEPARATOR)$(PATH)" \
-         util/BuildFoundries $(top_builddir)/font/devpdf \
-           '$(top_srcdir)/font/devps : $(top_builddir)/font/devps' \
-          >> $(top_builddir)/font/devpdf/download
-
-install_data:
-       -test -d $(DESTDIR)$(fontsubdir) \
-         || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)
-       -test -d $(DESTDIR)$(fontsubdir)/enc \
-         || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/enc
-       -test -d $(DESTDIR)$(fontsubdir)/map \
-         || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/map
-       -test -d $(DESTDIR)$(fontsubdir)/util \
-         || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/util
-       for f in $(MOSTLYCLEANADD); do \
-         $(RM) $(DESTDIR)$(fontsubdir)/$$f; \
-         if test -f $$f; then \
-           $(INSTALL_DATA) $$f $(DESTDIR)$(fontsubdir)/$$f; \
-         else \
-           $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(fontsubdir)/$$f; \
-         fi; \
-       done
-
-uninstall_sub:
-       -for f in $(MOSTLYCLEANADD); do \
-         $(RM) $(DESTDIR)$(fontsubdir)/$$f; \
-       done
-       -d=$(DESTDIR)$(fontsubdir)/enc; \
-         if test -d $$d; then rmdir $$d; fi
-       -d=$(DESTDIR)$(fontsubdir)/map; \
-         if test -d $$d; then rmdir $$d; fi
-       -d=$(DESTDIR)$(fontsubdir)/util; \
-         if test -d $$d; then rmdir $$d; fi
-       -d=$(DESTDIR)$(fontsubdir); \
-         if test -d $$d; then rmdir $$d; fi
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
new file mode 100644
index 0000000..2e36517
--- /dev/null
+++ b/font/devpdf/devpdf.am
@@ -0,0 +1,127 @@
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
+#      Free Software Foundation, Inc.
+#      Original Makefile.sub Written 
+#      by Deri James <address@hidden>
+#      Automake migration by Bertrand Garrigues
+#
+# This file is part of groff.
+#
+# groff 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.
+#
+# groff 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devpdf_srcdir = $(top_srcdir)/font/devpdf
+GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
+                  && find * -maxdepth 0 -type f ! -name 'devpdf.am' \
+                            -exec grep -l internalname {} \;`
+ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*`
+MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*`
+
+devpdffontdir = $(fontdir)/devpdf
+devpdffont_DATA = \
+  font/devpdf/DESC \
+  font/devpdf/Foundry
+
+devpdffontencdir = $(devpdffontdir)/enc
+devpdffontenc_DATA = font/devpdf/enc/text.enc
+
+devpdffontmapdir = $(devpdffontdir)/map
+DEVPDFFONTMAP_1 = \
+  font/devpdf/map/dingbats.map \
+  font/devpdf/map/symbolchars \
+  font/devpdf/map/textmap
+DEVPDFFONTMAP_2 = font/devpdf/map/symbolmap
+devpdffontmap_DATA = $(DEVPDFFONTMAP_1) $(DEVPDFFONTMAP_2)
+
+devpdffontutildir = $(devpdffontdir)/util
+devpdffontutil_DATA = font/devpdf/util/BuildFoundries
+
+font/devpdf/enc/text.enc:
+       @$(MKDIR_P) $(top_builddir)/font/devpdf/enc
+       cp -f $(top_srcdir)/font/devps/text.enc \
+         $(top_builddir)/font/devpdf/enc
+
+font/devpdf/map/symbolmap:
+       @$(MKDIR_P) $(top_builddir)/font/devpdf/map
+       @cp -f $(top_srcdir)/font/devps/symbolmap \
+         $(top_builddir)/font/devpdf/map
+
+$(DEVPDFFONTMAP_1):
+       @$(MKDIR_P) $(top_builddir)/font/devpdf/map
+       @cp -f $(top_srcdir)/font/devps/generate/`basename address@hidden \
+         $(top_builddir)/font/devpdf/map
+
+font/devpdf/util/BuildFoundries: shdeps.sed 
$(devpdf_srcdir)/util/BuildFoundries.pl
+       @echo Making $@
+       @$(MKDIR_P) $(top_builddir)/font/devpdf/util
+       @$(RM) $(top_builddir)/font/devpdf/util/BuildFoundries
+       @if test -n "$(PERL)"; then \
+         sed -f $(SH_DEPS_SED_SCRIPT) \
+             -e "s|/usr/bin/perl|$(PERL)|" \
+             -e "s|address@hidden@]|$(GHOSTSCRIPT)|" \
+             -e "s|address@hidden@]|$(VERSION)|" \
+             -e "s|address@hidden@]|$(fontdir)|" \
+             $(devpdf_srcdir)/util/BuildFoundries.pl \
+         >$(top_builddir)/font/devpdf/util/BuildFoundries ;\
+       else \
+         sed -f $(SH_DEPS_SED_SCRIPT) \
+             -e "s|address@hidden@]|$(VERSION)|" \
+             -e "s|address@hidden@]|$(fontdir)|" \
+             $(devpdf_srcdir)/util/BuildFoundries.pl \
+         >$(top_builddir)/font/devpdf/util/BuildFoundries ;\
+       fi
+       @chmod +x $(top_builddir)/font/devpdf/util/BuildFoundries
+
+font/devpdf/DESC: $(devpdf_srcdir)/DESC.in
+       @echo Making $@
+       @$(MKDIR_P) $(top_builddir)/font/devpdf
+       @$(RM) $(top_builddir)/font/devpdf/DESC
+       @cat $(devpdf_srcdir)/DESC.in >$(top_builddir)/font/devpdf/DESC
+       @if test "$(PAGE)" = A4; then \
+         echo "papersize a4" >>$(top_builddir)/font/devpdf/DESC; \
+       else \
+         echo "papersize letter" >>$(top_builddir)/font/devpdf/DESC; \
+       fi
+
+font/devpdf/Foundry:
+       @$(RM) $(top_builddir)/font/devpdf/Foundry
+       @cat $(devpdf_srcdir)/Foundry.in >$(top_builddir)/font/devpdf/Foundry
+
+all: font/devpdf/build_font_files
+
+# PATH : path to find afmtodit. We add $(abs_top_builddir) because afmtodit is
+# built in the top builddir.
+font/devpdf/build_font_files: afmtodit font/devpdf/DESC $(devpdffontenc_DATA) 
$(devpdffontmap_DATA) $(devpdffont_DATA) font/devpdf/util/BuildFoundries
+       @echo Making all fonts
+       @$(RM) $@
+       @$(MKDIR_P) $(top_builddir)/font/devpdf
+       @echo "# foundry        ps name psfile" > 
$(top_builddir)/font/devpdf/download
+       PATH="$(abs_top_builddir)$(GROFF_PATH_SEPARATOR)$(PATH)" \
+         $(abs_top_builddir)/font/devpdf/util/BuildFoundries 
$(abs_top_builddir)/font/devpdf \
+           '$(abs_top_srcdir)/font/devps : $(abs_top_builddir)/font/devps' \
+          >> $(top_builddir)/font/devpdf/download
+       @touch $@
+
+install-data-local: install_devpdf
+install_devpdf:
+       @echo Installing devpdf files
+       address@hidden -d $(DESTDIR)$(devpdffontdir)/util \
+         || $(mkinstalldirs) $(DESTDIR)$(devpdffontdir)/util
+       @for f in $(GROFF_FONT_FILES); do \
+         $(RM) $(DESTDIR)$(devpdffontdir)/$$f; \
+         if test -f $$f; then \
+           $(INSTALL_DATA) $$f $(DESTDIR)$(devpdffontdir)/$$f; \
+         else \
+           $(INSTALL_DATA) $(top_builddir)/font/devpdf/$$f 
$(DESTDIR)$(devpdffontdir)/$$f; \
+         fi; \
+       done
+       $(INSTALL_DATA) $(top_builddir)/font/devpdf/download 
$(DESTDIR)$(devpdffontdir)/
diff --git a/font/devps/Makefile.sub b/font/devps/Makefile.sub
deleted file mode 100644
index 3258486..0000000
--- a/font/devps/Makefile.sub
+++ /dev/null
@@ -1,92 +0,0 @@
-# Makefile.sub for `font devps'
-
-# File position: <groff-source>/font/devps/Makefile.sub
-
-# Copyright (C) 2014 Free Software Foundation, Inc.
-
-# This file is part of `groffer' which is part of `groff'.
-
-# `groff' 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.
-
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-
-########################################################################
-
-DEV=ps
-DISTFILES=\
-  S SS \
-  ZD ZDR ZCMI \
-  AB ABI AI AR \
-  BMB BMBI BMI BMR \
-  CB CBI CI CR \
-  HB HBI HI HR \
-  HNB HNBI HNI HNR \
-  NB NBI NI NR \
-  PB PBI PI PR \
-  TB TBI TI TR \
-  EURO freeeuro.pfa freeeuro.afm \
-  text.enc download
-# these files must be in a subdirectory called `old'
-OLDDISTFILES=\
-  S SS \
-  CB CBI CI CR \
-  HB HBI HI HR \
-  HNB HNBI HNI HNR \
-  NB NBI NI NR \
-  PB PBI PI PR \
-  TB TBI TI TR \
-  symbol.afm symbolsl.afm \
-  zapfdr.afm zapfdr.ps
-
-PSFILES=prologue symbolsl.pfa zapfdr.pfa
-DEVGENFILES=generate/Makefile generate/dingbats.map \
-  generate/dingbats.rmap generate/lgreekmap \
-  generate/symbolchars generate/symbolsl.afm generate/textmap
-DEVGENSCRIPTS=generate/afmname generate/symbol.sed
-DEVFILES=DESC $(PSFILES) $(DISTFILES) $(DEVGENFILES)
-OLDDEVFILES=$(OLDDISTFILES)
-DEVSCRIPTS=$(DEVGENSCRIPTS)
-
-MOSTLYCLEANADD=DESC $(PSFILES)
-
-RM=rm -f
-
-DESC: DESC.in
-       cat $(srcdir)/DESC.in >DESC
-       echo broken $(BROKEN_SPOOLER_FLAGS) >>DESC
-       if test "$(PAGE)" = A4; then \
-         echo "papersize a4" >>DESC; \
-       else \
-         echo "papersize letter" >>DESC; \
-       fi
-       test -z '$(PSPRINT)' || echo print '$(PSPRINT)' >>DESC
-
-fonts: DESC
-       $(MAKE) -f $(srcdir)/generate/Makefile \
-         srcdir=$(srcdir)/generate DESC=$(srcdir)/DESC.in
-
-prologue: prologue.ps
-zapfdr.pfa: zapfdr.ps
-symbolsl.pfa: symbolsl.ps
-
-$(PSFILES):
-       $(RM) $@
-       sed -f $(srcdir)/psstrip.sed $? >$@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devps/devps.am b/font/devps/devps.am
new file mode 100644
index 0000000..0acb877
--- /dev/null
+++ b/font/devps/devps.am
@@ -0,0 +1,153 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devps_srcdir = $(top_srcdir)/font/devps
+devps_builddir = $(top_builddir)/font/devps
+DEVPSFONTFILES = \
+  font/devps/S \
+  font/devps/SS \
+  font/devps/ZD \
+  font/devps/ZDR \
+  font/devps/ZCMI \
+  font/devps/AB \
+  font/devps/ABI \
+  font/devps/AI \
+  font/devps/AR \
+  font/devps/BMB \
+  font/devps/BMBI \
+  font/devps/BMI \
+  font/devps/BMR \
+  font/devps/CB \
+  font/devps/CBI \
+  font/devps/CI \
+  font/devps/CR \
+  font/devps/HB \
+  font/devps/HBI \
+  font/devps/HI \
+  font/devps/HR \
+  font/devps/HNB \
+  font/devps/HNBI \
+  font/devps/HNI \
+  font/devps/HNR \
+  font/devps/NB \
+  font/devps/NBI \
+  font/devps/NI \
+  font/devps/NR \
+  font/devps/PB \
+  font/devps/PBI \
+  font/devps/PI \
+  font/devps/PR \
+  font/devps/TB \
+  font/devps/TBI \
+  font/devps/TI \
+  font/devps/TR \
+  font/devps/EURO \
+  font/devps/freeeuro.pfa \
+  font/devps/freeeuro.afm \
+  font/devps/text.enc \
+  font/devps/download
+
+DEVPSFONTFILES_GENERATED = \
+  font/devps/DESC \
+  font/devps/prologue \
+  font/devps/zapfdr.pfa \
+  font/devps/symbolsl.pfa
+devpsfontdir = $(fontdir)/devps
+devpsfont_DATA = $(DEVPSFONTFILES) $(DEVPSFONTFILES_GENERATED)
+
+# these files will be installed in oldfontdir
+OLDDEVPSFONTFILES = \
+  font/devps/old/S \
+  font/devps/old/SS \
+  font/devps/old/CB \
+  font/devps/old/CBI \
+  font/devps/old/CI \
+  font/devps/old/CR \
+  font/devps/old/HB \
+  font/devps/old/HBI \
+  font/devps/old/HI \
+  font/devps/old/HR \
+  font/devps/old/HNB \
+  font/devps/old/HNBI \
+  font/devps/old/HNI \
+  font/devps/old/HNR \
+  font/devps/old/NB \
+  font/devps/old/NBI \
+  font/devps/old/NI \
+  font/devps/old/NR \
+  font/devps/old/PB \
+  font/devps/old/PBI \
+  font/devps/old/PI \
+  font/devps/old/PR \
+  font/devps/old/TB \
+  font/devps/old/TBI \
+  font/devps/old/TI \
+  font/devps/old/TR \
+  font/devps/old/symbol.afm \
+  font/devps/old/symbolsl.afm \
+  font/devps/old/zapfdr.afm \
+  font/devps/old/zapfdr.ps
+olddevpsfontdir = $(oldfontdir)/devps
+olddevpsfont_DATA = $(OLDDEVPSFONTFILES)
+
+# Files installed in $(devfontdir)/generate
+DEVPSGENFILES = \
+  font/devps/generate/Makefile \
+  font/devps/generate/dingbats.map \
+  font/devps/generate/dingbats.rmap \
+  font/devps/generate/lgreekmap \
+  font/devps/generate/symbolchars \
+  font/devps/generate/symbolsl.afm \
+  font/devps/generate/textmap
+DEVPSGENSCRIPTS = \
+  font/devps/generate/afmname \
+  font/devps/generate/symbol.sed
+devpsgendir = $(devpsfontdir)/generate
+devpsgen_DATA = $(DEVPSGENFILES) $(DEVPSGENSCRIPTS)
+
+font/devps/DESC: $(devps_srcdir)/DESC.in
+       @$(MKDIR_P) font/devps
+       @cat $(devps_srcdir)/DESC.in >$@
+       @echo broken $(BROKEN_SPOOLER_FLAGS) >>$@
+       @if test "$(PAGE)" = A4; then \
+         echo "papersize a4" >>$@; \
+       else \
+         echo "papersize letter" >>$@; \
+       fi
+       @test -z '$(PSPRINT)' ||        echo print '$(PSPRINT)' >>$@
+
+fonts: devps_fonts
+# We add top_builddir to the PATH in case the only afmtodit available is the 
+# one in the current build.
+devps_fonts: afmtodit font/devps/DESC
+       PATH=$(top_builddir)$(GROFF_PATH_SEPARATOR)$(PATH) \
+        $(MAKE) -f $(devps_srcdir)/generate/Makefile \
+         srcdir=$(devps_srcdir)/generate DESC=$(devps_srcdir)/DESC.in
+
+font/devps/prologue: $(devps_srcdir)/prologue.ps
+       @$(MKDIR_P) font/devps
+       $(RM) $@
+       sed -f $(devps_srcdir)/psstrip.sed $? >$@
+font/devps/zapfdr.pfa: $(devps_srcdir)/zapfdr.ps
+       @$(MKDIR_P) font/devps
+       $(RM) $@
+       sed -f $(devps_srcdir)/psstrip.sed $? >$@
+font/devps/symbolsl.pfa: $(devps_srcdir)/symbolsl.ps
+       @$(MKDIR_P) font/devps
+       $(RM) $@
+       sed -f $(devps_srcdir)/psstrip.sed $? >$@
diff --git a/font/devutf8/Makefile.sub b/font/devutf8/Makefile.sub
deleted file mode 100644
index 4f2da52..0000000
--- a/font/devutf8/Makefile.sub
+++ /dev/null
@@ -1,65 +0,0 @@
-# Makefile.sub for `font devutf8'
-#
-# File position: <groff-source>/font/devutf8/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which is part of `groff'.
-#
-# `groff' 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.
-#
-# `groff' 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 this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-#
-########################################################################
-
-DEV=utf8
-FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-MOSTLYCLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-RM=rm -f
-
-$(FONTS): R.proto
-       @echo Making $@
-       @$(RM) $@
-       @charwidth=`expr $(RES) / $(CPI)` ; \
-        sed -e "s/^name [A-Z]*$$/name $@/" \
-            -e \
-             "s/^\\([^ ]*\\)   [0-9][0-9]*     /\\1    $$charwidth     /" \
-            -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
-            -e "s/^internalname .*$$/internalname $@/" \
-            -e "/^internalname/s/BI/3/" \
-            -e "/^internalname/s/B/2/" \
-            -e "/^internalname/s/I/1/" \
-            -e "/^internalname .*[^ 0-9]/d" \
-            $(srcdir)/R.proto >$@
-
-DESC: DESC.proto
-       @echo Making $@
-       @sed -e "s/^res .*$$/res $(RES)/" \
-            -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
-            -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
-            -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
-            $(srcdir)/DESC.proto >$@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/font/devutf8/devutf8.am b/font/devutf8/devutf8.am
new file mode 100644
index 0000000..6622ef0
--- /dev/null
+++ b/font/devutf8/devutf8.am
@@ -0,0 +1,42 @@
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+#
+# This file is part of `groff'
+#
+# `groff' 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.
+#
+# `groff' 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+devutf8_srcdir = $(top_srcdir)/font/devutf8
+DEVUTF8FONTS = R I B BI
+DEVUTF8FONTSFILES = \
+  font/devutf8/R font/devutf8/I font/devutf8/B font/devutf8/BI
+
+DEVUTF8RES = 240
+DEVUTF8CPI = 10
+DEVUTF8LPI = 6
+
+devutf8fontdir = $(fontdir)/devutf8
+devutf8font_DATA = $(DEVUTF8FONTSFILES) font/devutf8/DESC
+
+$(DEVUTF8FONTSFILES): $(devutf8_srcdir)/R.proto
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @$(RM) $@
+       @$(SHELL) $(GENFONTSSH) $(devutf8_srcdir)/R.proto \
+        $(DEVUTF8RES) $(DEVUTF8CPI) `basename address@hidden > $@
+
+font/devutf8/DESC: $(devutf8_srcdir)/DESC.proto
+       @echo Making $@
+       @$(MKDIR_P) `dirname address@hidden
+       @$(SHELL) $(GENDESCSH) $(devutf8_srcdir)/DESC.proto \
+        $(DEVUTF8RES) $(DEVUTF8CPI) $(DEVUTF8LPI) $(DEVUTF8FONTS) > $@
diff --git a/font/scripts/gendesc.sh b/font/scripts/gendesc.sh
new file mode 100755
index 0000000..5bf5376
--- /dev/null
+++ b/font/scripts/gendesc.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Usage: gendesc.sh <input .proto> <RES> <CPI> <LPI> <list of fonts>
+if test -z "$1" || test -z "$2" || test -z "$3" || test -z "$4" || \
+    test -z "$5"; then
+    echo "genfonts.sh: missing parameter"; exit 255;
+fi
+INPUT=$1
+RES=$2
+CPI=$3
+LPI=$4
+shift 4
+NBFONTS=`echo $#`
+FONTS=`echo $*`
+sed -e "s/^res .*$/res $RES/" \
+    -e "s/^hor .*$/hor `expr $RES / $CPI`/" \
+    -e "s/^vert .*$/vert `expr $RES / $LPI`/" \
+    -e "s/^fonts .*$/fonts $NBFONTS $FONTS/" \
+    $INPUT
diff --git a/font/scripts/genfonts.sh b/font/scripts/genfonts.sh
new file mode 100755
index 0000000..ad45612
--- /dev/null
+++ b/font/scripts/genfonts.sh
@@ -0,0 +1,23 @@
+#!/bin/sh -xv
+# Usage:
+# genfonts.sh <input .proto file> <RES> <CPI> <FONT name>
+if test -z "$1" || test -z "$2" || test -z "$3" || test -z "$4"; then
+    echo "genfonts.sh: missing parameter"; exit 255;
+fi
+
+INPUT=$1
+RES=$2
+CPI=$3
+FONT=$4
+charwidth=`expr $RES / $CPI` ;
+sed -e "s|^name [A-Z]*$|name $FONT|" \
+    -e \
+    "s/^\\([^  ]*\\)   [0-9][0-9]*     /\\1    $charwidth      /" \
+    -e "s/^spacewidth [0-9][0-9]*$/spacewidth $charwidth/" \
+    -e "s|^internalname .*$|internalname $FONT|" \
+    -e "/^internalname/s/CR/4/" \
+    -e "/^internalname/s/BI/3/" \
+    -e "/^internalname/s/B/2/" \
+    -e "/^internalname/s/I/1/" \
+    -e "/^internalname .*[^ 0-9]/d" \
+    $INPUT



reply via email to

[Prev in Thread] Current Thread [Next in Thread]