groff-commit
[Top][All Lists]
Advanced

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

[groff] 10/33: Build src/devices


From: Bertrand Garrigues
Subject: [groff] 10/33: Build src/devices
Date: Sun, 07 Sep 2014 23:02:06 +0000

bgarrigues pushed a commit to branch automake2
in repository groff.

commit 27210f339510ad6d9a43247a82177b09958d5a0b
Author: Bertrand Garrigues <address@hidden>
Date:   Fri Aug 22 00:50:32 2014 +0200

    Build src/devices
---
 Makefile.am                       |    8 +++++
 TESTS                             |   29 ++++++++++++++++++
 src/devices/grodvi/Makefile.sub   |    6 ----
 src/devices/grodvi/grodvi.am      |   10 ++++++
 src/devices/grohtml/Makefile.sub  |   18 -----------
 src/devices/grohtml/grohtml.am    |   15 +++++++++
 src/devices/grolbp/Makefile.sub   |    6 ----
 src/devices/grolbp/grolbp.am      |   11 +++++++
 src/devices/grolj4/Makefile.sub   |    7 ----
 src/devices/grolj4/grolj4.am      |   10 ++++++
 src/devices/gropdf/Makefile.sub   |   60 -------------------------------------
 src/devices/gropdf/gropdf.am      |   43 ++++++++++++++++++++++++++
 src/devices/grops/Makefile.sub    |   12 -------
 src/devices/grops/grops.am        |   11 +++++++
 src/devices/grotty/Makefile.sub   |    6 ----
 src/devices/grotty/grotty.am      |    8 +++++
 src/devices/xditview/Makefile.sub |   56 ----------------------------------
 src/devices/xditview/xditview.am  |   50 ++++++++++++++++++++++++++++++
 18 files changed, 195 insertions(+), 171 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index eb19bc7..61df767 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -526,6 +526,14 @@ include $(top_srcdir)/src/libs/libbib/libbib.am
 include $(top_srcdir)/src/libs/libdriver/libdriver.am
 include $(top_srcdir)/src/libs/libgroff/libgroff.am
 include $(top_srcdir)/src/libs/libxutil/libxutil.am
+include $(top_srcdir)/src/devices/grodvi/grodvi.am
+include $(top_srcdir)/src/devices/grohtml/grohtml.am
+include $(top_srcdir)/src/devices/grolbp/grolbp.am
+include $(top_srcdir)/src/devices/grolj4/grolj4.am
+include $(top_srcdir)/src/devices/gropdf/gropdf.am
+include $(top_srcdir)/src/devices/grops/grops.am
+include $(top_srcdir)/src/devices/grotty/grotty.am
+include $(top_srcdir)/src/devices/xditview/xditview.am
 include $(top_srcdir)/src/preproc/eqn/eqn.am
 include $(top_srcdir)/src/preproc/grn/grn.am
 include $(top_srcdir)/src/preproc/html/html.am
diff --git a/TESTS b/TESTS
index 9f5d6e8..a23884e 100644
--- a/TESTS
+++ b/TESTS
@@ -98,6 +98,18 @@ from src/preproc:
 #ifndef YY_YY_SRC_PREPROC_REFER_LABEL_HPP_INCLUDED
 # define YY_YY_SRC_PREPROC_REFER_LABEL_HPP_INCLUDED
 
+from src/devices:
+  - grodvi
+  - pre-grohtml
+  - post-grohtml
+  - grolbp
+  - grolj4
+  - gropdf
+  - pdfmom
+  - grops
+  - grotty
+  - gxditview
+
 In order to check and improve the dependencies, the following targets
 were built from a clean environment:
   - make lib/libgnu.a
@@ -122,9 +134,20 @@ were built from a clean environment:
   - make refer
   - make soelim
   - make tbl
+  - make grodvi
+  - make post-grohtml
+  - make grolbp
+  - make grolj4
+  - make gropdf
+  - make pdfmom
+  - make grops
+  - make grotty
+  - make gxditview
 
 2.2 make clean
 
+TODO: src/devices
+
 The following files remain (this is expected):
   - Makefile
   - config.status
