# Copyright (C) 2014-2020 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
MOSTLYCLEANFILES += $(DEVUTF8FONTSFILES) font/devutf8/DESC
EXTRA_DIST += \
  font/devutf8/R.proto \
  font/devutf8/DESC.proto \
  font/devutf8/NOTES \
  font/devutf8/R.in

$(DEVUTF8FONTSFILES): $(devutf8_srcdir)/R.proto
	$(AM_V_GEN)$(MKDIR_P) `dirname $@` \
	&& $(RM) $@ \
	&& $(SHELL) $(GENFONTSSH) $(devutf8_srcdir)/R.proto \
	  $(DEVUTF8RES) $(DEVUTF8CPI) `basename $@` >$@

font/devutf8/DESC: $(devutf8_srcdir)/DESC.proto
	$(AM_V_GEN)$(MKDIR_P) `dirname $@` \
	&& $(SHELL) $(GENDESCSH) $(devutf8_srcdir)/DESC.proto \
	  $(DEVUTF8RES) $(DEVUTF8CPI) $(DEVUTF8LPI) $(DEVUTF8FONTS) >$@

# (UTF-8-encoded) text documents to be produced by troff should depend
# on this stamp file to ensure that grotty's device and font description
# files are available.
MOSTLYCLEANFILES += font/devutf8/stamp
font/devutf8/stamp: font/devutf8/DESC $(DEVUTF8FONTSFILES)
	$(AM_V_at)>$@


# Local Variables:
# mode: makefile-automake
# fill-column: 72
# End:
# vim: set autoindent filetype=automake textwidth=72:
