groff-commit
[Top][All Lists]
Advanced

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

[groff] 30/46: Add contrib/pdfmark.


From: Bertrand Garrigues
Subject: [groff] 30/46: Add contrib/pdfmark.
Date: Sat, 29 Nov 2014 19:47:36 +0000

bgarrigues pushed a commit to branch automake3
in repository groff.

commit 4c719cedeafa37937a4291a3c3bedf28dad23f06
Author: Bertrand Garrigues <address@hidden>
Date:   Sun Sep 7 17:54:53 2014 +0200

    Add contrib/pdfmark.
    
    Build of gnu.eps. This file is distributed.
    
    Add m4 macro to check the presence of xpmtoppm.
---
 Makefile.am                  |   15 +--
 TESTS                        |   28 ++++-
 configure.ac                 |    1 +
 contrib/pdfmark/Makefile.sub |  126 ------------------
 contrib/pdfmark/pdfmark.am   |   87 ++++++++++++
 doc/Makefile.sub             |  296 ------------------------------------------
 doc/doc.am                   |   54 ++++++++
 m4/groff.m4                  |    4 +
 8 files changed, 175 insertions(+), 436 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c96416f..268430f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -557,7 +557,9 @@ 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/pdfmark/pdfmark.am
 include $(top_srcdir)/contrib/pic2graph/pic2graph.am
+include $(top_srcdir)/doc/doc.am
 include $(top_srcdir)/font/devX100/devX100.am
 include $(top_srcdir)/font/devX100-12/devX100-12.am
 include $(top_srcdir)/font/devX75/devX75.am
@@ -624,17 +626,6 @@ BUILT_SOURCES += defs.h
 # possible
 lib/localcharset.$(OBJEXT): lib/configmake.h
 
-# File used by contrib/hdtbl and contrib/pdfmark
-gnu.eps:
-       if test -f $(top_srcdir)/doc/gnu.eps; then \
-         cp $(top_srcdir)/doc/gnu.eps . ; \
-       elif test -f $(top_builddir)/doc/gnu.eps; then \
-         cp $(top_builddir)/doc/gnu.eps . ; \
-       else \
-         xpmtoppm $(top_srcdir)/doc/gnu.xpm | pnmdepth 15 \
-           | $(pnmtops_nosetpage) -noturn -rle >$@ ; \
-       fi
-
 # directories specific to groff
 uninstall-hook: uninstall_groffdirs
 uninstall_groffdirs:
@@ -684,7 +675,7 @@ EXTRA_DIST += \
   README.MinGW \
   arch/djgpp
 
-MOSTLYCLEANFILES += $(man1_MANS) $(man5_MANS) $(man7_MANS) $(bin_SCRIPTS) 
gnu.eps
+MOSTLYCLEANFILES += $(man1_MANS) $(man5_MANS) $(man7_MANS) $(bin_SCRIPTS)
 
 # Rule to build .man files. The brackets around the @ are used to prevent the 
 # substitution of the variable by automake. 
diff --git a/TESTS b/TESTS
index d2c651b..1335bb7 100644
--- a/TESTS
+++ b/TESTS
@@ -21,8 +21,6 @@ Current status
   - man files from 'man' directory installed
   - tmac files from 'tmac' directory installed
   - Build and installation of contrib, except:
-    -- mm
-    -- pdfmark
     -- mom
 
 Tests
@@ -167,6 +165,16 @@ from contrib/groffer
 from contrib/hdtbl
   - hdtbl examples and tmac files
 
+from contrib/mm
+  - .n files
+
+from contrib/pdfmark
+  - pdfmark.pdf
+  - pdfroff
+
+from doc
+  - gnu.eps
+
 In order to check and improve the dependencies, the following targets
 were built from a clean environment:
   - make lib/libgnu.a
@@ -213,6 +221,7 @@ were built from a clean environment:
   - make pic2graph
   - make glilypond
   - make groffer
+  - make contrib/pdfmark/pdfmark.pdf 
 
 2.2 make clean
 
