groff-commit
[Top][All Lists]
Advanced

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

[groff] 08/33: Build src/preproc - Use AM_YFLAGS to pass option to yacc/


From: Bertrand Garrigues
Subject: [groff] 08/33: Build src/preproc - Use AM_YFLAGS to pass option to yacc/flex - Also build arch/misc/shdeps.sed
Date: Sun, 07 Sep 2014 23:02:05 +0000

bgarrigues pushed a commit to branch automake2
in repository groff.

commit 7f2ee891491abe75057c970eff95e337c63b3948
Author: Bertrand Garrigues <address@hidden>
Date:   Thu Aug 21 23:07:00 2014 +0200

    Build src/preproc
      - Use AM_YFLAGS to pass option to yacc/flex
      - Also build arch/misc/shdeps.sed
---
 Makefile.am                              |   12 ++++++
 TESTS                                    |   40 ++++++++++++++++++++
 arch/misc/{Makefile.sub => misc.am}      |   10 ++---
 src/preproc/eqn/.gitignore               |    7 ---
 src/preproc/eqn/Makefile.sub             |   60 ------------------------------
 src/preproc/eqn/eqn.am                   |   55 +++++++++++++++++++++++++++
 src/preproc/eqn/{eqn.y => eqn.ypp}       |    0
 src/preproc/eqn/lex.cpp                  |    2 +-
 src/preproc/grn/Makefile.sub             |   17 --------
 src/preproc/grn/grn.am                   |   11 +++++
 src/preproc/html/Makefile.sub            |    7 ---
 src/preproc/html/html.am                 |    8 ++++
 src/preproc/pic/.gitignore               |    5 --
 src/preproc/pic/Makefile.sub             |   31 ---------------
 src/preproc/pic/lex.cpp                  |    2 +-
 src/preproc/pic/pic.am                   |   41 ++++++++++++++++++++
 src/preproc/pic/{pic.y => pic.ypp}       |    0
 src/preproc/preconv/Makefile.sub         |    7 ---
 src/preproc/preconv/preconv.am           |    5 ++
 src/preproc/refer/Makefile.sub           |   23 -----------
 src/preproc/refer/{label.y => label.ypp} |    0
 src/preproc/refer/refer.am               |   39 +++++++++++++++++++
 src/preproc/soelim/Makefile.sub          |    7 ---
 src/preproc/soelim/soelim.am             |    4 ++
 src/preproc/tbl/Makefile.sub             |   13 ------
 src/preproc/tbl/tbl.am                   |    8 ++++
 26 files changed, 229 insertions(+), 185 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index bbf48a9..08ae3ae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -510,6 +510,9 @@ man1_MANS =
 man5_MANS =
 man7_MANS =
 
+# for lex/yacc
+AM_YFLAGS = -d -v
+
 # Non-recursive makefile system. See Automake manual '7.3 An
 # Alternative Approach to Subdirectories'. We use a single Makefile.am
 # that includes other .am files, rather than using SUBDIRS.  Note that
@@ -517,11 +520,20 @@ man7_MANS =
 # source directory.
 
 include $(top_srcdir)/lib/gnulib.mk
+include $(top_srcdir)/arch/misc/misc.am
 include $(top_srcdir)/src/include/include.am
 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/preproc/eqn/eqn.am
+include $(top_srcdir)/src/preproc/grn/grn.am
+include $(top_srcdir)/src/preproc/html/html.am
+include $(top_srcdir)/src/preproc/pic/pic.am
+include $(top_srcdir)/src/preproc/preconv/preconv.am
+include $(top_srcdir)/src/preproc/refer/refer.am
+include $(top_srcdir)/src/preproc/soelim/soelim.am
+include $(top_srcdir)/src/preproc/tbl/tbl.am
 include $(top_srcdir)/src/utils/addftinfo/addftinfo.am
 include $(top_srcdir)/src/utils/afmtodit/afmtodit.am
 include $(top_srcdir)/src/utils/hpftodit/hpftodit.am
