summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-03-11 21:43:04 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-07-02 19:03:10 -0300
commit2f7992eaefb19f23c127e15624ba38208c03439b (patch)
tree061d365af23a69f1b942d7087bf6173cda57c57a /Makefile.am
parent19e3f51f9758e2708fb4abfa364b346591089bcd (diff)
Update build for sane defaults.
Check for existing system functions. Don't add test program sources with main functions to libraries. Build test programs.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am59
1 files changed, 42 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am
index f698010..7da5d92 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,11 +19,9 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-XEDITDIR = ${libdir}/X11/xedit
-xedit_lispdir = ${XEDITDIR}/lisp
-
bin_PROGRAMS = xedit
noinst_LIBRARIES = liblisp.a libre.a libmp.a
+noinst_PROGRAMS = lisp/lsp lisp/re/tests
#
# libmp.a
@@ -40,8 +38,7 @@ libmp_a_SOURCES = \
# liblisp.a
#
-liblisp_a_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(xedit_lispdir)\" $(XEDIT_CFLAGS)
-liblisp_a_LIBADD = libmp.a
+liblisp_a_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(LISPDIR)\" $(PKGDEPS_CFLAGS)
liblisp_a_SOURCES = \
lisp/bytecode.c \
lisp/bytecode.h \
@@ -60,7 +57,6 @@ liblisp_a_SOURCES = \
lisp/io.h \
lisp/lisp.c \
lisp/lisp.h \
- lisp/lsp.c \
lisp/math.c \
lisp/math.h \
lisp/package.c \
@@ -87,6 +83,10 @@ liblisp_a_SOURCES = \
lisp/xedit.c \
lisp/xedit.h
+if NEED_UNSETENV
+liblisp_a_SOURCES += lisp/env.c
+endif
+
#
# libre.a
#
@@ -97,15 +97,14 @@ libre_a_SOURCES = \
lisp/re/rec.c \
lisp/re/re.h \
lisp/re/reo.c \
- lisp/re/rep.h \
- lisp/re/tests.c
+ lisp/re/rep.h
#
# xedit
#
-xedit_CFLAGS = $(XEDIT_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE -DXEDIT
-xedit_LDADD = libre.a liblisp.a libmp.a $(XEDIT_LIBS) -lm
+xedit_CFLAGS = $(PKGDEPS_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE -DXEDIT
+xedit_LDADD = -L. -lre -llisp -lmp $(PKGDEPS_LIBS) -lm
xedit_SOURCES = \
commands.c \
@@ -113,13 +112,19 @@ xedit_SOURCES = \
ispell.c \
lisp.c \
options.c \
- realpath.c \
- strcasecmp.c \
util.c \
xedit.c \
xedit.h
-if XAW_USE_XPRINT
+if NEED_REALPATH
+xedit_SOURCES += realpath.c
+endif
+
+if NEED_STRCASECMP
+xedit_SOURCES += strcasecmp.c
+endif
+
+if USE_XPRINT
xedit_CFLAGS += -DINCLUDE_XPRINT_SUPPORT
xedit_SOURCES += \
@@ -130,13 +135,33 @@ xedit_SOURCES += \
print.h
endif
+# lisp/lsp
+lisp_lsp_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"@LISPDIR@\" -D_BSD_SOURCE
+lisp_lsp_LDADD = -L. -llisp -lre -lmp -lm
+lisp_lsp_SOURCES = \
+ lisp/lsp.c
+
+if NEED_REALPATH
+lisp_lsp_SOURCES += realpath.c
+endif
+
+if NEED_STRCASECMP
+lisp_lsp_SOURCES += strcasecmp.c
+endif
+
+# re/tests
+lisp_re_tests_CFLAGS = -I$(top_srcdir)/lisp/re -D_BSD_SOURCE
+lisp_re_tests_LDADD = -L. -lre
+lisp_re_tests_SOURCES = lisp/re/tests.c
+
+
# App default files (*.ad)
APPDEFAULTFILES = \
Xedit-color \
Xedit
-if XAW_USE_XPRINT
+if USE_XPRINT
Xedit.ad:
cp $(top_srcdir)/Xedit-xprint.ad Xedit.ad
else
@@ -154,13 +179,13 @@ appdefault_DATA = $(APPDEFAULTFILES)
CLEANFILES = $(APPDEFAULTFILES) Xedit.ad
-# Note that xedit_lispdir is defined above
-dist_xedit_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \
+lispdir = $(LISPDIR)
+dist_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \
${srcdir}/lisp/modules/xedit.lsp \
${srcdir}/lisp/modules/syntax.lsp \
${srcdir}/lisp/modules/indent.lsp
-progmodesdir = $(xedit_lispdir)/progmodes
+progmodesdir = $(LISPDIR)/progmodes
dist_progmodes_DATA = ${srcdir}/lisp/modules/progmodes/c.lsp \
${srcdir}/lisp/modules/progmodes/html.lsp \
${srcdir}/lisp/modules/progmodes/imake.lsp \