@@ -328,6 +337,18 @@ Differences with former build system:
     -- hdtbl.tmac and hdmisc.tmac installed in 
        $(DESTDIR)/usr/local/share/groff-1.22.3/tmac
 
+  - contrib/mm
+    
+    -- tmac files in tmacdir, misc files in
+       $(DESTDIR)/usr/local/share/groff/1.22.3/tmac/mm
+
+    -- refer-mm.tmac in tmacdir
+
+  - contrib/pdfmark
+
+    -- tmac files
+    -- pdfmark.pdf
+
 Diff with previous build system:
   - devcp1047 fonts are installed $(DESTDIR)/usr/local/groff/1.22.3/font
 
@@ -422,6 +443,9 @@ TODO:
     src/preproc/pic/pic.hpp 
     src/preproc/refer/label.hpp
     src/preproc/refere/label.cpp
+    doc/gnu.eps
+
+Note: when building from a tarball, we will use doc/gnu.eps.
 
 2.9 make check
   
diff --git a/configure.ac b/configure.ac
index fa315a7..280710a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,7 @@ GROFF_INSTALL_INFO
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MKDIR_P
+GROFF_PROG_XPMTOPPM
 
 # use a dummy substitution if no csh hack is necessary to avoid errors
 # with non-GNU sed programs