diff --git a/TESTS b/TESTS
index b29f6b7..f9c2577 100644
--- a/TESTS
+++ b/TESTS
@@ -14,6 +14,7 @@ Current status
   - Minimum Automake support
   - Build src/libs/*
   - Build src/utils/*
+  - Build src/preproc/*
 
 Tests
 -----
@@ -52,11 +53,18 @@ Following files are generated:
 
   - src/include/config.h
   - lib/libgnu.a
+
+from arch/misc:
+  - shdeps.sed
+
+from src/libs:
   - libbib.a
   - libdriver.a
   - libgroff.a, version.cpp and extra files (charset.alias,
     ref-add.sed, ref-del.sed)
   - libxutils.a
+
+from src/utils:
   - addftinfo
   - afmtodit
   - hpftodit
@@ -68,6 +76,28 @@ Following files are generated:
   - xtotroff
   - man files (.n) in src/utils
 
+from src/preproc:
+  - eqn
+  - grn
+  - pre-grohtml
+  - pic
+  - preconv
+  - refer
+  - soelim
+  - tbl
+  - Yacc and Lex support: the following files are generated:
+    -- eqn/eqn.cpp
+    -- eqn/eqn.hpp (previously eqn_tab.h)
+    -- pic/pic.cpp
+    -- pic/pic.hpp (previously pic_tab.h)
+    -- pic/pic.output
+    -- refer/label.cpp
+    -- refer/label.hpp
+    Compared to the previous build system, the only relevant diff is
+    an extra protection #define in label.cpp
+#ifndef YY_YY_SRC_PREPROC_REFER_LABEL_HPP_INCLUDED
+# define YY_YY_SRC_PREPROC_REFER_LABEL_HPP_INCLUDED
+
 In order to check and improve the dependencies, the following targets
 were built from a clean environment:
   - make lib/libgnu.a
@@ -84,9 +114,19 @@ were built from a clean environment:
   - make pfbtops
   - make tfmtodit
   - make xtotroff
+  - make eqn
+  - make grn
+  - make pre-grohtml
+  - make pic
+  - make preconv
+  - make refer
+  - make soelim
+  - make tbl
 
 2.2 make clean
 
+  TODO: src/preproc
+
 The following files remains (this is expected):
   - Makefile
   - config.status
diff --git a/arch/misc/Makefile.sub b/arch/misc/misc.am
similarity index 81%
rename from arch/misc/Makefile.sub
rename to arch/misc/misc.am
index f5d6b51..792bb2b 100644
--- a/arch/misc/Makefile.sub
+++ b/arch/misc/misc.am
@@ -3,6 +3,8 @@
 #
 # This file is part of groff.
 #
+# 1 June 2014: moved Makefile.sub to misc.am
+#
 # 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
@@ -16,9 +18,5 @@
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
-MOSTLYCLEANADD=shdeps.sed
-
-all: shdeps.sed
-
-shdeps.sed: $(srcdir)/shdeps.sh
-       $(SHELL) $(srcdir)/shdeps.sh "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > $@
+shdeps.sed: $(top_srcdir)/arch/misc/shdeps.sh
+       $(SHELL) $(top_srcdir)/arch/misc/shdeps.sh "$(RT_SEP)" "$(SH_SEP)" 
"$(bindir)" > $@
diff --git a/src/preproc/eqn/.gitignore b/src/preproc/eqn/.gitignore
index 67870f5..9fe3ee9 100644
--- a/src/preproc/eqn/.gitignore
+++ b/src/preproc/eqn/.gitignore
@@ -1,8 +1 @@
-Makefile.dep
-eqn
-eqn.n
-neqn
-neqn.n
 eqn.cpp
-eqn_tab.h
-y.output
diff --git a/src/preproc/eqn/Makefile.sub b/src/preproc/eqn/Makefile.sub
deleted file mode 100644
index 87b97db..0000000
--- a/src/preproc/eqn/Makefile.sub
+++ /dev/null
@@ -1,60 +0,0 @@
-PROG=eqn$(EXEEXT)
-MAN1=eqn.n neqn.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
-  eqn.$(OBJEXT) \
-  main.$(OBJEXT) \
-  lex.$(OBJEXT) \
-  box.$(OBJEXT) \
-  limit.$(OBJEXT) \
-  list.$(OBJEXT) \
-  over.$(OBJEXT) \
-  text.$(OBJEXT) \
-  script.$(OBJEXT) \
-  mark.$(OBJEXT) \
-  other.$(OBJEXT) \
-  delim.$(OBJEXT) \
-  sqrt.$(OBJEXT) \
-  pile.$(OBJEXT) \
-  special.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/main.cpp \
-  $(srcdir)/lex.cpp \
-  $(srcdir)/box.cpp \
-  $(srcdir)/limit.cpp \
-  $(srcdir)/list.cpp \
-  $(srcdir)/over.cpp \
-  $(srcdir)/text.cpp \
-  $(srcdir)/script.cpp \
-  $(srcdir)/mark.cpp \
-  $(srcdir)/other.cpp \
-  $(srcdir)/delim.cpp \
-  $(srcdir)/sqrt.cpp \
-  $(srcdir)/pile.cpp \
-  $(srcdir)/special.cpp
-HDRS=\
-  $(srcdir)/box.h \
-  $(srcdir)/eqn.h \
-  $(srcdir)/pbox.h
-GRAM=$(srcdir)/eqn.y
-YTABC=eqn.cpp
-YTABH=eqn_tab.h
-NAMEPREFIX=$(g)
-MOSTLYCLEANADD=neqn
-
-all: neqn
-
-neqn: neqn.sh $(SH_DEPS_SED_SCRIPT)
-       rm -f $@
-       sed -e 's/@g@/$(g)/g' \
-           -f $(SH_DEPS_SED_SCRIPT) \
-           -e $(SH_SCRIPT_SED_CMD) $(srcdir)/neqn.sh >$@
-       chmod +x $@
-
-install_data: neqn
-       rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn
-       $(INSTALL_SCRIPT) neqn $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn
-
-uninstall_sub:
-       rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn
diff --git a/src/preproc/eqn/eqn.am b/src/preproc/eqn/eqn.am
new file mode 100644
index 0000000..a91bf11
--- /dev/null
+++ b/src/preproc/eqn/eqn.am
@@ -0,0 +1,55 @@
+# 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/>.
+
+bin_PROGRAMS += eqn
+bin_SCRIPTS += neqn
+eqn_CPPFLAGS = \
+  $(AM_CPPFLAGS) \
+  -I $(top_srcdir)/src/preproc/eqn \
+  -I $(top_builddir)/src/preproc/eqn
+eqn_LDADD = $(LIBM) libgroff.a
+eqn_SOURCES = \
+  src/preproc/eqn/main.cpp \
+  src/preproc/eqn/lex.cpp \
+  src/preproc/eqn/box.cpp \
+  src/preproc/eqn/limit.cpp \
+  src/preproc/eqn/list.cpp \
+  src/preproc/eqn/over.cpp \
+  src/preproc/eqn/text.cpp \
+  src/preproc/eqn/script.cpp \
+  src/preproc/eqn/mark.cpp \
+  src/preproc/eqn/other.cpp \
+  src/preproc/eqn/delim.cpp \
+  src/preproc/eqn/sqrt.cpp \
+  src/preproc/eqn/pile.cpp \
+  src/preproc/eqn/special.cpp \
+  src/preproc/eqn/eqn.ypp \
+  src/preproc/eqn/box.h \
+  src/preproc/eqn/pbox.h \
+  src/preproc/eqn/eqn.h
+
+man1_MANS += src/preproc/eqn/eqn.n src/preproc/eqn/neqn.n
+
+src/preproc/eqn/eqn-lex.$(OBJEXT): src/preproc/eqn/eqn.hpp
+
+neqn: $(top_srcdir)/src/preproc/eqn/neqn.sh $(SH_DEPS_SED_SCRIPT)
+       rm -f $@
+       sed -e 's/address@hidden@]/$(g)/g' \
+           -f $(SH_DEPS_SED_SCRIPT) \
+           -e $(SH_SCRIPT_SED_CMD) $(top_srcdir)/src/preproc/eqn/neqn.sh >$@
+       chmod +x $@
diff --git a/src/preproc/eqn/eqn.y b/src/preproc/eqn/eqn.ypp
similarity index 100%
rename from src/preproc/eqn/eqn.y
rename to src/preproc/eqn/eqn.ypp
diff --git a/src/preproc/eqn/lex.cpp b/src/preproc/eqn/lex.cpp
index 899ecae..700fa4a 100644
--- a/src/preproc/eqn/lex.cpp
+++ b/src/preproc/eqn/lex.cpp
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public 
License
 along with this program. If not, see <http://www.gnu.org/licenses/>. */
 
 #include "eqn.h"