@@ -139,6 +162,8 @@ The following files remain (this is expected):
 
 2.3 make mostlyclean
 
+TODO: src/devices
+
   Like 'make clean', but the following files also remain (expected):
   - lib*.a
   - libgroff.a's charset.alias, ref-add.sed, ref-del.sed, and
@@ -181,6 +206,8 @@ Differences with former build system:
 
 2.6 make install
 
+TODO: src/devices specific rules
+
   mkdir -p ~/tmp/automake
   make install DESTDIR=~/tmp/automake
 
@@ -192,6 +219,8 @@ Differences with former build system:
   - $(DESTDIR)/usr/local/share/groff/1.22/eign (from src/utils/indxbib)
 
 2.7 make uninstall
+
+TODO: src/devices specific rules
   
   Removes:
 
diff --git a/src/devices/grodvi/Makefile.sub b/src/devices/grodvi/Makefile.sub
deleted file mode 100644
index a939dbf..0000000
--- a/src/devices/grodvi/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=grodvi$(EXEEXT)
-MAN1=grodvi.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU)
-MLIB=$(LIBM)
-OBJS=dvi.$(OBJEXT)
-CCSRCS=$(srcdir)/dvi.cpp
diff --git a/src/devices/grodvi/grodvi.am b/src/devices/grodvi/grodvi.am
new file mode 100644
index 0000000..e10f3f9
--- /dev/null
+++ b/src/devices/grodvi/grodvi.am
@@ -0,0 +1,10 @@
+bin_PROGRAMS += grodvi
+grodvi_SOURCES = src/devices/grodvi/dvi.cpp
+grodvi_LDADD = \
+  libdriver.a \
+  libgroff.a \
+  lib/libgnu.a $(LIBM)
+man1_MANS += src/devices/grodvi/grodvi.n
+
+
+
diff --git a/src/devices/grohtml/Makefile.sub b/src/devices/grohtml/Makefile.sub
deleted file mode 100644
index 48203b4..0000000
--- a/src/devices/grohtml/Makefile.sub
+++ /dev/null
@@ -1,18 +0,0 @@
-PROG=post-grohtml$(EXEEXT)
-MAN1=grohtml.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU)
-MLIB=$(LIBM)
-OBJS=\
-  post-html.$(OBJEXT) \
-  html-table.$(OBJEXT) \
-  html-text.$(OBJEXT) \
-  output.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/post-html.cpp \
-  $(srcdir)/html-table.cpp \
-  $(srcdir)/html-text.cpp \
-  $(srcdir)/output.cpp
-HDRS=\
-  $(srcdir)/html.h \
-  $(srcdir)/html-table.h \
-  $(srcdir)/html-text.h
diff --git a/src/devices/grohtml/grohtml.am b/src/devices/grohtml/grohtml.am
new file mode 100644
index 0000000..e965286
--- /dev/null
+++ b/src/devices/grohtml/grohtml.am
@@ -0,0 +1,15 @@
+bin_PROGRAMS += post-grohtml
+post_grohtml_SOURCES = \
+  src/devices/grohtml/post-html.cpp \
+  src/devices/grohtml/html-table.cpp \
+  src/devices/grohtml/html-text.cpp \
+  src/devices/grohtml/output.cpp \
+  src/devices/grohtml/html.h \
+  src/devices/grohtml/html-text.h \
+  src/devices/grohtml/html-table.h
+
+post_grohtml_LDADD = $(LIBM) \
+  libdriver.a \
+  libgroff.a \
+  lib/libgnu.a 
+man1_MANS += src/devices/grohtml/grohtml.n
diff --git a/src/devices/grolbp/Makefile.sub b/src/devices/grolbp/Makefile.sub
deleted file mode 100644
index c9aef24..0000000
--- a/src/devices/grolbp/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=grolbp$(EXEEXT)
-MAN1=grolbp.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU)
-MLIB=$(LIBM)
-OBJS=lbp.$(OBJEXT)
-CCSRCS=$(srcdir)/lbp.cpp
diff --git a/src/devices/grolbp/grolbp.am b/src/devices/grolbp/grolbp.am
new file mode 100644
index 0000000..1ac1169
--- /dev/null
+++ b/src/devices/grolbp/grolbp.am
@@ -0,0 +1,11 @@
+bin_PROGRAMS += grolbp
+grolbp_SOURCES = \
+  src/devices/grolbp/lbp.cpp \
+  src/devices/grolbp/lbp.h \
+  src/devices/grolbp/charset.h
+
+grolbp_LDADD = $(LIBM) \
+  libdriver.a \
+  libgroff.a \
+  lib/libgnu.a
+man1_MANS += src/devices/grolbp/grolbp.n
diff --git a/src/devices/grolj4/Makefile.sub b/src/devices/grolj4/Makefile.sub
deleted file mode 100644
index 9d1d2bb..0000000
--- a/src/devices/grolj4/Makefile.sub
+++ /dev/null
@@ -1,7 +0,0 @@
-PROG=grolj4$(EXEEXT)
-MAN1=grolj4.n
-MAN5=lj4_font.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU)
-MLIB=$(LIBM)
-OBJS=lj4.$(OBJEXT)
-CCSRCS=$(srcdir)/lj4.cpp
diff --git a/src/devices/grolj4/grolj4.am b/src/devices/grolj4/grolj4.am
new file mode 100644
index 0000000..0dc8728
--- /dev/null
+++ b/src/devices/grolj4/grolj4.am
@@ -0,0 +1,10 @@
+bin_PROGRAMS += grolj4
+grolj4_SOURCES = src/devices/grolj4/lj4.cpp
+grolj4_LDADD = $(LIBM) \
+  libdriver.a \
+  libgroff.a \
+  lib/libgnu.a
+man1_MANS += src/devices/grolj4/grolj4.n
+man5_MANS += src/devices/grolj4/lj4_font.n
+
+
diff --git a/src/devices/gropdf/Makefile.sub b/src/devices/gropdf/Makefile.sub
deleted file mode 100644
index c587dc5..0000000
--- a/src/devices/gropdf/Makefile.sub
+++ /dev/null
@@ -1,60 +0,0 @@
-# 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/>.
-
-MAN1=\
-  gropdf.n \
-  pdfmom.n
-
-CMDFILES=\
-  gropdf \
-  pdfmom
-
-MOSTLYCLEANADD=\
-  gropdf \
-  pdfmom \
-  $(MAN1)
-
-all: gropdf pdfmom
-
-
-gropdf: gropdf.pl $(SH_DEPS_SED_SCRIPT)
-       rm -f $@
-       sed -f $(SH_DEPS_SED_SCRIPT) \
-           -e "s|@VERSION@|$(version)$(revision)|" \
-           -e "s|@PERL@|$(PERL)|" \
-           -e "s|@GROFF_FONT_DIR@|$(fontpath)|" \
-           -e "s|@RT_SEP@|$(RT_SEP)|" $(srcdir)/gropdf.pl >$@
-       chmod +x $@
-
-pdfmom: pdfmom.pl $(SH_DEPS_SED_SCRIPT)
-       rm -f $@
-       sed -f $(SH_DEPS_SED_SCRIPT) \
-           -e "s|@VERSION@|$(version)$(revision)|" \
-           -e "s|@PERL@|$(PERL)|" $(srcdir)/pdfmom.pl >$@
-       chmod +x $@
-
-install_data:
-       -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
-       for f in $(CMDFILES); do \
-         rm -f $(DESTDIR)$(bindir)/$$f; \
-         $(INSTALL_SCRIPT) $$f $(DESTDIR)$(bindir)/$$f; \
-       done
-
-uninstall_sub:
-       -for f in $(CMDFILES); do rm -f $(DESTDIR)$(bindir)/$$f; done
diff --git a/src/devices/gropdf/gropdf.am b/src/devices/gropdf/gropdf.am
new file mode 100644
index 0000000..a70a63a
--- /dev/null
+++ b/src/devices/gropdf/gropdf.am
@@ -0,0 +1,43 @@
+# Copyright (C) 2011-2014
+#      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/>.
+
+gropdf_dir = $(top_srcdir)/src/devices/gropdf
+
+bin_SCRIPTS += gropdf pdfmom
+
+man1_MANS += \
+  src/devices/gropdf/gropdf.n \
+  src/devices/gropdf/pdfmom.n
+
+gropdf: $(gropdf_dir)/gropdf.pl $(SH_DEPS_SED_SCRIPT)
+       rm -f $@
+       sed -f $(SH_DEPS_SED_SCRIPT) \
+           -e "s|address@hidden@]|$(VERSION)|" \
+           -e "s|address@hidden@]|$(PERL)|" \
+           -e "s|address@hidden@]|$(fontpath)|" \
+           -e "s|address@hidden@]|$(RT_SEP)|" $(gropdf_dir)/gropdf.pl >$@
+       chmod +x $@
+
+pdfmom: $(gropdf_dir)/pdfmom.pl $(SH_DEPS_SED_SCRIPT)
+       rm -f $@
+       sed -f $(SH_DEPS_SED_SCRIPT) \
+           -e "s|address@hidden@]|$(VERSION)|" \
+           -e "s|address@hidden@]|$(PERL)|" $(gropdf_dir)/pdfmom.pl >$@
+       chmod +x $@
diff --git a/src/devices/grops/Makefile.sub b/src/devices/grops/Makefile.sub
deleted file mode 100644
index 95ebd27..0000000
--- a/src/devices/grops/Makefile.sub
+++ /dev/null
@@ -1,12 +0,0 @@
-PROG=grops$(EXEEXT)
-MAN1=grops.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU)
-MLIB=$(LIBM)
-OBJS=\
-  ps.$(OBJEXT) \
-  psrm.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/ps.cpp \
-  $(srcdir)/psrm.cpp
-HDRS=\
-  $(srcdir)/ps.h
diff --git a/src/devices/grops/grops.am b/src/devices/grops/grops.am
new file mode 100644
index 0000000..c0ac21b
--- /dev/null
+++ b/src/devices/grops/grops.am
@@ -0,0 +1,11 @@
+bin_PROGRAMS += grops
+grops_SOURCES = \
+  src/devices/grops/ps.cpp \
+  src/devices/grops/psrm.cpp \
+  src/devices/grops/ps.h
+grops_LDADD = $(LIBM) \
+  libdriver.a \
+  libgroff.a \
+  lib/libgnu.a
+man1_MANS += src/devices/grops/grops.n
+
diff --git a/src/devices/grotty/Makefile.sub b/src/devices/grotty/Makefile.sub
deleted file mode 100644
index 0b5c6b2..0000000
--- a/src/devices/grotty/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=grotty$(EXEEXT)
-MAN1=grotty.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU)
-MLIB=$(LIBM)
-OBJS=tty.$(OBJEXT)
-CCSRCS=$(srcdir)/tty.cpp
diff --git a/src/devices/grotty/grotty.am b/src/devices/grotty/grotty.am
new file mode 100644
index 0000000..a514495
--- /dev/null
+++ b/src/devices/grotty/grotty.am
@@ -0,0 +1,8 @@
+bin_PROGRAMS += grotty
+grotty_SOURCES = src/devices/grotty/tty.cpp
+grotty_LDADD = $(LIBM) \
+  libdriver.a \
+  libgroff.a \
+  lib/libgnu.a
+man1_MANS += src/devices/grotty/grotty.n
+
diff --git a/src/devices/xditview/Makefile.sub 
b/src/devices/xditview/Makefile.sub
deleted file mode 100644
index edcdf4d..0000000
--- a/src/devices/xditview/Makefile.sub
+++ /dev/null
@@ -1,56 +0,0 @@
-PROG=gxditview$(EXEEXT)
-MAN1=gxditview.n
-MLIB=$(LIBM)
-XLIBS=$(LIBXUTIL)
-EXTRA_CFLAGS=$(X_CFLAGS) -Dlint
-EXTRA_LDFLAGS=$(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu -lXt -lX11 $(X_EXTRA_LIBS)
-OBJS=\
-  device.$(OBJEXT) \
-  draw.$(OBJEXT) \
-  Dvi.$(OBJEXT) \
-  font.$(OBJEXT) \
-  lex.$(OBJEXT) \
-  page.$(OBJEXT) \
-  parse.$(OBJEXT) \
-  xditview.$(OBJEXT)
-CSRCS=\
-  $(srcdir)/device.c \
-  $(srcdir)/draw.c \
-  $(srcdir)/Dvi.c \
-  $(srcdir)/font.c \
-  $(srcdir)/lex.c \
-  $(srcdir)/page.c \
-  $(srcdir)/parse.c \
-  $(srcdir)/xditview.c
-HDRS=\
-  $(srcdir)/device.h \
-  $(srcdir)/Dvi.h \
-  $(srcdir)/DviP.h \
-  $(srcdir)/Menu.h
-GENHDRS=GXditview-ad.h
-
-all depend: $(GENHDRS)
-
-GXditview-ad.h: $(srcdir)/GXditview.ad
-       @echo Making $@
-       $(SHELL) $(srcdir)/ad2c $(srcdir)/GXditview.ad > $@
-
-install_data: $(srcdir)/GXditview.ad $(srcdir)/GXditview-color.ad
-       -test -d $(DESTDIR)$(appresdir) \
-         || $(mkinstalldirs) $(DESTDIR)$(appresdir)
-       if test -f $(DESTDIR)$(appresdir)/GXditview; then \
-         mv $(DESTDIR)$(appresdir)/GXditview \
-           $(DESTDIR)$(appresdir)/GXditview.old; \
-       fi
-       if test -f $(DESTDIR)$(appresdir)/GXditview-color; then \
-         mv $(DESTDIR)$(appresdir)/GXditview-color \
-           $(DESTDIR)$(appresdir)/GXditview-color.old; \
-       fi
-       $(INSTALL_DATA) $(srcdir)/GXditview.ad \
-         $(DESTDIR)$(appresdir)/GXditview
-       $(INSTALL_DATA) $(srcdir)/GXditview-color.ad \
-         $(DESTDIR)$(appresdir)/GXditview-color
-
-uninstall_sub:
-       rm -f $(DESTDIR)$(appresdir)/GXditview
-       rm -f $(DESTDIR)$(appresdir)/GXditview-color
diff --git a/src/devices/xditview/xditview.am b/src/devices/xditview/xditview.am
new file mode 100644
index 0000000..1ffb099
--- /dev/null
+++ b/src/devices/xditview/xditview.am
@@ -0,0 +1,50 @@
+# 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/>.
+
+GXDITVIEWSOURCES = \
+  src/devices/xditview/device.c \
+  src/devices/xditview/draw.c \
+  src/devices/xditview/Dvi.c \
+  src/devices/xditview/font.c \
+  src/devices/xditview/lex.c \
+  src/devices/xditview/page.c \
+  src/devices/xditview/parse.c \
+  src/devices/xditview/xditview.c \
+  src/devices/xditview/device.h \
+  src/devices/xditview/DviP.h \
+  src/devices/xditview/Menu.h \
+  src/devices/xditview/Dvi.h
+
+xditview_srcdir = $(top_srcdir)/src/devices/xditview
+bin_PROGRAMS += gxditview
+gxditview_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) -Dlint \
+  -I$(top_builddir)/src/devices/xditview
+gxditview_LDADD = $(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu -lXt -lX11 \
+  $(X_EXTRA_LIBS) $(LIBM) libxutil.a
+XDITVIEW_GENHDRS = src/devices/xditview/GXditview-ad.h
+gxditview_SOURCES = $(GXDITVIEWSOURCES) $(XDITVIEW_GENHDRS)
+man1_MANS += src/devices/xditview/gxditview.n
+
+# Because we defined gxditview_CPPFLAGS, automake renames all the xditview's 
+# objects, adding an "gxditview-" prefix. 
+src/devices/xditview/gxditview-device.$(OBJEXT): defs.h
+src/devices/xditview/gxditview-xditview.$(OBJEXT): $(XDITVIEW_GENHDRS)
+
+src/devices/xditview/GXditview-ad.h: $(xditview_srcdir)/GXditview.ad
+       @echo Making $@
+       $(SHELL) $(xditview_srcdir)/ad2c $(xditview_srcdir)/GXditview.ad > $@



reply via email to

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