groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/33: Build the 4 static libraries in src/libs


From: Bertrand Garrigues
Subject: [groff] 03/33: Build the 4 static libraries in src/libs
Date: Sun, 07 Sep 2014 23:02:02 +0000

bgarrigues pushed a commit to branch automake2
in repository groff.

commit 44c9c42dd3b266427ec848780ab9e62fdad8200c
Author: Bertrand Garrigues <address@hidden>
Date:   Sun Aug 17 11:30:10 2014 +0200

    Build the 4 static libraries in src/libs
    
      - Convenience libraries, not installed, so added to the
        noinst_LIBRARIES variable
    
      - Non-recursive Makefile: we don't use SUBDIRS, but include .am
        files from the top-level Makefile.am. Consequently, the source
        files list of each library is a list of paths relative to the top
        source directory.
    
      - src/include/include.am: defs.h is a generated header, not
        distributed, not installed.
---
 Makefile.am                     |   24 +++++-
 TESTS                           |   52 ++++++++++-
 src/include/Makefile.sub        |   50 ----------
 src/include/include.am          |   15 +++
 src/libs/libbib/Makefile.sub    |   14 ---
 src/libs/libbib/libbib.am       |    8 ++
 src/libs/libdriver/Makefile.sub |    7 --
 src/libs/libdriver/libdriver.am |    4 +
 src/libs/libgroff/Makefile.sub  |  190 ---------------------------------------
 src/libs/libgroff/libgroff.am   |  115 +++++++++++++++++++++++
 src/libs/libxutil/Makefile.sub  |   10 --
 src/libs/libxutil/libxutil.am   |    7 ++
 12 files changed, 220 insertions(+), 276 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 836de85..17b6085 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -484,9 +484,12 @@ PURIFYCCFLAGS=
 # Add groff and gnulib m4 macros
 ACLOCAL_AMFLAGS = -I m4 -I gnulib_m4
 
-# Common preprocessor flags: gnulib includes
+# Common preprocessor flags: gnulib includes, common includes in
+# src/include, and config.h that is generated in the build tree
 AM_CPPFLAGS = \
+  -I$(top_srcdir)/src/include \
   -I$(top_srcdir)/lib \
+  -I$(top_builddir)/src/include \
   -I$(top_builddir)/lib
 
 # The following Automake variables will be overloaded by the various
@@ -514,6 +517,25 @@ man7_MANS =
 # source directory.
 
 include $(top_srcdir)/lib/gnulib.mk
+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
+
+# Adding defs.h to BUILT_SOURCES will ensure that it will be built on
+# make all or make check before all other targets. However, if another
+# target is built from a clean build tree, (for example make groff)
+# the files in BUILT_SOURCES will not be built first. That is why
+# additional dependencies where added in the .am files that lists
+# objects that use defs (for exmaple in groff.am:
+# src/roff/groff/groff.$(OBJEXT): defs.h)
+BUILT_SOURCES += defs.h
+
+# Same thing for gnulib's localcharset.c and configmake.h: gnulib uses
+# BUILT_SOURCES only, adding the following makes 'make lib/libgnu.a'
+# possible
+lib/localcharset.$(OBJEXT): lib/configmake.h
 
 # Other files that should be present in the distribution tarball.
 EXTRA_DIST += \
diff --git a/TESTS b/TESTS
index 8c0163b..7012582 100644
--- a/TESTS
+++ b/TESTS
@@ -12,6 +12,7 @@ Current status
 --------------
   - Gnulib integrated
   - Minimum Automake support