-#include "eqn_tab.h"
+#include "eqn.hpp"
 #include "stringclass.h"
 #include "ptable.h"
 
diff --git a/src/preproc/grn/Makefile.sub b/src/preproc/grn/Makefile.sub
deleted file mode 100644
index 0fa0bec..0000000
--- a/src/preproc/grn/Makefile.sub
+++ /dev/null
@@ -1,17 +0,0 @@
-PROG=grn$(EXEEXT)
-MAN1=grn.n
-MLIB=$(LIBM)
-XLIBS=$(LIBGROFF) $(LIBGNU)
-OBJS=\
-  hdb.$(OBJEXT) \
-  hpoint.$(OBJEXT) \
-  hgraph.$(OBJEXT) \
-  main.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/hdb.cpp \
-  $(srcdir)/hpoint.cpp \
-  $(srcdir)/hgraph.cpp \
-  $(srcdir)/main.cpp
-HDRS=\
-  $(srcdir)/gprint.h
-NAMEPREFIX=$(g)
diff --git a/src/preproc/grn/grn.am b/src/preproc/grn/grn.am
new file mode 100644
index 0000000..72c6052
--- /dev/null
+++ b/src/preproc/grn/grn.am
@@ -0,0 +1,11 @@
+bin_PROGRAMS += grn
+grn_SOURCES = \
+  src/preproc/grn/hdb.cpp \
+  src/preproc/grn/hpoint.cpp \
+  src/preproc/grn/hgraph.cpp \
+  src/preproc/grn/main.cpp \
+  src/preproc/grn/gprint.h
+src/preproc/grn/main.$(OBJEXT): defs.h
+grn_LDADD = lib/libgnu.a libgroff.a $(LIBM)
+man1_MANS += src/preproc/grn/grn.n
+
diff --git a/src/preproc/html/Makefile.sub b/src/preproc/html/Makefile.sub
deleted file mode 100644
index 2a8adea..0000000
--- a/src/preproc/html/Makefile.sub
+++ /dev/null
@@ -1,7 +0,0 @@
-PROG=pre-grohtml$(EXEEXT)
-# MAN1=pre-grohtml.n
-MAN1=
-XLIBS=$(LIBGROFF) $(LIBGNU)
-MLIB=$(LIBM)
-OBJS=pre-html.$(OBJEXT) pushback.$(OBJEXT)
-CCSRCS=$(srcdir)/pre-html.cpp $(srcdir)/pushback.cpp
diff --git a/src/preproc/html/html.am b/src/preproc/html/html.am
new file mode 100644
index 0000000..cb959d4
--- /dev/null
+++ b/src/preproc/html/html.am
@@ -0,0 +1,8 @@
+bin_PROGRAMS += pre-grohtml
+pre_grohtml_LDADD = libgroff.a lib/libgnu.a $(LIBM)
+pre_grohtml_SOURCES = \
+  src/preproc/html/pre-html.cpp \
+  src/preproc/html/pushback.cpp \
+  src/preproc/html/pre-html.h \
+  src/preproc/html/pushback.h
+src/preproc/html/pre-html.$(OBJEXT): defs.h
diff --git a/src/preproc/pic/.gitignore b/src/preproc/pic/.gitignore
index af6bbfe..c77fe92 100644
--- a/src/preproc/pic/.gitignore
+++ b/src/preproc/pic/.gitignore
@@ -1,6 +1 @@
-Makefile.dep
-pic
-pic.n
 pic.cpp
