Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch/libdecnumber] Fix to compile with Solaris make
@ 2007-11-07 20:20 Thiago Jung Bauermann
  2007-11-09  0:06 ` Ben Elliston
  0 siblings, 1 reply; 4+ messages in thread
From: Thiago Jung Bauermann @ 2007-11-07 20:20 UTC (permalink / raw)
  To: gcc-patches; +Cc: gdb-patches, Bobo

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

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

[-- Attachment #2: fix-solaris-build.diff --]
[-- Type: text/x-patch, Size: 3000 bytes --]

2007-11-07  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* 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:

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

end of thread, other threads:[~2007-12-05  0:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-07 20:20 [patch/libdecnumber] Fix to compile with Solaris make Thiago Jung Bauermann
2007-11-09  0:06 ` Ben Elliston
     [not found]   ` <20071126181443.GA18608@vervain.rchland.ibm.com>
2007-12-04 20:04     ` Thiago Jung Bauermann
2007-12-05  0:34       ` Ben Elliston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox