[Bug java/23292] New: libjava build fails with recent version of GNU Make

matria at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 8 20:21:00 GMT 2005


The latest beta of GNU Make (3.81beta3) introduced `secondary expansions',
performed on all prerequisites of all targets. This breaks the Makefile in the
`libjava' directory because the `$$' in the `inner_nat_headers' variable are
expanded twice. The following fixed it for me:

--- Makefile.am 2005-04-27 21:34:20.000000000 -0400
+++ Makefile.am.fixed   2005-08-08 16:11:45.599005993 -0400
@@ -727,7 +727,7 @@
     $(ordinary_java_source_files:.java=.h) \
     $(built_java_source_files:.java=.h)

-inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
+_inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
        java/io/ObjectInputStream$$GetField.h \
        java/nio/DirectByteBufferImpl$$ReadWrite.h \
        java/nio/channels/Pipe$$SinkChannel.h \
@@ -740,6 +740,12 @@
        gnu/java/nio/PipeImpl$$SourceChannelImpl.h \
        $(PLATFORM_INNER_NAT_HDRS)

+ifeq ($(findstring second-expansion,$(.FEATURES)),)
+  inner_nat_headers = $(_inner_nat_headers)
+else
+  inner_nat_headers = $$(_inner_nat_headers)
+endif
+
 nat_headers = $(ordinary_nat_headers) $(inner_nat_headers)
gnu/gcj/tools/gcj_dbtool/Main.h
 nat_headers_install = $(ordinary_nat_headers)

-- 
           Summary: libjava build fails with recent version of GNU Make
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: matria at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23292



More information about the Java-prs mailing list