diff --git a/contrib/pdfmark/Makefile.sub b/contrib/pdfmark/Makefile.sub
deleted file mode 100644
index 01c6d8b..0000000
--- a/contrib/pdfmark/Makefile.sub
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (C) 2005-2014  Free Software Foundation, Inc.
-#      Written by Keith Marshall (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/>.
-
-MAN1=\
-  pdfroff.n
-
-CMDFILES=\
-  pdfroff
-
-TMACFILES=\
-  pdfmark.tmac \
-  spdf.tmac
-
-PDFDOCFILES=\
-  pdfmark.pdf
-
-MOSTLYCLEANDIRADD=\
-  pdfroff-*
-
-MOSTLYCLEANADD=\
-  gnu.eps \
-  $(PDFDOCFILES) \
-  $(CMDFILES) \
-  pdf[0-9]*
-
-GROFF_BIN_DIR=$(top_builddir)/src/roff/groff
-GROFF_OTHER_BIN_DIRS=\
-  $(top_builddir)/src/roff/troff \
-  $(top_builddir)/src/devices/grops
-GROFF_BIN_DIRS=$(GROFF_BIN_DIR) $(GROFF_OTHER_BIN_DIRS)
-GROFF_BIN_PATH=`echo $(GROFF_BIN_DIRS) | sed -e 's|  *|$(SH_SEP)|g'`
-
-FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
-MFLAG=-M$(srcdir) -M$(top_builddir)/tmac -M$(top_srcdir)/tmac
-PFLAG=-dpaper=$(PAGE) -P-p$(PAGE)
-
-PDFROFF=\
-  GROFF_TMPDIR=. \
-  GROFF_COMMAND_PREFIX= \
-  GROFF_BIN_DIR="$(GROFF_BIN_DIR)" \
-  GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
-  ./pdfroff --keep-temporary-files $(FFLAG) $(MFLAG) $(PFLAG)
-
-RM=rm -f
-
-.SUFFIXES: .ms .pdf
-.ms.pdf:
-       $(PDFROFF) -mspdf --stylesheet=$(srcdir)/cover.ms $< >$@
-
-all: pdfroff $(make_pdfdoc)
-
-# The pdf files use the local script to generate.
-$(PDFDOCFILES): pdfroff
-
-pdfdoc: gnu.eps $(PDFDOCFILES)
-
-gnu.eps:
-       if test -f $(top_srcdir)/doc/gnu.eps; then \
-         cp $(top_srcdir)/doc/gnu.eps . ; \
-       elif test -f $(top_builddir)/doc/gnu.eps; then \
-         cp $(top_builddir)/doc/gnu.eps . ; \
-       else \
-         xpmtoppm $(top_srcdir)/doc/gnu.xpm | pnmdepth 15 \
-           | $(pnmtops_nosetpage) -noturn -rle >$@ ; \
-       fi
-
-pdfroff: pdfroff.sh $(SH_DEPS_SED_SCRIPT)
-       sed -f $(SH_DEPS_SED_SCRIPT) \
-           -e "s|@VERSION@|$(version)$(revision)|" \
-           -e "s|@GROFF_AWK_INTERPRETERS@|$(ALT_AWK_PROGS)|" \
-           -e "s|@GROFF_GHOSTSCRIPT_INTERPRETERS@|$(ALT_GHOSTSCRIPT_PROGS)|" \
-           -e "s|@GROFF_BIN_DIR@|$(bindir)|" $(srcdir)/pdfroff.sh >$@
-       chmod +x $@
-
-install_data: install_always $(make_install_pdfdoc)
-
-install_always:
-       -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
-       for f in $(CMDFILES); do \
-         $(RM) $(DESTDIR)$(bindir)/$$f; \
-         $(INSTALL_SCRIPT) $$f $(DESTDIR)$(bindir)/$$f; \
-       done
-       -test -d $(DESTDIR)$(tmacdir) || $(mkinstalldirs) $(DESTDIR)$(tmacdir)
-       for f in $(TMACFILES); do \
-         $(RM) $(DESTDIR)$(tmacdir)/$$f; \
-         $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(tmacdir)/$$f; \
-       done
-
-install_pdfdoc: install_always
-       -test -d $(DESTDIR)$(pdfdocdir) \
-         || $(mkinstalldirs) $(DESTDIR)$(pdfdocdir)
-       for f in $(PDFDOCFILES); do \
-         $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
-         $(INSTALL_DATA) $$f $(DESTDIR)$(pdfdocdir)/$$f; \
-       done
-
-uninstall_sub: uninstall_always $(make_uninstall_pdfdoc)
-
-uninstall_always:
-       -for f in $(CMDFILES); do $(RM) $(DESTDIR)$(bindir)/$$f; done
-       -for f in $(TMACFILES); do $(RM) $(DESTDIR)$(tmacdir)/$$f; done
-
-uninstall_pdfdoc: uninstall_always
-       -for f in $(PDFDOCFILES); do $(RM) $(DESTDIR)$(pdfdocdir)/$$f; done
-
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/contrib/pdfmark/pdfmark.am b/contrib/pdfmark/pdfmark.am
new file mode 100644
index 0000000..3bc6da2
--- /dev/null
+++ b/contrib/pdfmark/pdfmark.am
@@ -0,0 +1,87 @@
+# Copyright (C) 2005-2014
+# Free Software Foundation, Inc.
+#      Written by Keith Marshall (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/>.
+
+pdfmark_srcdir = $(top_srcdir)/contrib/pdfmark
+pdfmark_builddir = $(top_builddir)/contrib/pdfmark
+
+man1_MANS += contrib/pdfmark/pdfroff.n
+
+bin_SCRIPTS += pdfroff
+
+# Files installed in $(tmacdir)
+TMACFILES = \
+  contrib/pdfmark/pdfmark.tmac \
+  contrib/pdfmark/spdf.tmac
+pdfmarktmacdir = $(tmacdir)
+dist_pdfmarktmac_DATA = $(TMACFILES)
+
+# Files installed in $(pdfdocdir)
+PDFDOCFILES = \
+  contrib/pdfmark/pdfmark.pdf
+pdfmarkpdfdocdir = $(pdfdocdir)
+dist_pdfmarkpdfdoc_DATA = $(PDFDOCFILES)
+MOSTLYCLEANFILES += $(PDFDOCFILES)
+
+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.man \
+  contrib/pdfmark/pdfroff.sh
+
+PDFMARK_PFLAG =-dpaper=$(PAGE) -P-p$(PAGE)
+PDFMARK_TFLAG = -M$(pdfmark_srcdir)
+PDFROFF=\
+  GROFF_TMPDIR=. \
+  GROFF_COMMAND_PREFIX= \
+  GROFF_BIN_DIR="$(GROFF_BIN_DIR)" \
+  GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+  ./pdfroff --keep-temporary-files \
+  $(FFLAG) $(TFLAG) $(PDFMARK_TFLAG) $(PDFMARK_PFLAG)
+
+contrib/pdfmark/pdfmark.pdf: contrib/pdfmark/pdfmark.ms
+       @$(MKDIR_P) `dirname address@hidden
+       $(PDFROFF) -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) gnu.eps
+
+pdfroff: contrib/pdfmark/pdfroff.sh $(SH_DEPS_SED_SCRIPT)
+       sed -f $(SH_DEPS_SED_SCRIPT) \
+           -e "s|address@hidden@]|$(VERSION)|" \
+           -e "s|address@hidden@]|$(ALT_AWK_PROGS)|" \
+           -e "s|address@hidden@]|$(ALT_GHOSTSCRIPT_PROGS)|" \
+           -e "s|address@hidden@]|$(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 test -d $(DESTDIR)$(pdfmarkpdfdocdir); then \
+         rmdir $(DESTDIR)$(pdfmarkpdfdocdir); \
+       fi
diff --git a/doc/Makefile.sub b/doc/Makefile.sub
deleted file mode 100644
index b2325f9..0000000
--- a/doc/Makefile.sub
+++ /dev/null
@@ -1,296 +0,0 @@
-# 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'`
-
-groff_bin_dirs=\
-  $(top_builddir)/src/roff/groff \
-  $(top_builddir)/src/roff/troff \
-  $(top_builddir)/src/preproc/preconv \
-  $(top_builddir)/src/preproc/pic \
-  $(top_builddir)/src/preproc/eqn \
-  $(top_builddir)/src/preproc/tbl \
-  $(top_builddir)/src/preproc/grn \
-  $(top_builddir)/src/preproc/refer \
-  $(top_builddir)/src/preproc/soelim \
-  $(top_builddir)/src/preproc/html \
-  $(top_builddir)/src/devices/grops \
-  $(top_builddir)/src/devices/gropdf \
-  $(top_builddir)/src/devices/grohtml
-
-FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
-TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac
-
-GROFF=\
-  sed -e "s;@VERSION@;$(version)$(revision);" $< \
-  | GROFF_COMMAND_PREFIX= \
-    GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
-    $(GROFFBIN) $(TFLAG) $(FFLAG) -Upet -ww
-
-DOCFILES=\
-  meref.me \
-  meintro.me \
-  meintro_fr.me \
-  pic.ms
-
-PROCESSEDDOCFILES=\
-  meref.ps \
-  meintro.ps \
-  meintro_fr.ps \
-  pic.ps
-
-HTMLDOCFILES=\
-  pic.html
-
-HTMLDOCFILESALL=\
-  pic*.html
-
-HTMLDOCIMAGEFILES=\
-  pic*
-
-EXAMPLEFILES=\
-  webpage.ms \
-  groff.css \
-  grnexmpl.g \
-  grnexmpl.me
-
-PROCESSEDEXAMPLEFILES=\
-  webpage.ps \
-  grnexmpl.ps
-
-HTMLEXAMPLEFILES=\
-  webpage.html
-
-HTMLEXAMPLEFILESALL=\
-  webpage*.html
-
-HTMLEXAMPLEIMAGEFILES=\
-  webpage*
-
-imagedir=img
-htmldocimagedir=$(htmldocdir)/$(imagedir)
-exampleimagedir=$(exampledir)/$(imagedir)
-
-MOSTLYCLEANADD=\
-  $(PROCESSEDDOCFILES) \
-  $(PROCESSEDEXAMPLEFILES) \
-  $(HTMLEXAMPLEFILESALL) \
-  $(HTMLDOCFILESALL) \
-  groff.aux groff.cp* groff.dvi groff.es* groff.fn* groff.html groff.ky* \
-  groff.log groff.ma* groff.op* groff.pdf groff.pg* groff.ps groff.rq* \
-  groff.st* groff.toc groff.tp groff.vr* \
-  examples.stamp
-
-MOSTLYCLEANDIRADD=\
-  $(imagedir)
-
-MOSTLYCLEANNOTSRCDIRADD=\
-  groff.css \
-  grnexmpl.g \
-  groff.info \
-  groff-*.info \
-  gnu.eps
-
-RM=rm -f
-
-.SUFFIXES: .me .ms .ps .html
-
-# For simplicity, we always call preconv, grn, and eqn.
-.me.ps:
-       $(GROFF) -k -Tps -ge -me >$@
-
-.ms.html:
-       $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
-                -P-D$(imagedir) -P-V -Thtml -ms >$@
-.ms.ps:
-       $(GROFF) -Tps -ms -mwww >$@
-
-all: $(make_otherdoc) \
-     $(make_infodoc) \
-     $(make_htmldoc) \
-     $(make_examples) \
-     $(make_htmlexamples)
-
-otherdoc: $(PROCESSEDDOCFILES)
-infodoc: groff.info
-htmldoc: $(HTMLDOCFILES)
-
-examples: examples.stamp $(PROCESSEDEXAMPLEFILES)
-
-html_examples: $(HTMLEXAMPLEFILES)
-
-examples.stamp: grnexmpl.g groff.css gnu.eps
-       test -f grnexmpl.g || cp $(srcdir)/grnexmpl.g .
-       test -f groff.css || cp $(srcdir)/groff.css .
-       if test ! -f gnu.eps; then \
-         if test -f $(srcdir)/gnu.eps; then \
-           cp $(srcdir)/gnu.eps .; \
-         elif test -f $(top_builddir)/contrib/pdfmark/gnu.eps; then \
-           cp $(top_builddir)/contrib/pdfmark/gnu.eps .; \
-         fi; \
-       fi
-       echo timestamp > $@
-
-groff.info: groff.texinfo
-       $(MAKEINFO) --enable-encoding -I$(srcdir) $(srcdir)/groff.texinfo
-
-gnu.eps: gnu.xpm
-       xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 \
-         | $(pnmtops_nosetpage) -noturn -rle >$@
-
-pic.html: pic.ms
-       $(GROFF) -P-p -P-I`basename $< | sed -e 's|.ms$$||'` \
-                -P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \
-                -Thtml -P-V -ms >$@
-
-webpage.html: webpage.ms gnu.eps groff.css
-       $(GROFF) -P-j`basename $< | sed -e 's|.ms$$||'` \
-                -P-nrpb -P-I`basename $< | sed -e 's|.ms$$||'` \
-                -P-D$(imagedir) -Thtml -ms >$@
-
-webpage.ps: gnu.eps
-
-grnexmpl.ps: grnexmpl.me grnexmpl.g
-
-distfiles: groff.info gnu.eps
-
-install_data: install_always $(make_install_otherdoc) \
-             $(make_install_infodoc) $(make_install_htmldoc) \
-             $(make_install_examples)
-
-install_always:
-       -test -d $(DESTDIR)$(docdir) || $(mkinstalldirs) $(DESTDIR)$(docdir)
-
-install_otherdoc: install_always $(DOCFILES) $(PROCESSEDDOCFILES)
-       for f in $(DOCFILES); do \
-         $(RM) $(DESTDIR)$(docdir)/$$f; \
-         $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(docdir)/$$f; \
-       done
-       for f in $(PROCESSEDDOCFILES); do \
-         $(RM) $(DESTDIR)$(docdir)/$$f; \
-         $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \
-       done
-
-install_infodoc: install_always groff.info
-# Prefer info files in builddir over srcdir; we test for
-# the existence of `groff.info'.
-       -test -d $(DESTDIR)$(infodir) || $(mkinstalldirs) $(DESTDIR)$(infodir)
-       d=.; test -f "groff.info" || d=$(srcdir); \
-         for p in $$d/groff.info `ls $$d/groff.info*`; do \
-           f=`basename $$p`; \
-           $(RM) $(DESTDIR)$(infodir)/$$f; \
-           $(INSTALL_DATA) $$p $(DESTDIR)$(infodir)/$$f; \
-         done
-       $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) \
-         $(DESTDIR)$(infodir)/groff.info
-
-install_htmldoc: install_always $(HTMLDOCFILES)
-       -test -d $(DESTDIR)$(htmldocdir) \
-         || $(mkinstalldirs) $(DESTDIR)$(htmldocdir)
-       for f in `ls $(HTMLDOCFILESALL)`; do \
-         $(RM) $(DESTDIR)$(htmldocdir)/$$f; \
-         $(INSTALL_DATA) $$f $(DESTDIR)$(htmldocdir)/$$f; \
-       done
-       -test -d $(DESTDIR)$(htmldocimagedir) \
-         || $(mkinstalldirs) $(DESTDIR)$(htmldocimagedir)
-       $(RM) $(DESTDIR)$(htmldocimagedir)/$(HTMLDOCIMAGEFILES)
-       $(INSTALL_DATA) $(imagedir)/$(HTMLDOCIMAGEFILES) \
-         $(DESTDIR)$(htmldocimagedir)
-
-install_examples: install_always install_examples_always \
-                 $(make_install_htmlexamples)
-
-install_examples_always: gnu.eps $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES)
-# Prefer gnu.eps in builddir over srcdir.
-       -test -d $(DESTDIR)$(exampledir) \
-         || $(mkinstalldirs) $(DESTDIR)$(exampledir)
-       d=.; test -f "gnu.eps" || d=$(srcdir); \
-         $(RM) $(DESTDIR)$(exampledir)/gnu.eps; \
-         $(INSTALL_DATA) $$d/gnu.eps $(DESTDIR)$(exampledir)/gnu.eps
-       for f in $(EXAMPLEFILES); do \
-         $(RM) $(DESTDIR)$(exampledir)/$$f; \
-         $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(exampledir)/$$f; \
-       done
-       for f in $(PROCESSEDEXAMPLEFILES); do \
-         $(RM) $(DESTDIR)$(exampledir)/$$f; \
-         $(INSTALL_DATA) $$f $(DESTDIR)$(exampledir)/$$f; \
-       done
-
-install_htmlexamples: install_examples_always $(HTMLEXAMPLEFILES)
-       for f in `ls $(HTMLEXAMPLEFILESALL)`; do \
-         $(RM) $(DESTDIR)$(exampledir)/$$f; \
-         $(INSTALL_DATA) $$f $(DESTDIR)$(exampledir)/$$f; \
-       done
-       -test -d $(DESTDIR)$(exampleimagedir) \
-         || $(mkinstalldirs) $(DESTDIR)$(exampleimagedir)
-       $(RM) $(DESTDIR)$(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES)
-       $(INSTALL_DATA) $(imagedir)/$(HTMLEXAMPLEIMAGEFILES) \
-         $(DESTDIR)$(exampleimagedir)
-
-uninstall_sub: uninstall_always \
-               $(make_uninstall_infodoc) $(make_uninstall_htmldoc) \
-               $(make_uninstall_examples)
-
-uninstall_always:
-       -for f in $(DOCFILES) $(PROCESSEDDOCFILES); do \
-         $(RM) $(DESTDIR)$(docdir)/$$f; \
-       done
-
-uninstall_infodoc: uninstall_always
-       -$(INSTALL_INFO) --remove --info-dir=$(DESTDIR)$(infodir) \
-         $(DESTDIR)$(infodir)/groff.info
-       -for f in groff `ls groff.info*`; do \
-         $(RM) $(DESTDIR)$(infodir)/$$f; \
-       done
-
-uninstall_htmldoc: uninstall_always
-       -for f in `ls $(HTMLDOCFILESALL)`; do \
-         $(RM) $(DESTDIR)$(htmldocdir)/$$f; \
-       done
-       $(RM) $(DESTDIR)$(htmldocimagedir)/$(HTMLDOCIMAGEFILES)
-       -test -d $(DESTDIR)$(htmldocimagedir) && \
-         rmdir $(DESTDIR)$(htmldocimagedir)
-
-uninstall_examples: uninstall_always uninstall_examples_always \
-                   $(make_uninstall_htmlexamples)
-       -test -d $(DESTDIR)$(exampledir) && \
-         rmdir $(DESTDIR)$(exampledir)
-
-uninstall_examples_always:
-       -for f in $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES); do \
-         $(RM) $(DESTDIR)$(exampledir)/$$f; \
-       done
-       $(RM) $(DESTDIR)$(exampledir)/gnu.eps
-
-uninstall_htmlexamples: uninstall_examples_always
-       -for f in `ls $(HTMLEXAMPLEFILESALL)`; do \
-         $(RM) $(DESTDIR)$(exampledir)/$$f; \
-       done
-       $(RM) $(DESTDIR)$(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES)
-       -test -d $(DESTDIR)$(exampleimagedir) && \
-         rmdir $(DESTDIR)$(exampleimagedir)
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/doc/doc.am b/doc/doc.am
new file mode 100644
index 0000000..e0be7b8
--- /dev/null
+++ b/doc/doc.am
@@ -0,0 +1,54 @@
+# Copyright (C) 2002-2014  Free Software Foundation, Inc.
+#      Original Makefile.sub written by Werner Lemberg <address@hidden>
+#      Automake migration by 
+#      Bertrand Garrigues <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/>.
+
+
+# File used by contrib/hdtbl and contrib/pdfmark. It is distributed in
+# doc.eps. We try in priority to use the file in 'doc'.
+EXTRA_DIST += doc/gnu.xpm
+MOSTLYCLEANFILES += gnu.eps
+gnu.eps:
+       echo $(XPMTOPPM)
+       if test -f $(top_srcdir)/doc/gnu.eps; then \
+         cp $(top_srcdir)/doc/gnu.eps . ; \
+       elif test -f $(top_builddir)/doc/gnu.eps; then \
+         cp $(top_builddir)/doc/gnu.eps . ; \
+       else \
+         if test ""$(XPMTOPPM) != "found"; then \
+           echo "Program xpmtoppm is missing, can't generate gnu.eps" ; \
+           exit 1; \
+         fi; \
+         if test ""$(pnmtops) != "found"; then \
+           echo "Program pnmtops is missing, can't generate gnu.eps" ; \
+           exit 1; \
+         fi; \
+         if test "$(pnmtops_nosetpage)" != "pnmtops -nosetpage"; then \
+           echo "Program pnmtops can't handle -nosetpage, can't generate 
gnu.eps" ; \
+           exit 1; \
+         fi; \
+         xpmtoppm $(top_srcdir)/doc/gnu.xpm | pnmdepth 15 \
+           | $(pnmtops_nosetpage) -noturn -rle >$@ ; \
+       fi
+
+# Copy gnu.eps in 'doc' directory
+dist-hook: dist-gnueps
+dist-gnueps:
+       chmod u+w $(distdir)/doc
+       cp -f gnu.eps $(distdir)/doc
+
diff --git a/m4/groff.m4 b/m4/groff.m4
index 2f49da1..4b34b7e 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -1347,3 +1347,7 @@ AC_DEFUN([GROFF_GROGDIR_DEFAULT],
 AC_DEFUN([GROFF_REFERDIR_DEFAULT],
   referdir=$libprogramdir/refer
   AC_SUBST([referdir]))
+
+# Check for xpmtoppm, for gnu.eps generation
+AC_DEFUN([GROFF_PROG_XPMTOPPM],
+  [AC_CHECK_PROG([XPMTOPPM], [xpmtoppm], [found], [missing])])



reply via email to

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