public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch/libdecnumber] Remove GNUism from Makefile.in
@ 2007-10-27 15:37 Thiago Jung Bauermann
  2007-10-29 11:12 ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Thiago Jung Bauermann @ 2007-10-27 15:37 UTC (permalink / raw)
  To: gcc-patches; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

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


[-- Attachment #2: remove-gnuism.diff --]
[-- Type: text/x-patch, Size: 1894 bytes --]

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 \

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-31 18:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-27 15:37 [patch/libdecnumber] Remove GNUism from Makefile.in Thiago Jung Bauermann
2007-10-29 11:12 ` Paolo Bonzini
2007-10-30 15:30   ` Thiago Jung Bauermann
2007-10-31 21:01     ` Janis Johnson
2007-10-31 21:05       ` Thiago Jung Bauermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).