+  - Build src/libs/*
 
 Tests
 -----
@@ -46,16 +47,56 @@ Tests done in 2 configurations:
 
 2.1 make
 
-  - src/include/config.h generated
-  - lib/libgnu.a generated
+Following files are generated:
+
+  - src/include/config.h
+  - lib/libgnu.a
+  - libbib.a
+  - libdriver.a
+  - libgroff.a, version.cpp and extra files (charset.alias,
+    ref-add.sed, ref-del.sed)
+  - libxutils.a
+
+In order to check and improve the dependencies, the following targets
+were built from a clean environment:
+  - make lib/libgnu.a
+  - make libbib.a
+  - make libdriver.a
+  - make libgroff.a
+  - make libxutil.a
 
 2.2 make clean
 
 The following files remains (this is expected):
   - src/include/config.h
   - src/include/stamp-h1
+  - .deps directories and .dirstamp files
+
+TODO: following files should be cleaned:
+  - libgroff extra files and version.cpp
+
+2.3 make mostlyclean
+
+  Like 'make clean', but:
+  - lib*.a remain
+
+2.4 make dist-clean
+
+  To be checked
+
+2.5 make maintainer-clean
+
+  To be checked
+
+2.6 make install
+
+  To be checked
+
+2.7 make uninstall
+
+  To be checked
 
-2.3 make dist
+2.8 make dist
 
   groff-1.22.2.tar.gz is generated
 
@@ -74,7 +115,7 @@ The following files remains (this is expected):
     doc/
     font/
     man/
-    src/* (except include)
+    src/* (except include): src/libs .c .cpp are missing
     tmac
     test-groff.in
 
@@ -89,6 +130,9 @@ The following files remains (this is expected):
     aclocal.m4
     configure   
 
+2.9 make distcheck
+  
+  - fails (src/libs sources are missing)
 Notes
 -----
 
diff --git a/src/include/Makefile.sub b/src/include/Makefile.sub
deleted file mode 100644
index 58e1ac9..0000000
--- a/src/include/Makefile.sub
+++ /dev/null
@@ -1,50 +0,0 @@
-HDRS=\
-  assert.h \
-  cmap.h \
-  cset.h \
-  color.h \
-  device.h \
-  driver.h \
-  DviChar.h \
-  errarg.h \
-  error.h \
-  font.h \
-  geometry.h \
-  getopt.h \
-  getopt_int.h \
-  gettext.h \
-  htmlhint.h \
-  index.h \
-  lib.h \
-  macropath.h \
-  nonposix.h \
-  posix.h \
-  printer.h \
-  ptable.h \
-  refid.h \
-  relocate.h \
-  search.h \
-  searchpath.h \
-  stringclass.h \
-  symbol.h \
-  unicode.h \
-  XFontName.h
-GENHDRS=defs.h
-
-all depend: $(GENHDRS)
-
-defs.h: FORCE
-       @$(SHELL) $(top_srcdir)/gendef.sh defs.h \
-       "PROG_PREFIX=\"$(g)\"" \
-       "DEVICE=\"$(DEVICE)\"" \
-       "INSTALLPATH=\"$(prefix)\"" \
-       "BINPATH=\"$(bindir)\"" \
-       "FONTPATH=\"$(fontpath)\"" \
-       "MACROPATH=\"$(tmacpath)\"" \
-       "INDEX_SUFFIX=\"$(indexext)\"" \
-       "COMMON_WORDS_FILE=\"$(common_words_file)\"" \
-       "DEFAULT_INDEX_DIR=\"$(indexdir)\"" \
-       "DEFAULT_INDEX_NAME=\"$(indexname)\"" \
-       "DEFAULT_INDEX=\"$(indexdir)/$(indexname)\""
-
-FORCE:
diff --git a/src/include/include.am b/src/include/include.am
new file mode 100644
index 0000000..4bb9015
--- /dev/null
+++ b/src/include/include.am
@@ -0,0 +1,15 @@
+nodist_noinst_HEADERS = defs.h
+defs.h:
+       @$(SHELL) $(top_srcdir)/gendef.sh defs.h \
+       "PROG_PREFIX=\"$(g)\"" \
+       "DEVICE=\"$(DEVICE)\"" \
+       "INSTALLPATH=\"$(prefix)\"" \
+       "BINPATH=\"$(bindir)\"" \
+       "FONTPATH=\"$(fontpath)\"" \
+       "MACROPATH=\"$(tmacpath)\"" \
+       "INDEX_SUFFIX=\"$(indexext)\"" \
+       "COMMON_WORDS_FILE=\"$(common_words_file)\"" \
+       "DEFAULT_INDEX_DIR=\"$(indexdir)\"" \
+       "DEFAULT_INDEX_NAME=\"$(indexname)\"" \
+       "DEFAULT_INDEX=\"$(indexdir)/$(indexname)\""
+
diff --git a/src/libs/libbib/Makefile.sub b/src/libs/libbib/Makefile.sub
deleted file mode 100644
index 19dd439..0000000
--- a/src/libs/libbib/Makefile.sub
+++ /dev/null
@@ -1,14 +0,0 @@
-LIB=bib
-OBJS=\
-  common.$(OBJEXT) \
-  index.$(OBJEXT) \
-  linear.$(OBJEXT) \
-  search.$(OBJEXT) \
-  map.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/common.cpp \
-  $(srcdir)/index.cpp \
-  $(srcdir)/linear.cpp \
-  $(srcdir)/search.cpp
-CSRCS=\
-  $(srcdir)/map.c
diff --git a/src/libs/libbib/libbib.am b/src/libs/libbib/libbib.am
new file mode 100644
index 0000000..c262ea6
--- /dev/null
+++ b/src/libs/libbib/libbib.am
@@ -0,0 +1,8 @@
+noinst_LIBRARIES += libbib.a
+libbib_a_SOURCES = \
+  src/libs/libbib/common.cpp \
+  src/libs/libbib/index.cpp \
+  src/libs/libbib/linear.cpp \
+  src/libs/libbib/search.cpp \
+  src/libs/libbib/map.c
+src/libs/libbib/index.$(OBJEXT): defs.h
diff --git a/src/libs/libdriver/Makefile.sub b/src/libs/libdriver/Makefile.sub
deleted file mode 100644
index 5d37e2a..0000000
--- a/src/libs/libdriver/Makefile.sub
+++ /dev/null
@@ -1,7 +0,0 @@
-LIB=driver
-OBJS=\
-  input.$(OBJEXT) \
-  printer.$(OBJEXT)
-CCSRCS=\
-  $(srcdir)/input.cpp \
-  $(srcdir)/printer.cpp
diff --git a/src/libs/libdriver/libdriver.am b/src/libs/libdriver/libdriver.am
new file mode 100644
index 0000000..b179f73
--- /dev/null
+++ b/src/libs/libdriver/libdriver.am
@@ -0,0 +1,4 @@
+noinst_LIBRARIES += libdriver.a
+libdriver_a_SOURCES = \
+  src/libs/libdriver/input.cpp \
+  src/libs/libdriver/printer.cpp
diff --git a/src/libs/libgroff/Makefile.sub b/src/libs/libgroff/Makefile.sub
deleted file mode 100644
index 80fd87c..0000000
--- a/src/libs/libgroff/Makefile.sub
+++ /dev/null
@@ -1,190 +0,0 @@
-LIB=groff
-EXTRA_CFLAGS=-D__GETOPT_PREFIX=groff_ \
-             -DENABLE_RELOCATABLE=1 \
-             -DLIBDIR=\"$(libdir)\"
-OBJS=\
-  assert.$(OBJEXT) \
-  change_lf.$(OBJEXT) \
-  cmap.$(OBJEXT) \
-  color.$(OBJEXT) \
-  cset.$(OBJEXT) \
-  device.$(OBJEXT) \
-  errarg.$(OBJEXT) \
-  error.$(OBJEXT) \
-  fatal.$(OBJEXT) \
-  filename.$(OBJEXT) \
-  font.$(OBJEXT) \
-  fontfile.$(OBJEXT) \
-  geometry.$(OBJEXT) \
-  getopt.$(OBJEXT) \
-  getopt1.$(OBJEXT) \
-  glyphuni.$(OBJEXT) \
-  htmlhint.$(OBJEXT) \
-  hypot.$(OBJEXT) \
-  iftoa.$(OBJEXT) \
-  invalid.$(OBJEXT) \
-  itoa.$(OBJEXT) \
-  lf.$(OBJEXT) \
-  lineno.$(OBJEXT) \
-  localcharset.$(OBJEXT) \
-  macropath.$(OBJEXT) \
-  matherr.$(OBJEXT) \
-  maxfilename.$(OBJEXT) \
-  maxpathname.$(OBJEXT) \
-  mksdir.$(OBJEXT) \
-  nametoindex.$(OBJEXT) \
-  new.$(OBJEXT) \
-  paper.$(OBJEXT) \
-  prime.$(OBJEXT) \
-  progname.$(OBJEXT) \
-  ptable.$(OBJEXT) \
-  quotearg.$(OBJEXT) \
-  relocate.$(OBJEXT) \
-  searchpath.$(OBJEXT) \
-  spawnvp.$(OBJEXT) \
-  string.$(OBJEXT) \
-  strsave.$(OBJEXT) \
-  symbol.$(OBJEXT) \
-  tmpfile.$(OBJEXT) \
-  tmpname.$(OBJEXT) \
-  unicode.$(OBJEXT) \
-  uniglyph.$(OBJEXT) \
-  uniuni.$(OBJEXT) \
-  version.$(OBJEXT) \
-  $(LIBOBJS)
-CCSRCS=\
-  $(srcdir)/assert.cpp \
-  $(srcdir)/change_lf.cpp \
-  $(srcdir)/cmap.cpp \
-  $(srcdir)/color.cpp \
-  $(srcdir)/cset.cpp \
-  $(srcdir)/device.cpp \
-  $(srcdir)/errarg.cpp \
-  $(srcdir)/error.cpp \
-  $(srcdir)/fatal.cpp \
-  $(srcdir)/filename.cpp \
-  $(srcdir)/font.cpp \
-  $(srcdir)/fontfile.cpp \
-  $(srcdir)/geometry.cpp \
-  $(srcdir)/glyphuni.cpp \
-  $(srcdir)/htmlhint.cpp \
-  $(srcdir)/hypot.cpp \
-  $(srcdir)/invalid.cpp \
-  $(srcdir)/lf.cpp \
-  $(srcdir)/lineno.cpp \
-  $(srcdir)/macropath.cpp \
-  $(srcdir)/maxfilename.cpp \
-  $(srcdir)/maxpathname.cpp \
-  $(srcdir)/mksdir.cpp \
-  $(srcdir)/mkstemp.cpp \
-  $(srcdir)/nametoindex.cpp \
-  $(srcdir)/new.cpp \
-  $(srcdir)/paper.cpp \
-  $(srcdir)/prime.cpp \
-  $(srcdir)/ptable.cpp \
-  $(srcdir)/relocate.cpp \
-  $(srcdir)/searchpath.cpp \
-  $(srcdir)/string.cpp \
-  $(srcdir)/strsave.cpp \
-  $(srcdir)/symbol.cpp \
-  $(srcdir)/tmpfile.cpp \
-  $(srcdir)/tmpname.cpp \
-  $(srcdir)/unicode.cpp \
-  $(srcdir)/uniglyph.cpp \
-  $(srcdir)/uniuni.cpp \
-  version.cpp
-CSRCS=\
-  $(srcdir)/fmod.c \
-  $(srcdir)/getcwd.c \
-  $(srcdir)/getopt.c \
-  $(srcdir)/getopt1.c \
-  $(srcdir)/iftoa.c \
-  $(srcdir)/itoa.c \
-  $(srcdir)/localcharset.c \
-  $(srcdir)/matherr.c \
-  $(srcdir)/progname.c \
-  $(srcdir)/putenv.c \
-  $(srcdir)/quotearg.c \
-  $(srcdir)/spawnvp.c \
-  $(srcdir)/strcasecmp.c \
-  $(srcdir)/strerror.c \
-  $(srcdir)/strncasecmp.c \
-  $(srcdir)/strtol.c \
-  $(srcdir)/../snprintf/snprintf.c
-GENSRCS=\
-  version.cpp
-
-src_version=`cat $(top_srcdir)/VERSION`
-src_revision=`cat $(top_srcdir)/REVISION`
-
-version.cpp: $(top_srcdir)/VERSION $(top_srcdir)/REVISION
-       @echo Making version.cpp
-       @echo const char \*version_string = \"$(src_version)\"\; >$@
-       @echo const char \*revision_string = \"$(src_revision)\"\; >>$@
-       @echo extern \"C\" const char \*Version_string = 
\"$(src_version).$(src_revision)\"\; \
-         | sed -e 's/\.0\"/\"/' >>$@
-
-# We have to avoid $(COMPILE.c) since we must not use groff's `assert.h'
-snprintf.$(OBJEXT): $(srcdir)/../snprintf/snprintf.c
-       $(CC) -c $(CDEFINES) $(CFLAGS) $(CPPFLAGS) \
-         $(srcdir)/../snprintf/snprintf.c
-
-# Data for localcharset.c.  Taken from libiconv/libcharset.
-
-all: charset.alias ref-add.sed ref-del.sed
-
-charset.alias: $(srcdir)/config.charset
-       $(SHELL) $(srcdir)/config.charset '$(HOST)' > t-$@
-       mv t-$@ $@
-
-PACKAGE=groff
-
-ref-add.sed : $(srcdir)/ref-add.sin
-       sed -e '/^#/d' \
-           -e 's/@''PACKAGE''@/$(PACKAGE)/g' $(srcdir)/ref-add.sin > t-$@
-       mv t-$@ $@
-
-ref-del.sed : $(srcdir)/ref-del.sin
-       sed -e '/^#/d' \
-           -e 's/@''PACKAGE''@/$(PACKAGE)/g' $(srcdir)/ref-del.sin > t-$@
-       mv t-$@ $@
-
-MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs
-
-install_data: install_charset_data
-install_charset_data:
-       -test $(GLIBC21) != no || $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
-       if test -f $(DESTDIR)$(libdir)/charset.alias; then \
-         sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias \
-           > $(DESTDIR)$(libdir)/t-charset.alias; \
-         $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \
-           $(DESTDIR)$(libdir)/charset.alias; \
-         rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
-       else \
-         if test $(GLIBC21) = no; then \
-           sed -f ref-add.sed charset.alias \
-             > $(DESTDIR)$(libdir)/t-charset.alias; \
-           $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \
-             $(DESTDIR)$(libdir)/charset.alias; \
-           rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
-         fi; \
-       fi
-
-uninstall_sub: uninstall_charset_data
-uninstall_charset_data:
-       -if test -f $(DESTDIR)$(libdir)/charset.alias; then \
-         sed -f ref-del.sed $(DESTDIR)$(libdir)/charset.alias \
-           > $(DESTDIR)$(libdir)/t-charset.alias; \
-         if grep '^# Packages using this file: $$' \
-                 $(DESTDIR)$(libdir)/t-charset.alias > /dev/null; then \
-           rm -f $(DESTDIR)$(libdir)/charset.alias; \
-         else \
-           $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \
-             $(DESTDIR)$(libdir)/charset.alias; \
-         fi; \
-         rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
-       fi
-
-clean: clean_charset
-clean_charset:
-       rm -f charset.alias ref-add.sed ref-del.sed
diff --git a/src/libs/libgroff/libgroff.am b/src/libs/libgroff/libgroff.am
new file mode 100644
index 0000000..66f8f8c
--- /dev/null
+++ b/src/libs/libgroff/libgroff.am
@@ -0,0 +1,115 @@
+# 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/>.
+
+libgroff_srcdir = $(top_srcdir)/src/libs/libgroff
+noinst_LIBRARIES += libgroff.a
+libgroff_a_CPPFLAGS = \
+  $(AM_CPPFLAGS) \
+  -D__GETOPT_PREFIX=groff_ \
+  -DENABLE_RELOCATABLE=1 \
+  -DLIBDIR=\"$(libdir)\"
+
+# Build from OBJS
+libgroff_a_SOURCES = \
+  src/libs/libgroff/assert.cpp \
+  src/libs/libgroff/change_lf.cpp \
+  src/libs/libgroff/cmap.cpp \
+  src/libs/libgroff/color.cpp \
+  src/libs/libgroff/cset.cpp\
+  src/libs/libgroff/device.cpp \
+  src/libs/libgroff/errarg.cpp \
+  src/libs/libgroff/error.cpp \
+  src/libs/libgroff/fatal.cpp \
+  src/libs/libgroff/filename.cpp \
+  src/libs/libgroff/font.cpp \
+  src/libs/libgroff/fontfile.cpp \
+  src/libs/libgroff/geometry.cpp \
+  src/libs/libgroff/getopt.c \
+  src/libs/libgroff/getopt1.c \
+  src/libs/libgroff/glyphuni.cpp \
+  src/libs/libgroff/htmlhint.cpp \
+  src/libs/libgroff/hypot.cpp \
+  src/libs/libgroff/iftoa.c \
+  src/libs/libgroff/invalid.cpp \
+  src/libs/libgroff/itoa.c \
+  src/libs/libgroff/lf.cpp \
+  src/libs/libgroff/lineno.cpp \
+  src/libs/libgroff/localcharset.c \
+  src/libs/libgroff/macropath.cpp \
+  src/libs/libgroff/matherr.c \
+  src/libs/libgroff/maxfilename.cpp \
+  src/libs/libgroff/maxpathname.cpp \
+  src/libs/libgroff/mksdir.cpp \
+  src/libs/libgroff/nametoindex.cpp \
+  src/libs/libgroff/new.cpp \
+  src/libs/libgroff/paper.cpp \
+  src/libs/libgroff/prime.cpp \
+  src/libs/libgroff/progname.c \
+  src/libs/libgroff/ptable.cpp \
+  src/libs/libgroff/quotearg.c \
+  src/libs/libgroff/relocate.cpp \
+  src/libs/libgroff/searchpath.cpp \
+  src/libs/libgroff/spawnvp.c \
+  src/libs/libgroff/string.cpp \
+  src/libs/libgroff/strsave.cpp \
+  src/libs/libgroff/symbol.cpp \
+  src/libs/libgroff/tmpfile.cpp \
+  src/libs/libgroff/tmpname.cpp \
+  src/libs/libgroff/unicode.cpp \
+  src/libs/libgroff/uniglyph.cpp \
+  src/libs/libgroff/uniuni.cpp \
+  src/libs/libgroff/relocatable.h
+nodist_libgroff_a_SOURCES = src/libs/libgroff/version.cpp
+
+src_version=`cat $(top_srcdir)/VERSION`
+src_revision=`cat $(top_srcdir)/REVISION`
+
+# .o files have a 'libgroff_a-' prefix because we set libgroff_a_CPPFLAGS
+src/libs/libgroff/libgroff_a-device.$(OBJEXT): defs.h
+src/libs/libgroff/libgroff_a-fontfile.$(OBJEXT): defs.h
+src/libs/libgroff/libgroff_a-macropath.$(OBJEXT): defs.h
+src/libs/libgroff/libgroff_a-relocate.$(OBJEXT): defs.h
+
+src/libs/libgroff/version.cpp: $(top_srcdir)/VERSION $(top_srcdir)/REVISION
+       @echo Making version.cpp
+       @echo const char \*version_string = \"$(src_version)\"\; >$@
+       @echo const char \*revision_string = \"$(src_revision)\"\; >>$@
+       @echo extern \"C\" { >>$@
+       @echo const char \*Version_string = 
\"$(src_version).$(src_revision)\"\; >>$@
+       @echo } >>$@ \
+         | sed -e 's/\.0\"/\"/' >>$@
+
+# Data for localcharset.c.  Taken from libiconv/libcharset.
+
+LIBGROFF_PACKAGE = groff
+
+all: charset.alias ref-add.sed ref-del.sed
+
+charset.alias: $(libgroff_srcdir)/config.charset
+       $(SHELL) $(libgroff_srcdir)/config.charset '$(HOST)' > t-$@
+       mv t-$@ $@
+
+ref-add.sed : $(libgroff_srcdir)/ref-add.sin
+       sed -e '/^#/d' \
+           -e 's/@''PACKAGE''@/$(LIBGROFF_PACKAGE)/g' 
$(libgroff_srcdir)/ref-add.sin > t-$@
+       mv t-$@ $@
+
+ref-del.sed : $(libgroff_srcdir)/ref-del.sin
+       sed -e '/^#/d' \
+           -e 's/@''PACKAGE''@/$(LIBGROFF_PACKAGE)/g' 
$(libgroff_srcdir)/ref-del.sin > t-$@
+       mv t-$@ $@
diff --git a/src/libs/libxutil/Makefile.sub b/src/libs/libxutil/Makefile.sub
deleted file mode 100644
index 24444a6..0000000
--- a/src/libs/libxutil/Makefile.sub
+++ /dev/null
@@ -1,10 +0,0 @@
-LIB=xutil
-EXTRA_CFLAGS=$(X_CFLAGS)
-OBJS=\
-  DviChar.$(OBJEXT) \
-  XFontName.$(OBJEXT) \
-  xmalloc.$(OBJEXT)
-CSRCS=\
-  $(srcdir)/DviChar.c \
-  $(srcdir)/XFontName.c \
-  $(srcdir)/xmalloc.c
diff --git a/src/libs/libxutil/libxutil.am b/src/libs/libxutil/libxutil.am
new file mode 100644
index 0000000..bca1450
--- /dev/null
+++ b/src/libs/libxutil/libxutil.am
@@ -0,0 +1,7 @@
+# TODO: X management
+noinst_LIBRARIES += libxutil.a
+libxutil_a_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS)
+libxutil_a_SOURCES = \
+  src/libs/libxutil/DviChar.c \
+  src/libs/libxutil/XFontName.c \
+  src/libs/libxutil/xmalloc.c



reply via email to

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