Author: borisk
Date: Mon Jun 23 03:57:28 2008
New Revision: 670516

URL: http://svn.apache.org/viewvc?rev=670516&view=rev
Log:
Add root_res.o to the library if it is produced by the ICU makefile. Hopefully 
fixes XERCESC-1812.

Added:
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/root_res_dummy.cpp 
  (with props)
Modified:
    xerces/c/trunk/src/Makefile.am
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in

Modified: xerces/c/trunk/src/Makefile.am
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/src/Makefile.am?rev=670516&r1=670515&r2=670516&view=diff
==============================================================================
--- xerces/c/trunk/src/Makefile.am (original)
+++ xerces/c/trunk/src/Makefile.am Mon Jun 23 03:57:28 2008
@@ -135,7 +135,8 @@
 AM_CPPFLAGS += -I${ICU_PREFIX}/include
 
 SUBDIRS += xercesc/util/MsgLoaders/ICU/resources
-libxerces_c_la_LIBADD += 
xercesc/util/MsgLoaders/ICU/resources/xercesc_messages.lo
+libxerces_c_la_LIBADD += 
xercesc/util/MsgLoaders/ICU/resources/xercesc_messages.lo \
+xercesc/util/MsgLoaders/ICU/resources/root_res.lo
 endif
 
 if XERCES_USE_MSGLOADER_ICONV

Modified: xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in?rev=670516&r1=670515&r2=670516&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in 
(original)
+++ xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/Makefile.in Mon 
Jun 23 03:57:28 2008
@@ -56,8 +56,9 @@
 # Resource shortname
 PKGNAME=xercesc_messages_$(INTERFACE_VER_U)
 
-# Resource files.  Add new ones for additional locales here.
-# keep in sync with the file RESLIST
+# Resource files.  Add new ones for additional locales here. Keep in sync
+# with the file RESLIST and don't forget to add the object file below.
+#
 RESFILES=root.res
 
 # list of resource bundles  - keep in sync with RESFILES
@@ -69,18 +70,23 @@
 all: xercesc_messages.lo
 
 # ICU makefiles use .o and .ao for non-PIC object file extensions
-# on different platforms. We need to account for that.
+# on different platforms. We need to account for that. Also on some
+# platforms ICU produces root_res.o. Overall, this is one hairy hack
+# to make ICU work with libtool. If you know of a better way to handle
+# this do let us ([EMAIL PROTECTED]) know.
 #
 xercesc_messages.lo: $(RESFILES)
 ifeq ($(BUILD_SHARED),yes)
-       @rm -f $(PKGNAME)_dat.o
+       @rm -f $(PKGNAME)_dat.o root_res.o
        $(PKGDATA) --name $(PKGNAME) --mode dll $(PKGDATAOPTS) $(RESLIST)
        mv $(PKGNAME)_dat.o $(PKGNAME)_dat-pic.o
+       @if test -f root_res.o; then mv root_res.o root_res-pic.o; fi
 endif
 ifeq ($(BUILD_STATIC),yes)
-       @rm -f $(PKGNAME)_dat.o $(PKGNAME)_dat.ao
+       @rm -f $(PKGNAME)_dat.o $(PKGNAME)_dat.ao root_res.o root_res.ao
        $(PKGDATA) --name $(PKGNAME) --mode static $(PKGDATAOPTS) $(RESLIST)
        @if test -f $(PKGNAME)_dat.ao; then mv $(PKGNAME)_dat.ao 
$(PKGNAME)_dat.o; fi
+       @if test -f root_res.ao; then mv root_res.ao root_res.o; fi
 endif
        @echo "# $@ - a libtool object file" >$@
        @echo "# Generated by `$(LIBTOOL) --version | \
@@ -96,6 +102,23 @@
 else
        @echo "non_pic_object=none" >>$@
 endif
+       @echo "# root_res.lo - a libtool object file" >root_res.lo
+       @echo "# Generated by `$(LIBTOOL) --version | \
+sed -e 's/^\([^ ]*\) (GNU \(.*\)) \(.*\)$$/\1 - GNU \2 \3/' -e q`" 
>>root_res.lo
+       @echo "" >>root_res.lo
+ifeq ($(BUILD_SHARED),yes)
+       @echo "pic_object='root_res-pic.o'" >>root_res.lo
+else
+       @echo "pic_object=none" >>root_res.lo
+endif
+ifeq ($(BUILD_STATIC),yes)
+       @echo "non_pic_object='root_res.o'" >>root_res.lo
+else
+       @echo "non_pic_object=none" >>root_res.lo
+endif
+       @if test ! -f root_res-pic.o -a ! -f root_res.o; then \
+$(LIBTOOL) --quiet --tag=CXX --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) \
+-c -o root_res.lo root_res_dummy.cpp; fi
 
 %.res: $(srcdir)/%.txt
        $(GENRB) $^
@@ -105,14 +128,15 @@
 # reason.
 #
 clean:
-       rm -f xercesc_messages.lo
+       rm -f xercesc_messages.lo root_res.lo
 ifeq ($(BUILD_SHARED),yes)
        $(PKGDATA) --name $(PKGNAME) --mode dll --clean $(PKGDATAOPTS) 
$(RESLIST)
-       rm -f $(PKGNAME)_dat-pic.o
+       rm -f $(PKGNAME)_dat-pic.o root_res-pic.o
+       rm -rf .libs
 endif
 ifeq ($(BUILD_STATIC),yes)
        $(PKGDATA) --name $(PKGNAME) --mode static --clean $(PKGDATAOPTS) 
$(RESLIST)
-       rm -f README_$(PKGNAME).txt
+       rm -f README_$(PKGNAME).txt root_res.o
 endif
        rm -f $(RESFILES)
        rm -f $(PKGNAME).dat
@@ -121,15 +145,16 @@
 # As a result, we cannot use pkgdata to clean up.
 #
 distclean:
-       rm -f xercesc_messages.lo
+       rm -f xercesc_messages.lo root_res.lo
        rm -f lib$(PKGNAME).so
        rm -f lib$(PKGNAME).a
-       rm -f $(PKGNAME)_dat*.o
+       rm -f $(PKGNAME)_dat*.o root_res*.o
        rm -f $(PKGNAME)*.lst
        rm -f $(PKGNAME)*.mak
        rm -f $(RESFILES)
        rm -f $(PKGNAME).dat
        rm -f README_$(PKGNAME).txt
+       rm -rf .libs
 
 #
 #
@@ -141,7 +166,7 @@
 distdir:
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       list='res-file-list.txt root.txt Makefile.in resources.mak'; \
+       list='res-file-list.txt root.txt Makefile.in resources.mak 
root_res_dummy.cpp'; \
          dist_files=`for file in $$list; do echo $$file; done | \
          sed -e "s|^$$srcdirstrip/||;t" \
              -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \

Added: 
xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/root_res_dummy.cpp
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/root_res_dummy.cpp?rev=670516&view=auto
==============================================================================
--- xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/root_res_dummy.cpp 
(added)
+++ xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/root_res_dummy.cpp 
Mon Jun 23 03:57:28 2008
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id: BitSet.cpp 474935 2006-11-14 19:41:33Z amassari $
+ */
+
+// Dummy file to create root_res.o when ICU does not produce one.
+//
+static void root_res_dummy ()
+{
+}

Propchange: 
xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/root_res_dummy.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/resources/root_res_dummy.cpp
------------------------------------------------------------------------------
    svn:keywords = 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to