-pic_tab.h
-y.output
diff --git a/src/preproc/pic/Makefile.sub b/src/preproc/pic/Makefile.sub
deleted file mode 100644
index 94b41fe..0000000
--- a/src/preproc/pic/Makefile.sub
+++ /dev/null
@@ -1,31 +0,0 @@
-PROG=pic$(EXEEXT)
-MAN1=pic.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
-  pic.$(OBJEXT) \
-  lex.$(OBJEXT) \
-  main.$(OBJEXT) \
-  object.$(OBJEXT) \
-  common.$(OBJEXT) \
-  troff.$(OBJEXT) \
-  tex.$(OBJEXT)
-  # fig.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/lex.cpp \
-  $(srcdir)/main.cpp \
-  $(srcdir)/object.cpp \
-  $(srcdir)/common.cpp \
-  $(srcdir)/troff.cpp \
-  $(srcdir)/tex.cpp
-HDRS=\
-  $(srcdir)/common.h \
-  $(srcdir)/object.h \
-  $(srcdir)/output.h \
-  $(srcdir)/pic.h \
-  $(srcdir)/position.h \
-  $(srcdir)/text.h
-GRAM=$(srcdir)/pic.y
-YTABC=pic.cpp
-YTABH=pic_tab.h
-NAMEPREFIX=$(g)
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index 73ef9a1..10a8601 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -22,7 +22,7 @@ along with this program. If not, see 
<http://www.gnu.org/licenses/>. */
 #include "pic.h"
 #include "ptable.h"
 #include "object.h"
