[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 08/46: Build src/preproc - Use AM_YFLAGS to pass option to yacc/
From: |
Bertrand Garrigues |
Subject: |
[groff] 08/46: Build src/preproc - Use AM_YFLAGS to pass option to yacc/flex - Also build arch/misc/shdeps.sed |
Date: |
Sun, 05 Oct 2014 22:30:51 +0000 |
bgarrigues pushed a commit to branch automake3
in repository groff.
commit d7bc24c56d14fe87adaf98f2d82966237ccc5ecb
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} | 21 ++---
src/preproc/eqn/.gitignore | 7 --
src/preproc/eqn/Makefile.sub | 93 --------------------
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 | 49 ----------
arch/misc/Makefile.sub => src/preproc/grn/grn.am | 29 +++----
src/preproc/html/Makefile.sub | 39 --------
arch/misc/Makefile.sub => src/preproc/html/html.am | 28 +++----
src/preproc/pic/.gitignore | 5 -
src/preproc/pic/Makefile.sub | 63 -------------
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 | 39 --------
.../Makefile.sub => src/preproc/preconv/preconv.am | 23 ++----
src/preproc/refer/Makefile.sub | 65 --------------
src/preproc/refer/{label.y => label.ypp} | 0
src/preproc/refer/refer.am | 39 ++++++++
src/preproc/soelim/Makefile.sub | 39 --------
.../Makefile.sub => src/preproc/soelim/soelim.am | 24 ++----
src/preproc/tbl/Makefile.sub | 45 ----------
arch/misc/Makefile.sub => src/preproc/tbl/tbl.am | 26 ++----
26 files changed, 243 insertions(+), 543 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 7987f54..592aa3c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -508,6 +508,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
@@ -515,11 +518,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 62%
copy from arch/misc/Makefile.sub
copy to arch/misc/misc.am
index db61b43..7807a26 100644
--- a/arch/misc/Makefile.sub
+++ b/arch/misc/misc.am
@@ -1,5 +1,8 @@
# Copyright (C) 2004-2014 Free Software Foundation, Inc.
-# Written by Keith Marshall (address@hidden)
+# Original Makefile.sub written by Keith Marshall
+# (address@hidden).
+# Adapted to Automake by Bertrand Garrigues
+# (address@hidden).
#
# This file is part of groff.
#
@@ -16,17 +19,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)" > $@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
+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 fc82b3a..0000000
--- a/src/preproc/eqn/Makefile.sub
+++ /dev/null
@@ -1,93 +0,0 @@
-# Makefile.sub for `preproc eqn'
-#
-# File position: <groff-source>/src/preproc/eqn/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which 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 2 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/gpl-2.0.html>.
-#
-########################################################################
-
-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
-RM=rm -f
-
-all: neqn
-
-neqn: neqn.sh $(SH_DEPS_SED_SCRIPT)
- $(RM) $@
- 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) $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn
- $(INSTALL_SCRIPT) neqn $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn
-
-uninstall_sub:
- $(RM) $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/src/preproc/eqn/eqn.am b/src/preproc/eqn/eqn.am
new file mode 100644
index 0000000..13898c4
--- /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) $@
+ 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 9f99132..5a29569 100644
--- a/src/preproc/eqn/lex.cpp
+++ b/src/preproc/eqn/lex.cpp
@@ -18,7 +18,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 36734e0..0000000
--- a/src/preproc/grn/Makefile.sub
+++ /dev/null
@@ -1,49 +0,0 @@
-# Makefile.sub for `preproc grn
-#
-# File position: <groff-source>/src/preproc/grn/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which 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 2 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/gpl-2.0.html>.
-#
-########################################################################
-
-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)
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/arch/misc/Makefile.sub b/src/preproc/grn/grn.am
similarity index 57%
copy from arch/misc/Makefile.sub
copy to src/preproc/grn/grn.am
index db61b43..c5a1248 100644
--- a/arch/misc/Makefile.sub
+++ b/src/preproc/grn/grn.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
-# Written by Keith Marshall (address@hidden)
-#
+# 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
@@ -16,17 +16,14 @@
# 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
+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
-shdeps.sed: $(srcdir)/shdeps.sh
- $(SHELL) $(srcdir)/shdeps.sh "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > $@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/src/preproc/html/Makefile.sub b/src/preproc/html/Makefile.sub
deleted file mode 100644
index 89ab989..0000000
--- a/src/preproc/html/Makefile.sub
+++ /dev/null
@@ -1,39 +0,0 @@
-# Makefile.sub for `preproc html'
-#
-# File position: <groff-source>/src/preproc/html/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which 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 2 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/gpl-2.0.html>.
-#
-########################################################################
-
-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
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/arch/misc/Makefile.sub b/src/preproc/html/html.am
similarity index 57%
copy from arch/misc/Makefile.sub
copy to src/preproc/html/html.am
index db61b43..f378a39 100644
--- a/arch/misc/Makefile.sub
+++ b/src/preproc/html/html.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
-# Written by Keith Marshall (address@hidden)
-#
+# 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
@@ -16,17 +16,11 @@
# 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)" > $@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
+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 4bd3dba..0000000
--- a/src/preproc/pic/Makefile.sub
+++ /dev/null
@@ -1,63 +0,0 @@
-# Makefile.sub for `preproc pic'
-#
-# File position: <groff-source>/src/preproc/pic/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which 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 2 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/gpl-2.0.html>.
-#
-########################################################################
-
-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)
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index f7f868d..5695a4b 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -20,7 +20,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 23f7393..0000000
--- a/src/preproc/preconv/Makefile.sub
+++ /dev/null
@@ -1,39 +0,0 @@
-# Makefile.sub for `preproc preconv'
-#
-# File position: <groff-source>/src/preproc/preconv/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which 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 2 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/gpl-2.0.html>.
-#
-########################################################################
-
-PROG=preconv$(EXEEXT)
-MAN1=preconv.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-EXTRA_LDFLAGS=$(LIBICONV)
-OBJS=preconv.$(OBJEXT)
-CCSRCS=$(srcdir)/preconv.cpp
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/arch/misc/Makefile.sub b/src/preproc/preconv/preconv.am
similarity index 57%
copy from arch/misc/Makefile.sub
copy to src/preproc/preconv/preconv.am
index db61b43..b903bc0 100644
--- a/arch/misc/Makefile.sub
+++ b/src/preproc/preconv/preconv.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
-# Written by Keith Marshall (address@hidden)
-#
+# 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
@@ -16,17 +16,8 @@
# 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
+bin_PROGRAMS += preconv
+preconv_LDADD = libgroff.a $(LIBM) $(LIBICONV)
+preconv_SOURCES = src/preproc/preconv/preconv.cpp
+man1_MANS += src/preproc/preconv/preconv.n
-shdeps.sed: $(srcdir)/shdeps.sh
- $(SHELL) $(srcdir)/shdeps.sh "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > $@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/src/preproc/refer/Makefile.sub b/src/preproc/refer/Makefile.sub
deleted file mode 100644
index b87dcc4..0000000
--- a/src/preproc/refer/Makefile.sub
+++ /dev/null
@@ -1,65 +0,0 @@
-# Makefile.sub for `preproc refer'
-#
-# File position: <groff-source>/src/preproc/refer/Makefile.sub
-#
-# Copyright (C) 1989-2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which 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 2 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/gpl-2.0.html>.
-#
-########################################################################
-
-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)
-
-.PHONY: install_data
-install_data: refer
- -test -d $(DESTDIR)$(referdir) \
- || $(mkinstalldirs) $(DESTDIR)$(referdir)
-
-.PHONY: uninstall_data
-uninstall_sub:
- -test -d $(DESTDIR)$(referdir) && rmdir $(DESTDIR)$(referdir)
-
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
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 187fb8f..0000000
--- a/src/preproc/soelim/Makefile.sub
+++ /dev/null
@@ -1,39 +0,0 @@
-# Makefile.sub for `preproc soelim'
-#
-# File position: <groff-source>/src/preproc/soelim/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which 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 2 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/gpl-2.0.html>.
-#
-########################################################################
-
-PROG=soelim$(EXEEXT)
-MAN1=soelim.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=soelim.$(OBJEXT)
-CCSRCS=$(srcdir)/soelim.cpp
-NAMEPREFIX=$(g)
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/arch/misc/Makefile.sub b/src/preproc/soelim/soelim.am
similarity index 57%
copy from arch/misc/Makefile.sub
copy to src/preproc/soelim/soelim.am
index db61b43..d88c190 100644
--- a/arch/misc/Makefile.sub
+++ b/src/preproc/soelim/soelim.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
-# Written by Keith Marshall (address@hidden)
-#
+# 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
@@ -16,17 +16,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/>.
-MOSTLYCLEANADD=shdeps.sed
-
-all: shdeps.sed
-
-shdeps.sed: $(srcdir)/shdeps.sh
- $(SHELL) $(srcdir)/shdeps.sh "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > $@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
+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 f93b92a..0000000
--- a/src/preproc/tbl/Makefile.sub
+++ /dev/null
@@ -1,45 +0,0 @@
-# Makefile.sub for `preproc tbl'
-#
-# File position: <groff-source>/src/preproc/tbl/Makefile.sub
-#
-# Copyright (C) 2014 Free Software Foundation, Inc.
-#
-# This file is part of `font utf8' which 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 2 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/gpl-2.0.html>.
-#
-########################################################################
-
-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)
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/arch/misc/Makefile.sub b/src/preproc/tbl/tbl.am
similarity index 57%
rename from arch/misc/Makefile.sub
rename to src/preproc/tbl/tbl.am
index db61b43..b64a0cd 100644
--- a/arch/misc/Makefile.sub
+++ b/src/preproc/tbl/tbl.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
-# Written by Keith Marshall (address@hidden)
-#
+# 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
@@ -16,17 +16,11 @@
# 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
+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
-shdeps.sed: $(srcdir)/shdeps.sh
- $(SHELL) $(srcdir)/shdeps.sh "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > $@
-
-########################################################################
-# Emacs settings
-########################################################################
-#
-# Local Variables:
-# mode: makefile
-# End:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 08/46: Build src/preproc - Use AM_YFLAGS to pass option to yacc/flex - Also build arch/misc/shdeps.sed,
Bertrand Garrigues <=