summaryrefslogtreecommitdiffstats
path: root/contrib/pdfmark/pdfmark.am
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:44:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:44:05 +0000
commitd318611dd6f23fcfedd50e9b9e24620b102ba96a (patch)
tree8b9eef82ca40fdd5a8deeabf07572074c236095d /contrib/pdfmark/pdfmark.am
parentInitial commit. (diff)
downloadgroff-d318611dd6f23fcfedd50e9b9e24620b102ba96a.tar.xz
groff-d318611dd6f23fcfedd50e9b9e24620b102ba96a.zip
Adding upstream version 1.23.0.upstream/1.23.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/pdfmark/pdfmark.am')
-rw-r--r--contrib/pdfmark/pdfmark.am99
1 files changed, 99 insertions, 0 deletions
diff --git a/contrib/pdfmark/pdfmark.am b/contrib/pdfmark/pdfmark.am
new file mode 100644
index 0000000..15eec8c
--- /dev/null
+++ b/contrib/pdfmark/pdfmark.am
@@ -0,0 +1,99 @@
+# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Written by Keith Marshall (keith.d.marshall@ntlworld.com)
+# 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/>.
+
+pdfmark_srcdir = $(top_srcdir)/contrib/pdfmark
+pdfmark_builddir = $(top_builddir)/contrib/pdfmark
+
+man1_MANS += contrib/pdfmark/pdfroff.1
+
+bin_SCRIPTS += pdfroff
+
+# Files installed in $(tmacdir)
+TMACFILES = \
+ contrib/pdfmark/pdfmark.tmac \
+ contrib/pdfmark/sanitize.tmac \
+ contrib/pdfmark/spdf.tmac
+pdfmarktmacdir = $(tmacdir)
+dist_pdfmarktmac_DATA = $(TMACFILES)
+
+# Files installed in $(pdfdocdir)
+PDFDOCFILES = \
+ contrib/pdfmark/pdfmark.pdf
+if USE_PDFROFF
+pdfmarkpdfdocdir = $(pdfdocdir)
+nodist_pdfmarkpdfdoc_DATA = $(PDFDOCFILES)
+MOSTLYCLEANFILES += $(PDFDOCFILES)
+else
+EXTRA_DIST += $(PDFDOCFILES)
+endif
+
+EXTRA_DIST += \
+ contrib/pdfmark/cover.ms \
+ contrib/pdfmark/pdfmark.ms \
+ contrib/pdfmark/ChangeLog \
+ contrib/pdfmark/README \
+ contrib/pdfmark/PROBLEMS \
+ contrib/pdfmark/TODO \
+ contrib/pdfmark/pdfroff.1.man \
+ contrib/pdfmark/pdfroff.sh
+
+PDFROFF=\
+ GROFF_TMPDIR=. \
+ GROFF_COMMAND_PREFIX= \
+ GROFF_BIN_DIR="$(GROFF_BIN_DIR)" \
+ GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+ ./pdfroff \
+ $(FFLAG) $(MFLAG) -dpaper=$(PAGE) -P-p$(PAGE) -M$(pdfmark_srcdir)
+
+contrib/pdfmark/pdfmark.pdf: contrib/pdfmark/pdfmark.ms
+ $(GROFF_V)$(MKDIR_P) `dirname $@` \
+ && $(PDFROFF) -I $(doc_builddir) -I $(doc_srcdir) -mspdf \
+ --stylesheet=$(pdfmark_srcdir)/cover.ms \
+ $(top_srcdir)/contrib/pdfmark/pdfmark.ms >$@
+
+# The pdf files use the local script to generate.
+$(PDFDOCFILES): pdfroff groff troff gropdf
+$(PDFDOCFILES): $(dist_devpsfont_DATA) $(nodist_devpsfont_DATA) \
+ $(DOC_GNU_EPS)
+
+pdfroff: contrib/pdfmark/pdfroff.sh $(SH_DEPS_SED_SCRIPT)
+ $(AM_V_GEN)sed -f $(SH_DEPS_SED_SCRIPT) \
+ -e "s|[@]VERSION[@]|$(VERSION)|" \
+ -e "s|[@]GROFF_AWK_INTERPRETERS[@]|$(ALT_AWK_PROGS)|" \
+ -e "s|[@]GROFF_GHOSTSCRIPT_INTERPRETERS[@]|$(ALT_GHOSTSCRIPT_PROGS)|" \
+ -e "s|[@]GROFF_BIN_DIR[@]|$(bindir)|" $(pdfmark_srcdir)/pdfroff.sh \
+ >$@ \
+ && chmod +x $@
+
+mostlyclean-local: mostlyclean_pdfmark
+mostlyclean_pdfmark:
+ rm -rf $(top_builddir)/pdfroff-*
+
+uninstall_groffdirs: uninstall-pdfmark-hook
+uninstall-pdfmark-hook:
+if USE_PDFROFF
+ -rmdir $(DESTDIR)$(pdfmarkpdfdocdir)
+endif
+
+
+# Local Variables:
+# mode: makefile-automake
+# fill-column: 72
+# End:
+# vim: set autoindent filetype=automake textwidth=72: