This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch/libdecnumber] Remove GNUism from Makefile.in
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Sat, 27 Oct 2007 12:22:13 -0200
- Subject: [patch/libdecnumber] Remove GNUism from Makefile.in
Hi,
The attached patch permits libdecnumber to be compiled by a non-GNU
make. I realise that gcc requires GNU make for the build, but recently
libdecnumber has been incorporated in GDB to enable DFP debugging, and
GDB doesn't require GNU make.
The change is to substitute the "ifeq" condition to determine inclusion
of BID-related objects in the library by a variable which is set by the
configure script.
Is this ok?
--
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center
2007-10-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
* configure.ac: Add ADDITIONAL_OBJS variable.
* Makefile.in (bid_OBS): New.
(libdecnumber_a_OBJS): Add ADDITIONAL_OBJS, remove condition
on enable_decimal_float.
* configure: Regenerate.
Index: libdecnumber/configure.ac
===================================================================
--- libdecnumber.orig/configure.ac 2007-10-26 18:15:47.000000000 -0200
+++ libdecnumber/configure.ac 2007-10-26 18:16:02.000000000 -0200
@@ -113,8 +113,16 @@ if test x$enable_decimal_float = xyes -o
esac
fi
+# If BID is being used, additional objects should be linked in.
+if test x$enable_decimal_float = xbid; then
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(bid_OBJS)"
+else
+ ADDITIONAL_OBJS=
+fi
+
AC_MSG_RESULT($enable_decimal_float)
AC_SUBST(enable_decimal_float)
+AC_SUBST(ADDITIONAL_OBJS)
AC_C_BIGENDIAN
Index: libdecnumber/Makefile.in
===================================================================
--- libdecnumber.orig/Makefile.in 2007-10-26 18:17:04.000000000 -0200
+++ libdecnumber/Makefile.in 2007-10-26 18:24:59.000000000 -0200
@@ -50,19 +50,18 @@ libdir = @libdir@
localedir = $(datadir)/locale
prefix = @prefix@
+ADDITIONAL_OBJS = @ADDITIONAL_OBJS@
+
enable_decimal_float= @enable_decimal_float@
INCLUDES = -I$(srcdir) -I.
ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
-libdecnumber_a_OBJS = decNumber.o decContext.o \
- decimal32.o decimal64.o decimal128.o
+bid_OBJS = bid2dpd_dpd2bid.o host-ieee32.o host-ieee64.o host-ieee128.o
-ifeq ($(enable_decimal_float),bid)
-libdecnumber_a_OBJS+=bid2dpd_dpd2bid.o host-ieee32.o host-ieee64.o \
- host-ieee128.o
-endif
+libdecnumber_a_OBJS = decNumber.o decContext.o \
+ decimal32.o decimal64.o decimal128.o $(ADDITIONAL_OBJS)
libdecnumber_a_SOURCES = decContext.c decContext.h decDPD.h \
decNumber.c decNumber.h decNumberLocal.h \