-#include "pic_tab.h"
+#include "pic.hpp"
 
 declare_ptable(char)
 implement_ptable(char)
diff --git a/src/preproc/pic/pic.am b/src/preproc/pic/pic.am
new file mode 100644
index 0000000..176f9ce
--- /dev/null
+++ b/src/preproc/pic/pic.am
@@ -0,0 +1,41 @@
+# 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/>.
+
+bin_PROGRAMS += pic
+pic_LDADD = libgroff.a $(LIBM)
+pic_SOURCES = \
+  src/preproc/pic/pic.ypp \
+  src/preproc/pic/lex.cpp \
+  src/preproc/pic/main.cpp \
+  src/preproc/pic/object.cpp \
+  src/preproc/pic/common.cpp \
+  src/preproc/pic/troff.cpp \
+  src/preproc/pic/tex.cpp \
+  src/preproc/pic/pic.h \
+  src/preproc/pic/position.h \
+  src/preproc/pic/text.h \
+  src/preproc/pic/common.h \
+  src/preproc/pic/output.h \
+  src/preproc/pic/object.h
+
+pic_CPPFLAGS = $(AM_CPPFLAGS) \
+  -I $(top_srcdir)/src/preproc/pic \
+  -I $(top_builddir)/src/preproc/pic
+man1_MANS += src/preproc/pic/pic.n
+
+src/preproc/pic/pic-lex.$(OBJEXT): src/preproc/pic/pic.hpp
diff --git a/src/preproc/pic/pic.y b/src/preproc/pic/pic.ypp
similarity index 100%
rename from src/preproc/pic/pic.y
rename to src/preproc/pic/pic.ypp
diff --git a/src/preproc/preconv/Makefile.sub b/src/preproc/preconv/Makefile.sub
deleted file mode 100644
index e53050f..0000000
--- a/src/preproc/preconv/Makefile.sub
+++ /dev/null
@@ -1,7 +0,0 @@
-PROG=preconv$(EXEEXT)
-MAN1=preconv.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-EXTRA_LDFLAGS=$(LIBICONV)
-OBJS=preconv.$(OBJEXT)
-CCSRCS=$(srcdir)/preconv.cpp
diff --git a/src/preproc/preconv/preconv.am b/src/preproc/preconv/preconv.am
new file mode 100644
index 0000000..4ee1fea
--- /dev/null
+++ b/src/preproc/preconv/preconv.am
@@ -0,0 +1,5 @@
+bin_PROGRAMS += preconv
+preconv_LDADD = libgroff.a $(LIBM) $(LIBICONV)
+preconv_SOURCES = src/preproc/preconv/preconv.cpp
+man1_MANS += src/preproc/preconv/preconv.n
+
diff --git a/src/preproc/refer/Makefile.sub b/src/preproc/refer/Makefile.sub
deleted file mode 100644
index 2e22a3a..0000000
--- a/src/preproc/refer/Makefile.sub
+++ /dev/null
@@ -1,23 +0,0 @@
-PROG=refer$(EXEEXT)
-MAN1=refer.n
-XLIBS=$(LIBBIB) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
-  command.$(OBJEXT) \
-  label.$(OBJEXT) \
-  ref.$(OBJEXT) \
-  refer.$(OBJEXT) \
-  token.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/command.cpp \
-  $(srcdir)/ref.cpp \
-  $(srcdir)/refer.cpp \
-  $(srcdir)/token.cpp
-HDRS=\
-  $(srcdir)/refer.h \
-  $(srcdir)/token.h \
-  $(srcdir)/command.h \
-  $(srcdir)/ref.h
-GRAM=$(srcdir)/label.y
-YTABC=label.cpp
-NAMEPREFIX=$(g)
diff --git a/src/preproc/refer/label.y b/src/preproc/refer/label.ypp
similarity index 100%
rename from src/preproc/refer/label.y
rename to src/preproc/refer/label.ypp
diff --git a/src/preproc/refer/refer.am b/src/preproc/refer/refer.am
new file mode 100644
index 0000000..3522509
--- /dev/null
+++ b/src/preproc/refer/refer.am
@@ -0,0 +1,39 @@
+# 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/>.
+
+bin_PROGRAMS += refer
+refer_CPPFLAGS = $(AM_CPPFLAGS) -I $(top_srcdir)/src/preproc/refer
+refer_LDADD = libbib.a libgroff.a $(LIBM)
+refer_SOURCES =  \
+  src/preproc/refer/command.cpp \
+  src/preproc/refer/ref.cpp \
+  src/preproc/refer/refer.cpp \
+  src/preproc/refer/token.cpp \
+  src/preproc/refer/label.ypp \
+  src/preproc/refer/refer.h \
+  src/preproc/refer/ref.h \
+  src/preproc/refer/token.h \
+  src/preproc/refer/command.h
+man1_MANS += src/preproc/refer/refer.n
+# As refer_CPPFLAGS was set, all the .o have a 'refer-' prefix
+src/preproc/refer/refer-command.$(OBJEXT): defs.h
+src/preproc/refer/refer-ref.$(OBJEXT): defs.h
+src/preproc/refer/refer-refer.$(OBJEXT): defs.h
+src/preproc/refer/refer-token.$(OBJEXT): defs.h
+src/preproc/refer/refer-label.$(OBJEXT): defs.h
+
diff --git a/src/preproc/soelim/Makefile.sub b/src/preproc/soelim/Makefile.sub
deleted file mode 100644
index 2e15c00..0000000
--- a/src/preproc/soelim/Makefile.sub
+++ /dev/null
@@ -1,7 +0,0 @@
-PROG=soelim$(EXEEXT)
-MAN1=soelim.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=soelim.$(OBJEXT)
-CCSRCS=$(srcdir)/soelim.cpp
-NAMEPREFIX=$(g)
diff --git a/src/preproc/soelim/soelim.am b/src/preproc/soelim/soelim.am
new file mode 100644
index 0000000..503ce14
--- /dev/null
+++ b/src/preproc/soelim/soelim.am
@@ -0,0 +1,4 @@
+bin_PROGRAMS += soelim
+soelim_LDADD = libgroff.a $(LIBM)
+soelim_SOURCES = src/preproc/soelim/soelim.cpp
+man1_MANS += src/preproc/soelim/soelim.n
diff --git a/src/preproc/tbl/Makefile.sub b/src/preproc/tbl/Makefile.sub
deleted file mode 100644
index bea28b3..0000000
--- a/src/preproc/tbl/Makefile.sub
+++ /dev/null
@@ -1,13 +0,0 @@
-PROG=tbl$(EXEEXT)
-MAN1=tbl.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
-  main.$(OBJEXT) \
-  table.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/main.cpp \
-  $(srcdir)/table.cpp
-HDRS=\
-  $(srcdir)/table.h
-NAMEPREFIX=$(g)
diff --git a/src/preproc/tbl/tbl.am b/src/preproc/tbl/tbl.am
new file mode 100644
index 0000000..0cbc3d7
--- /dev/null
+++ b/src/preproc/tbl/tbl.am
@@ -0,0 +1,8 @@
+bin_PROGRAMS += tbl
+tbl_LDADD = libgroff.a $(LIBM)
+tbl_SOURCES = \
+  src/preproc/tbl/main.cpp \
+  src/preproc/tbl/table.cpp \
+  src/preproc/tbl/table.h
+man1_MANS += src/preproc/tbl/tbl.n
+



reply via email to

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