[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 31/46: Add contrib/mom
From: |
Bertrand Garrigues |
Subject: |
[groff] 31/46: Add contrib/mom |
Date: |
Sun, 05 Oct 2014 22:31:04 +0000 |
bgarrigues pushed a commit to branch automake3
in repository groff.
commit 1a156a5ccac53bfeff5cb014ba96aa4c2802a9f3
Author: Bertrand Garrigues <address@hidden>
Date: Sun Sep 7 18:36:36 2014 +0200
Add contrib/mom
---
Makefile.am | 4 +
TESTS | 16 ++-
contrib/mom/Makefile.sub | 228 ------------------------------------
contrib/mom/mom.am | 154 ++++++++++++++++++++++++
contrib/mom/{om.tmac => om.tmac-u} | 0
5 files changed, 170 insertions(+), 232 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f67471e..76969a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -552,6 +552,7 @@ include
$(top_srcdir)/contrib/groff_filenames/groff_filenames.am
include $(top_srcdir)/contrib/groffer/groffer.am
include $(top_srcdir)/contrib/hdtbl/hdtbl.am
include $(top_srcdir)/contrib/mm/mm.am
+include $(top_srcdir)/contrib/mom/mom.am
include $(top_srcdir)/contrib/pdfmark/pdfmark.am
include $(top_srcdir)/contrib/pic2graph/pic2graph.am
include $(top_srcdir)/doc/doc.am
@@ -642,6 +643,9 @@ uninstall_groffdirs:
if test -d $(DESTDIR)$(exampledir); then \
rmdir $(DESTDIR)$(exampledir); \
fi; \
+ if test -d $(DESTDIR)$(htmldocdir); then \
+ rmdir $(DESTDIR)$(htmldocdir); \
+ fi; \
rmdir $(DESTDIR)$(docdir); \
fi
diff --git a/TESTS b/TESTS
index 95eedce..c18a010 100644
--- a/TESTS
+++ b/TESTS
@@ -20,8 +20,7 @@ Current status
- Build font/*
- man files from 'man' directory installed
- tmac files from 'tmac' directory installed
- - Build and installation of contrib, except:
- -- mom
+ - Build and installation of contrib
Tests
-----
@@ -175,6 +174,10 @@ from contrib/pdfmark
- pdfmark.pdf
- pdfroff
+from contrib/mom
+ - pdfmom
+ - 4 .pdf example files
+
from doc
- gnu.eps
@@ -225,7 +228,10 @@ were built from a clean environment:
- make pic2graph
- make glilypond
- make groffer
+ - make pdfroff
- make contrib/pdfmark/pdfmark.pdf
+ - make pdfmom
+ - make contrib/mom/examples/mom-pdf.pdf
2.2 make clean
@@ -361,6 +367,10 @@ Differences with former build system:
-- tmac files
-- pdfmark.pdf
+ - contrib/mom
+ -- example files in
$(DESTDIR)/usr/local/share/doc/groff-1.22.2/examples/mom
+ -- html files in $(DESTDIR)/usr/local/share/doc/groff-1.22.2/html/mom
+
Diff with previous build system:
- devcp1047 fonts are installed $(DESTDIR)/usr/local/groff/1.22.2/font
@@ -368,8 +378,6 @@ TODO:
- doc
- - examples from contrib
-
- create the 'current' symlink
- The original build system might uses tmac_s_prefix,
diff --git a/contrib/mom/Makefile.sub b/contrib/mom/Makefile.sub
deleted file mode 100644
index 04fc501..0000000
--- a/contrib/mom/Makefile.sub
+++ /dev/null
@@ -1,228 +0,0 @@
-# -*- makefile -*-
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
-# Written by Werner Lemberg (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/>.
-
-# These may be overridden if cross-compiling.
-GROFFBIN=$(top_builddir)/src/roff/groff/groff
-GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|$(SH_SEP)|g'`
-PDFMOMBIN=$(top_builddir)/src/devices/gropdf/pdfmom
-
-groff_bin_dirs=\
- $(top_builddir)/src/roff/groff \
- $(top_builddir)/src/roff/troff \
- $(top_builddir)/src/devices/grops \
- $(top_builddir)/src/devices/gropdf
-
-FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
-TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac -M$(srcdir)
-
-GROFF=\
- GROFF_COMMAND_PREFIX= \
- GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
- $(GROFFBIN) $(FFLAG) $(TFLAG)
-
-PDFMOM=\
- GROFF_COMMAND_PREFIX= \
- GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
- PDFMOM_BIN_PATH="$(top_builddir)/src/devices/gropdf" \
- $(PDFMOMBIN) $(FFLAG) $(TFLAG)
-
-MAN7=\
- groff_mom.n
-
-NORMALFILES=\
- mom.tmac
-
-# These files are processed with `strip.sed'.
-STRIPFILES=\
- om.tmac
-
-HTMLDOCFILES=\
- momdoc/stylesheet.css \
- momdoc/appendices.html \
- momdoc/color.html \
- momdoc/cover.html \
- momdoc/definitions.html \
- momdoc/docelement.html \
- momdoc/docprocessing.html \
- momdoc/goodies.html \
- momdoc/graphical.html \
- momdoc/headfootpage.html \
- momdoc/images.html \
- momdoc/inlines.html \
- momdoc/intro.html \
- momdoc/letters.html \
- momdoc/macrolist.html \
- momdoc/rectoverso.html \
- momdoc/refer.html \
- momdoc/reserved.html \
- momdoc/tables-of-contents.html \
- momdoc/toc.html \
- momdoc/typesetting.html \
- momdoc/using.html \
- momdoc/version-2.html
-
-EXAMPLEFILES=\
- examples/letter.mom \
- examples/mom-pdf.mom \
- examples/sample_docs.mom \
- examples/typesetting.mom \
- examples/README.txt \
- examples/elvis_syntax \
- examples/elvis_syntax.new \
- examples/penguin.ps \
- examples/penguin.pdf \
- examples/mom.vim
-
-PROCESSEDEXAMPLEFILES=\
- examples/letter.pdf \
- examples/mom-pdf.pdf \
- examples/sample_docs.pdf \
- examples/typesetting.pdf
-
-HTMLDOCFILES_=`echo $(HTMLDOCFILES) | sed 's|momdoc/||g'`
-EXAMPLEFILES_=`echo $(EXAMPLEFILES) | sed 's|examples/||g'`
-PROCESSEDEXAMPLEFILES_=`echo $(PROCESSEDEXAMPLEFILES) | sed 's|examples/||g'`
-PDFDOCFILE=mom-pdf.pdf
-
-MOSTLYCLEANADD=\
- stamp-strip \
- penguin.ps \
- penguin.pdf \
- $(PROCESSEDEXAMPLEFILES) \
- examples/stamp \
- om.tmac-s
-
-RM=rm -f
-
-#.SUFFIXES: .mom .ps
-#.mom.ps:
-# $(GROFF) -Tps -mom $< >$@
-
-.SUFFIXES: .mom .pdf
-.mom.pdf:
- LC_ALL=C $(PDFMOM) $< >$@
-
-all: stamp-strip $(make_pdfexamples)
-
-$(PROCESSEDEXAMPLEFILES): penguin.ps penguin.pdf examples/stamp
-
-pdfexamples: $(PROCESSEDEXAMPLEFILES)
-
-penguin.ps:
- cp $(srcdir)/examples/penguin.ps .
-penguin.pdf:
- cp $(srcdir)/examples/penguin.pdf .
-
-examples/stamp:
- -test -d examples || $(mkinstalldirs) examples
- touch $@
-
-install_data: install_always \
- $(make_install_pdfdoc) $(make_install_htmldoc) \
- $(make_install_examples)
-
-install_always: stamp-strip $(NORMALFILES)
- -test -d $(DESTDIR)$(tmacdir) || $(mkinstalldirs) $(DESTDIR)$(tmacdir)
- for f in $(NORMALFILES); do \
- $(RM) $(DESTDIR)$(tmacdir)/$$f; \
- $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(tmacdir)/$$f; \
- done
- for f in $(STRIPFILES); do \
- $(RM) $(DESTDIR)$(tmacdir)/$$f; \
- $(INSTALL_DATA) $$f-s $(DESTDIR)$(tmacdir)/$$f; \
- done
-
-install_pdfdoc:
-# Since this uses examples/, it's in install_pdfexamples
-
-install_htmldoc: install_always $(HTMLDOCFILES)
- -test -d $(DESTDIR)$(htmldocdir)/mom \
- || $(mkinstalldirs) $(DESTDIR)$(htmldocdir)/mom
- for f in $(HTMLDOCFILES_); do \
- $(RM) $(DESTDIR)$(htmldocdir)/mom/$$f; \
- $(INSTALL_DATA) $(srcdir)/momdoc/$$f \
- $(DESTDIR)$(htmldocdir)/mom/$$f; \
- done
-
-install_examples: install_examples_always $(make_install_pdfexamples)
-
-install_examples_always: $(EXAMPLEFILES)
- -test -d $(DESTDIR)$(exampledir)/mom \
- || $(mkinstalldirs) $(DESTDIR)$(exampledir)/mom
- for f in $(EXAMPLEFILES_); do \
- $(RM) $(DESTDIR)$(exampledir)/mom/$$f; \
- $(INSTALL_DATA) $(srcdir)/examples/$$f \
- $(DESTDIR)$(exampledir)/mom/$$f; \
- done
-
-install_pdfexamples: install_examples_always $(PROCESSEDEXAMPLEFILES)
- for f in $(PROCESSEDEXAMPLEFILES_); do \
- $(RM) $(DESTDIR)$(exampledir)/mom/$$f; \
- $(INSTALL_DATA) examples/$$f $(DESTDIR)$(exampledir)/mom/$$f; \
- done
- -test -d $(DESTDIR)$(pdfdocdir) \
- || $(mkinstalldirs) $(DESTDIR)$(pdfdocdir)
- for f in $(PDFDOCFILE); do \
- $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
- ln -s $(exampledir)/mom/$$f $(DESTDIR)$(pdfdocdir)/$$f; \
- done
-
-stamp-strip: $(STRIPFILES)
- for f in $(STRIPFILES); do \
- $(RM) $$f-s; \
- LANG=C LC_ALL=C \
- sed -f $(top_srcdir)/tmac/strip.sed $(srcdir)/$$f >$$f-s; \
- done
- touch $@
-
-uninstall_sub: uninstall_always \
- $(make_uninstall_pdfdoc) $(make_uninstall_htmldoc) \
- $(make_uninstall_examples)
-
-uninstall_always:
- -for f in $(NORMALFILES) $(STRIPFILES); do \
- $(RM) $(DESTDIR)$(tmacdir)/$$f; \
- done
-
-uninstall_pdfdoc: uninstall_always
-# Since that used examples/, it's in uninstall_pdfexamples
-
-uninstall_htmldoc: uninstall_always
- -for f in $(HTMLDOCFILES_); do \
- $(RM) $(DESTDIR)$(htmldocdir)/mom/$$f; \
- done
- -test -d $(DESTDIR)$(htmldocdir)/mom && \
- rmdir $(DESTDIR)$(htmldocdir)/mom
-
-uninstall_examples: uninstall_examples_always $(make_uninstall_pdfexamples)
- -test -d $(DESTDIR)$(exampledir)/mom && \
- rmdir $(DESTDIR)$(exampledir)/mom
-
-uninstall_examples_always:
- -for f in $(EXAMPLEFILES_); do \
- $(RM) $(DESTDIR)$(exampledir)/mom/$$f; \
- done
-
-uninstall_pdfexamples: uninstall_examples_always
- -for f in $(PDFDOCFILE); do \
- $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
- done
- -for f in $(PROCESSEDEXAMPLEFILES_); do \
- $(RM) $(DESTDIR)$(exampledir)/mom/$$f; \
- done
diff --git a/contrib/mom/mom.am b/contrib/mom/mom.am
new file mode 100644
index 0000000..e262cc6
--- /dev/null
+++ b/contrib/mom/mom.am
@@ -0,0 +1,154 @@
+# Copyright (C) 2002-2014
+# Free Software Foundation, Inc.
+# Written by Werner Lemberg (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/>.
+
+mom_srcdir = $(top_srcdir)/contrib/mom
+mom_builddir = $(top_builddir)/contrib/mom
+
+# pdfmom command used to generated .pdf
+MOM_TFLAG = -M$(mom_srcdir) -M$(mom_builddir)
+MOMPDFMOM = \
+ GROFF_COMMAND_PREFIX= \
+ GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+ PDFMOM_BIN_PATH="$(top_builddir)" \
+ $(PDFMOMBIN) $(FFLAG) $(TFLAG) $(MOM_TFLAG)
+
+man7_MANS += contrib/mom/groff_mom.n
+
+# Files installed in $(tmacdir).
+# MOMNORMALFILES are located in the source tree.
+# om.tmac is generated in the build tree from the unstripped file om.tmac-u
with
+# strip.sed
+MOMNORMALFILES = \
+ contrib/mom/mom.tmac
+MOMSTRIPFILES = \
+ contrib/mom/om.tmac
+momtmacdir = $(tmacdir)
+nodist_momtmac_DATA = $(MOMSTRIPFILES)
+dist_momtmac_DATA = $(MOMNORMALFILES)
+
+# Files installed in htmldocdir/mom
+MOMHTMLDOCFILES=\
+ contrib/mom/momdoc/stylesheet.css \
+ contrib/mom/momdoc/appendices.html \
+ contrib/mom/momdoc/color.html \
+ contrib/mom/momdoc/cover.html \
+ contrib/mom/momdoc/definitions.html \
+ contrib/mom/momdoc/docelement.html \
+ contrib/mom/momdoc/docprocessing.html \
+ contrib/mom/momdoc/goodies.html \
+ contrib/mom/momdoc/graphical.html \
+ contrib/mom/momdoc/headfootpage.html \
+ contrib/mom/momdoc/images.html \
+ contrib/mom/momdoc/inlines.html \
+ contrib/mom/momdoc/intro.html \
+ contrib/mom/momdoc/letters.html \
+ contrib/mom/momdoc/macrolist.html \
+ contrib/mom/momdoc/rectoverso.html \
+ contrib/mom/momdoc/refer.html \
+ contrib/mom/momdoc/reserved.html \
+ contrib/mom/momdoc/tables-of-contents.html \
+ contrib/mom/momdoc/toc.html \
+ contrib/mom/momdoc/typesetting.html \
+ contrib/mom/momdoc/using.html \
+ contrib/mom/momdoc/version-2.html
+momhtmldir = $(htmldocdir)/mom
+momhtml_DATA = $(MOMHTMLDOCFILES)
+
+# Files installed in $(examplesdir)/mom. MOMEXAMPLEFILES are located
+# in the source tree, while MOMPROCESSEDEXAMPLEFILES are generated in
+# the build tree.
+MOMEXAMPLEFILES=\
+ contrib/mom/examples/letter.mom \
+ contrib/mom/examples/mom-pdf.mom \
+ contrib/mom/examples/sample_docs.mom \
+ contrib/mom/examples/typesetting.mom \
+ contrib/mom/examples/README.txt \
+ contrib/mom/examples/elvis_syntax \
+ contrib/mom/examples/elvis_syntax.new \
+ contrib/mom/examples/penguin.ps \
+ contrib/mom/examples/penguin.pdf \
+ contrib/mom/examples/mom.vim
+momexampledir = $(exampledir)/mom
+momexample_DATA = $(MOMEXAMPLEFILES)
+
+MOMPROCESSEDEXAMPLEFILES = \
+ contrib/mom/examples/letter.pdf \
+ contrib/mom/examples/mom-pdf.pdf \
+ contrib/mom/examples/sample_docs.pdf \
+ contrib/mom/examples/typesetting.pdf
+momprocessedexampledir = $(exampledir)/mom
+nodist_momprocessedexample_DATA = $(MOMPROCESSEDEXAMPLEFILES)
+
+# For this list of files we add a symlink from $(exampledir)/mom to
$(pdfdocdir)
+PDFDOCFILE = mom-pdf.pdf
+
+EXTRA_DIST += $(MOMHTMLDOCFILES) $(MOMEXAMPLEFILES) \
+ contrib/mom/BUGS \
+ contrib/mom/ChangeLog \
+ contrib/mom/NEWS \
+ contrib/mom/TODO \
+ contrib/mom/copyright \
+ contrib/mom/examples \
+ contrib/mom/groff_mom.man \
+ contrib/mom/om.tmac-u
+
+MOSTLYCLEANFILES += \
+ $(MOMPROCESSEDEXAMPLEFILES) \
+ contrib/mom/om.tmac \
+ penguin.ps \
+ penguin.pdf
+
+# Rule to generated .pdf files from .mom files
+SUFFIXES += .mom .pdf
+.mom.pdf:
+ @$(MKDIR_P) `dirname address@hidden
+ LC_ALL=C $(MOMPDFMOM) $< >$@
+
+$(MOMPROCESSEDEXAMPLEFILES): $(MOMSTRIPFILES) $(MOMNORMALFILES) \
+ groff troff gropdf pdfmom penguin.ps penguin.pdf \
+ gnu.eps font/devpdf/build_font_files
+
+penguin.ps:
+ cp $(mom_srcdir)/examples/penguin.ps $@
+penguin.pdf:
+ cp $(mom_srcdir)/examples/penguin.pdf $@
+
+$(MOMSTRIPFILES): $(top_srcdir)/tmac/strip.sed
+ @$(MKDIR_P) `dirname address@hidden
+ sed -f $(top_srcdir)/tmac/strip.sed $(mom_srcdir)/`basename
address@hidden > $@;
+
+install-data-hook: install_mom
+install_mom:
+ for f in $(PDFDOCFILE); do \
+ $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
+ ln -s $(exampledir)/mom/$$f $(DESTDIR)$(pdfdocdir)/$$f; \
+ done
+
+uninstall_groffdirs: uninstall_mom
+uninstall_mom:
+ for f in $(PDFDOCFILE); do \
+ $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
+ done
+ if test -d $(DESTDIR)$(exampledir)/mom; then \
+ rmdir $(DESTDIR)$(exampledir)/mom; \
+ fi
+ if test -d $(DESTDIR)$(htmldocdir)/mom; then \
+ rmdir $(DESTDIR)$(htmldocdir)/mom; \
+ fi
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac-u
similarity index 100%
rename from contrib/mom/om.tmac
rename to contrib/mom/om.tmac-u
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 31/46: Add contrib/mom,
Bertrand Garrigues <=