commit 64e06a7fbb268729fe42837a169c2342a024d4e6 Author: orbea Date: Tue Mar 30 09:46:36 2021 -0700 fix diff --git a/configure.ac b/configure.ac index 1cb0546..1981f9d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([Lpe], [1.2.8]) -AC_CONFIG_SRCDIR([src/lpe.c]) +AC_CONFIG_SRCDIR([src/utils/lpe.c]) AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE @@ -162,4 +162,5 @@ data/Makefile man/Makefile po/Makefile.in src/Makefile +src/utils/Makefile src/modes/Makefile]) diff --git a/src/Makefile.am b/src/Makefile.am index 01c9884..3ae707b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,40 +1,17 @@ MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = modes +AM_CPPFLAGS = -DPLUGINDIR=\"$(libdir)/lpe\" -I$(top_srcdir)/src/utils + +SUBDIRS = utils modes bin_PROGRAMS = lpe lpe_SOURCES = \ - buffer.c buffer.h \ - cfg-core.c cfg-core.h \ - cfg.c cfg.h \ - exports.c exports.h \ - genmode.c genmode.h \ - help.c help.h \ highlight.h \ i18n.h \ - input.c input.h \ - lpe.c lpe.h \ - lpecomm.c lpecomm.h \ - minibuf.c minibuf.h \ - mode-utils.c mode-utils.h \ - options.h \ - screen.c screen.h \ - strfuncs.c strfuncs.h \ - common.c common.h - -AM_CFLAGS = -DDATADIR=\"$(datadir)/lpe\" + options.h -lpe_LDADD = @LIBINTL@ @INTLOBJS@ @DL_LIB@ @SLANG_LIB@ -lncurses +lpe_LDADD = $(top_srcdir)/src/utils/liblpe_utils.la lpe_LDFLAGS = @lpe_LDFLAGS@ -lpe_DEPENDENCIES = @lpe_DEPS@ @INTLOBJS@ - -if USE_INCLUDED_LIBINTL -AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/lpe" -I$(top_srcdir)/intl -else -AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" -endif - -AM_CPPFLAGS += -DPLUGINDIR=\"$(libdir)/lpe\" EXTRA_DIST = templ.c templ.h diff --git a/src/modes/Makefile.am b/src/modes/Makefile.am index eb8d891..f346f33 100644 --- a/src/modes/Makefile.am +++ b/src/modes/Makefile.am @@ -1,6 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in -AM_CFLAGS = -I$(top_srcdir)/src +AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/utils +AM_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) liblpedir = $(libdir)/lpe @@ -11,18 +12,18 @@ EXTRA_LTLIBRARIES = \ mailmode.la javamode.la lispmode.la cmode_la_SOURCES = cmode.c -cmode_la_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) +cmode_la_LIBADD = $(top_srcdir)/src/utils/liblpe_utils.la cppmode_la_SOURCES = cppmode.c -cppmode_la_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) +cppmode_la_LIBADD = $(top_srcdir)/src/utils/liblpe_utils.la perlmode_la_SOURCES = perlmode.c -perlmode_la_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) +perlmode_la_LIBADD = $(top_srcdir)/src/utils/liblpe_utils.la htmlmode_la_SOURCES = htmlmode.c -htmlmode_la_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) +htmlmode_la_LIBADD = $(top_srcdir)/src/utils/liblpe_utils.la sgmlmode_la_SOURCES = sgmlmode.c -sgmlmode_la_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) +sgmlmode_la_LIBADD = $(top_srcdir)/src/utils/liblpe_utils.la mailmode_la_SOURCES = mailmode.c -mailmode_la_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) +mailmode_la_LIBADD = $(top_srcdir)/src/utils/liblpe_utils.la javamode_la_SOURCES = javamode.c -javamode_la_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) +javamode_la_LIBADD = $(top_srcdir)/src/utils/liblpe_utils.la lispmode_la_SOURCES = lispmode.c -lispmode_la_LDFLAGS = -no-undefined -avoid-version -module -export-dynamic -rpath $(liblpedir) +lispmode_la_LIBADD = $(top_srcdir)/src/utils/liblpe_utils.la diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am new file mode 100644 index 0000000..eca2ebe --- /dev/null +++ b/src/utils/Makefile.am @@ -0,0 +1,32 @@ +MAINTAINERCLEANFILES = Makefile.in + +if USE_INCLUDED_LIBINTL +AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/lpe" -I$(top_srcdir)/intl +else +AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" +endif + +AM_CPPFLAGS += -DDATADIR=\"$(datadir)/lpe\" -DPLUGINDIR=\"$(libdir)/lpe\" \ + -I$(top_srcdir)/src + +noinst_LTLIBRARIES = liblpe_utils.la + +liblpe_utils_la_SOURCES = \ + buffer.c buffer.h \ + cfg-core.c cfg-core.h \ + cfg.c cfg.h \ + common.c common.h \ + exports.c exports.h \ + genmode.c genmode.h \ + help.c help.h \ + input.c input.h \ + lpecomm.c lpecomm.h \ + lpe.c lpe.h \ + minibuf.c minibuf.h \ + mode-utils.c mode-utils.h \ + strfuncs.c strfuncs.h \ + screen.c screen.h + +liblpe_utils_la_LIBADD = @LIBINTL@ @INTLOBJS@ @DL_LIB@ @SLANG_LIB@ -lncurses -ltinfo +liblpe_utils_la_LDFLAGS = @lpe_LDFLAGS@ -no-undefined +liblpe_utils_la_DEPENDENCIES = @lpe_DEPS@ @INTLOBJS@ diff --git a/src/buffer.c b/src/utils/buffer.c similarity index 100% rename from src/buffer.c rename to src/utils/buffer.c diff --git a/src/buffer.h b/src/utils/buffer.h similarity index 100% rename from src/buffer.h rename to src/utils/buffer.h diff --git a/src/cfg-core.c b/src/utils/cfg-core.c similarity index 100% rename from src/cfg-core.c rename to src/utils/cfg-core.c diff --git a/src/cfg-core.h b/src/utils/cfg-core.h similarity index 100% rename from src/cfg-core.h rename to src/utils/cfg-core.h diff --git a/src/cfg.c b/src/utils/cfg.c similarity index 100% rename from src/cfg.c rename to src/utils/cfg.c diff --git a/src/cfg.h b/src/utils/cfg.h similarity index 100% rename from src/cfg.h rename to src/utils/cfg.h diff --git a/src/common.c b/src/utils/common.c similarity index 100% rename from src/common.c rename to src/utils/common.c diff --git a/src/common.h b/src/utils/common.h similarity index 100% rename from src/common.h rename to src/utils/common.h diff --git a/src/exports.c b/src/utils/exports.c similarity index 100% rename from src/exports.c rename to src/utils/exports.c diff --git a/src/exports.h b/src/utils/exports.h similarity index 100% rename from src/exports.h rename to src/utils/exports.h diff --git a/src/genmode.c b/src/utils/genmode.c similarity index 100% rename from src/genmode.c rename to src/utils/genmode.c diff --git a/src/genmode.h b/src/utils/genmode.h similarity index 100% rename from src/genmode.h rename to src/utils/genmode.h diff --git a/src/help.c b/src/utils/help.c similarity index 100% rename from src/help.c rename to src/utils/help.c diff --git a/src/help.h b/src/utils/help.h similarity index 100% rename from src/help.h rename to src/utils/help.h diff --git a/src/input.c b/src/utils/input.c similarity index 100% rename from src/input.c rename to src/utils/input.c diff --git a/src/input.h b/src/utils/input.h similarity index 100% rename from src/input.h rename to src/utils/input.h diff --git a/src/lpe.c b/src/utils/lpe.c similarity index 100% rename from src/lpe.c rename to src/utils/lpe.c diff --git a/src/lpe.h b/src/utils/lpe.h similarity index 100% rename from src/lpe.h rename to src/utils/lpe.h diff --git a/src/lpecomm.c b/src/utils/lpecomm.c similarity index 100% rename from src/lpecomm.c rename to src/utils/lpecomm.c diff --git a/src/lpecomm.h b/src/utils/lpecomm.h similarity index 100% rename from src/lpecomm.h rename to src/utils/lpecomm.h diff --git a/src/minibuf.c b/src/utils/minibuf.c similarity index 100% rename from src/minibuf.c rename to src/utils/minibuf.c diff --git a/src/minibuf.h b/src/utils/minibuf.h similarity index 100% rename from src/minibuf.h rename to src/utils/minibuf.h diff --git a/src/mode-utils.c b/src/utils/mode-utils.c similarity index 100% rename from src/mode-utils.c rename to src/utils/mode-utils.c diff --git a/src/mode-utils.h b/src/utils/mode-utils.h similarity index 100% rename from src/mode-utils.h rename to src/utils/mode-utils.h diff --git a/src/screen.c b/src/utils/screen.c similarity index 100% rename from src/screen.c rename to src/utils/screen.c diff --git a/src/screen.h b/src/utils/screen.h similarity index 100% rename from src/screen.h rename to src/utils/screen.h diff --git a/src/strfuncs.c b/src/utils/strfuncs.c similarity index 100% rename from src/strfuncs.c rename to src/utils/strfuncs.c diff --git a/src/strfuncs.h b/src/utils/strfuncs.h similarity index 100% rename from src/strfuncs.h rename to src/utils/strfuncs.h