From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15626 invoked by alias); 7 Nov 2007 20:20:33 -0000 Received: (qmail 15606 invoked by uid 22791); 7 Nov 2007 20:20:32 -0000 X-Spam-Check-By: sourceware.org Received: from igw3.br.ibm.com (HELO igw3.br.ibm.com) (32.104.18.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Nov 2007 20:20:28 +0000 Received: from mailhub3.br.ibm.com (unknown [9.18.232.110]) by igw3.br.ibm.com (Postfix) with ESMTP id D577C390246 for ; Wed, 7 Nov 2007 18:13:16 -0200 (BRDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.6) with ESMTP id lA7KKDn82084978 for ; Wed, 7 Nov 2007 18:20:19 -0200 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id lA7KKDuP019087 for ; Wed, 7 Nov 2007 18:20:13 -0200 Received: from [9.18.238.251] (dyn532128.br.ibm.com [9.18.238.251]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id lA7KKDjl019083; Wed, 7 Nov 2007 18:20:13 -0200 Subject: [patch/libdecnumber] Fix to compile with Solaris make From: Thiago Jung Bauermann To: gcc-patches Cc: gdb-patches , Bobo Content-Type: multipart/mixed; boundary="=-UTwDCHxmXtgIl5AeXR+N" Date: Wed, 07 Nov 2007 20:20:00 -0000 Message-Id: <1194466816.6746.41.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00139.txt.bz2 --=-UTwDCHxmXtgIl5AeXR+N Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 773 Hi folks, My previous patch to the libdecnumber build system enabled libdecnumber to be built by native make on *BSD, but Solaris' make still doens't work. The problem is that in that version of make, the $< automatic variable is not set for targets that have an explicit compilation rule instead of using the .c.o default rule. This patch substitutes the $< variable for the explicit name of the source file which should be compiled in those targets that define a compilation rule. It also prepends $(srcdir) to the path of files that reside in a subdirectory of the libdecnumber source tree, for completeness. I tested by compiling libdecnumber on Solaris, Linux and OpenBSD. Is this ok? -- []'s Thiago Jung Bauermann Software Engineer IBM Linux Technology Center --=-UTwDCHxmXtgIl5AeXR+N Content-Disposition: attachment; filename=fix-solaris-build.diff Content-Type: text/x-patch; name=fix-solaris-build.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 3000 2007-11-07 Thiago Jung Bauermann * Makefile.in (decimal32.o): Prepend $(srcdir) to dependencies and substitute $< for the source file in compilation command. (decimal64.o): Likewise. (decimal128.o): Likewise. (bid2dpd_dpd2bid.o): Likewise. (host-ieee32.o): Likewise. (host-ieee64.o): Likewise. (host-ieee128.o): Likewise. Index: libdecnumber/Makefile.in =================================================================== --- libdecnumber.orig/Makefile.in 2007-11-07 15:40:51.000000000 -0200 +++ libdecnumber/Makefile.in 2007-11-07 15:55:17.000000000 -0200 @@ -115,30 +115,30 @@ decContext.o: decContext.c decContext.h decContextSymbols.h decNumber.o: decNumber.c decNumber.h decContext.h decNumberLocal.h \ decNumberSymbols.h -decimal32.o: $(enable_decimal_float)/decimal32.c \ - $(enable_decimal_float)/decimal32.h \ - $(enable_decimal_float)/decimal32Symbols.h \ +decimal32.o: $(srcdir)/$(enable_decimal_float)/decimal32.c \ + $(srcdir)/$(enable_decimal_float)/decimal32.h \ + $(srcdir)/$(enable_decimal_float)/decimal32Symbols.h \ decNumber.h decContext.h decNumberLocal.h - $(COMPILE) $< -decimal64.o: $(enable_decimal_float)/decimal64.c \ - $(enable_decimal_float)/decimal64.h \ - $(enable_decimal_float)/decimal64Symbols.h \ + $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal32.c +decimal64.o: $(srcdir)/$(enable_decimal_float)/decimal64.c \ + $(srcdir)/$(enable_decimal_float)/decimal64.h \ + $(srcdir)/$(enable_decimal_float)/decimal64Symbols.h \ decNumber.h decContext.h decNumberLocal.h - $(COMPILE) $< -decimal128.o: $(enable_decimal_float)/decimal128.c \ - $(enable_decimal_float)/decimal128.h \ - $(enable_decimal_float)/decimal128Symbols.h\ - $(enable_decimal_float)/decimal128Local.h\ + $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal64.c +decimal128.o: $(srcdir)/$(enable_decimal_float)/decimal128.c \ + $(srcdir)/$(enable_decimal_float)/decimal128.h \ + $(srcdir)/$(enable_decimal_float)/decimal128Symbols.h\ + $(srcdir)/$(enable_decimal_float)/decimal128Local.h\ decNumber.h decContext.h decNumberLocal.h - $(COMPILE) $< -bid2dpd_dpd2bid.o : bid/bid2dpd_dpd2bid.c bid/bid2dpd_dpd2bid.h - $(COMPILE) $< -host-ieee32.o : bid/host-ieee32.c bid/decimal32.h - $(COMPILE) $< -host-ieee64.o : bid/host-ieee64.c bid/decimal64.h - $(COMPILE) $< -host-ieee128.o : bid/host-ieee128.c bid/decimal128.h - $(COMPILE) $< + $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal128.c +bid2dpd_dpd2bid.o : $(srcdir)/bid/bid2dpd_dpd2bid.c $(srcdir)/bid/bid2dpd_dpd2bid.h + $(COMPILE) $(srcdir)/bid/bid2dpd_dpd2bid.c +host-ieee32.o : $(srcdir)/bid/host-ieee32.c $(srcdir)/bid/decimal32.h + $(COMPILE) $(srcdir)/bid/host-ieee32.c +host-ieee64.o : $(srcdir)/bid/host-ieee64.c $(srcdir)/bid/decimal64.h + $(COMPILE) $(srcdir)/bid/host-ieee64.c +host-ieee128.o : $(srcdir)/bid/host-ieee128.c $(srcdir)/bid/decimal128.h + $(COMPILE) $(srcdir)/bid/host-ieee128.c # Other miscellaneous targets. mostlyclean: --=-UTwDCHxmXtgIl5AeXR+N--