[Libreoffice-commits] .: 9 commits - cppu/source i18npool/Executable_gencoll_rule.mk i18npool/Library_i18npool.mk i18npool/source RepositoryExternal.mk solenv/gbuild

Tor Lillqvist tml at kemper.freedesktop.org
Fri Aug 19 08:01:47 PDT 2011


 RepositoryExternal.mk                           |    4 +-
 cppu/source/typelib/typelib.cxx                 |    2 -
 i18npool/Executable_gencoll_rule.mk             |    2 -
 i18npool/Library_i18npool.mk                    |    2 -
 i18npool/source/breakiterator/gendict.cxx       |    8 ++--
 i18npool/source/collator/gencoll_rule.cxx       |   11 +++--
 i18npool/source/indexentry/genindex_data.cxx    |    8 ++--
 i18npool/source/localedata/Makefile             |    4 +-
 i18npool/source/textconversion/genconv_dict.cxx |    8 ++--
 solenv/gbuild/gbuild_simple.mk                  |   45 ++++++++++++++++++++++++
 solenv/gbuild/platform/windows.mk               |   12 ++----
 11 files changed, 75 insertions(+), 31 deletions(-)

New commits:
commit d62e4809df73a9f871b72ff2a2a7d5cb8fcdb86f
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 17:52:48 2011 +0300

    Use cygpath -m on Windows where necessary
    
    We can't pass Cygwin pathnames to non-Cygwin programs.

diff --git a/i18npool/source/localedata/Makefile b/i18npool/source/localedata/Makefile
old mode 100644
new mode 100755
index 1b70c8d..6bfbbb3
--- a/i18npool/source/localedata/Makefile
+++ b/i18npool/source/localedata/Makefile
@@ -38,8 +38,8 @@ localedata_%.cxx : localedata_%_invis.cxx
 
 localedata_%_invis.cxx : $(realpath $(SRC_ROOT)/i18npool/source/localedata/data)/%.xml saxparser.rdb
 ifeq ($(OS_FOR_BUILD),WNT)
-	$(gb_Helper_execute)saxparser $* `cygpath -w $<` $@ \
-		$(my_file)`cygpath -m $(WORKDIR)/CustomTarget/i18npool/source/localedata/saxparser.rdb` `cygpath -w $(OUTDIR)/bin/types.rdb` \
+	$(gb_Helper_execute)saxparser $* `cygpath -m $<` $@ \
+		$(my_file)`cygpath -m $(WORKDIR)/CustomTarget/i18npool/source/localedata/saxparser.rdb` `cygpath -m $(OUTDIR)/bin/types.rdb` \
 		-env:OOO_INBUILD_SHAREDLIB_DIR=$(my_file)`cygpath -m $(OUTDIR)/bin`
 else
 	$(gb_Helper_execute)saxparser $* $< $@ \
diff --git a/i18npool/source/textconversion/Makefile b/i18npool/source/textconversion/Makefile
old mode 100644
new mode 100755
commit a72c7acad90f9431c3b800327734ea00458dc3a0
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 17:50:40 2011 +0300

    Improve input and output file open error handling
    
    Tell file name and actual error in error message. Print error message
    to stderr. Always exit with failure when not able to open an input or
    output file.

diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx
index ab181be..369d4f8 100644
--- a/i18npool/source/breakiterator/gendict.cxx
+++ b/i18npool/source/breakiterator/gendict.cxx
@@ -209,8 +209,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
     dictionary_fp = fopen(argv[1], "rb");   // open the source file for read;
     if (dictionary_fp == NULL)
     {
-        printf("Open the dictionary source file failed.");
-        return -1;
+        fprintf(stderr, "Opening the dictionary source file %s for reading failed: %s\n", argv[1], strerror(errno));
+        exit(1);
     }
 
     if(argc == 2)
@@ -221,8 +221,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         source_fp = fopen(argv[2], "wb");
         if (source_fp == NULL) {
             fclose(dictionary_fp);
-            printf("Can't create the C source file.");
-            return -1;
+            fprintf(stderr, "Opening %s for writing failed: %s\n", argv[2], strerror(errno));
+            exit(1);
         }
     }
 
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index c678230..9f0ae9e 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -48,8 +48,8 @@ void data_write(char* file, char* name, sal_uInt8 *data, sal_Int32 len)
 {
     FILE *fp = fopen(file, "wb");
     if (fp == NULL) {
-        printf("Can't create the C source file.");
-        return;
+        fprintf(stderr, "Opening %s for writing failed: %s\n", file, strerror(errno));
+        exit(1);
     }
 
     fprintf(fp, "/*\n");
@@ -87,9 +87,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
     if (argc < 4) exit(-1);
 
     fp = fopen(argv[1], "rb");  // open the source file for read;
-    if (fp == NULL)
-        printf("Open the rule source file failed.");
-
+    if (fp == NULL){
+        fprintf(stderr, "Opening the rule source file %s for reading failed: %s\n", argv[1], strerror(errno));
+        exit(1);
+    }
 
     sal_Char str[1024];
     OUStringBuffer Obuf;
diff --git a/i18npool/source/indexentry/genindex_data.cxx b/i18npool/source/indexentry/genindex_data.cxx
index 48ae025..8542453 100644
--- a/i18npool/source/indexentry/genindex_data.cxx
+++ b/i18npool/source/indexentry/genindex_data.cxx
@@ -51,8 +51,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 
     fp = fopen(argv[1], "rb");  // open the source file for read;
     if (fp == NULL) {
-        printf("Open the rule source file failed.");
-        return 1;
+        fprintf(stderr, "Opening the rule source file %s for reading failed: %s\n", argv[1], strerror(errno));
+        exit(1);
     }
 
 
@@ -97,8 +97,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 
     fp = fopen(argv[2], "wb");
     if (fp == NULL) {
-        printf("Can't create the C source file.");
-        return 1;
+        fprintf(stderr, "Opening %s for writing failed: %s\n", argv[2], strerror(errno));
+        exit(1);
     }
 
     fprintf(fp, "/*\n");
diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx
index 50c9fcf..3882f60 100644
--- a/i18npool/source/textconversion/genconv_dict.cxx
+++ b/i18npool/source/textconversion/genconv_dict.cxx
@@ -57,16 +57,16 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
     sfp = fopen(argv[2], "rb"); // open the source file for read;
     if (sfp == NULL)
     {
-        printf("Open the dictionary source file failed.");
-        return -1;
+        fprintf(stderr, "Opening the dictionary source file %s for reading failed: %s\n", argv[1], strerror(errno));
+        exit(1);
     }
 
     // create the C source file to write
     cfp = fopen(argv[3], "wb");
     if (cfp == NULL) {
         fclose(sfp);
-        printf("Can't create the C source file.");
-        return -1;
+        fprintf(stderr, "Opening %s for writing failed: %s\n", argv[3], strerror(errno));
+        exit(1);
     }
 
     fprintf(cfp, "/*\n");
commit bb58d59e6479b8f2548574a561c64a17601b15a1
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 17:43:33 2011 +0300

    Correct spelling of gb_Library_get_linktargetname, no double underscores

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 6ca1178..93d0df2 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -510,8 +510,8 @@ $(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_targ
 endef
 
 define gb_Library_add_nativeres
-$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2))
-$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2))
+$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktargetname,$(1))) : $(call gb_WinResTarget_get_target,$(1)/$(2))
+$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktargetname,$(1))) : NATIVERES += $(call gb_WinResTarget_get_target,$(1)/$(2))
 
 endef
 
commit 691f53959e3ec034cedcd15c3f7044a141b42878
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 17:22:14 2011 +0300

    Use -NODEFAULTLIB for dbgutil build and link with kernel32 and user32
    
    This avoids warnings about linking both with normal and debugging
    runtime. Matches more closely what the old build system does.

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 875b431..6ca1178 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -383,11 +383,12 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
 		$(if $(filter YES,$(gb_Executable_TARGETGUI)), -SUBSYSTEM:WINDOWS, -SUBSYSTEM:CONSOLE) \
 		$(T_LDFLAGS) \
+		$(if $(gb_PRODUCT),,-NODEFAULTLIB) \
 		@$${RESPONSEFILE} \
 		$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))) \
 		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_filename,$(lib))) \
 		$(LIBS) \
-		$(if $(gb_PRODUCT),,msvcrtd.lib msvcprtd.lib) \
+		$(if $(gb_PRODUCT),,msvcrtd.lib msvcprtd.lib kernel32.lib user32.lib) \
 		$(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); RC=$$?; rm $${RESPONSEFILE} \
 	$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit $$RC)
 endef
commit 9cf309c4f0c85a1db0f470b389a1e4a1752204f0
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 17:19:20 2011 +0300

    There is no gb_Object__command_deponcompile and we do deps another way anyway

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 33c6148..875b431 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -277,7 +277,6 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		$(INCLUDE) \
 		-c $(realpath $(3)) \
 		-Fo$(1)) $(call gb_create_deps,$(1),$(4),$(realpath $(3)))
-$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CFLAGS),$(INCLUDE))
 endef
 
 
@@ -298,7 +297,6 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		$(INCLUDE_STL) $(INCLUDE) \
 		-c $(realpath $(3)) \
 		-Fo$(1)) $(call gb_create_deps,$(1),$(4),$(realpath $(3)))
-$(call gb_Object__command_deponcompile,$(1),$(4),$(3),$(DEFS),$(T_CXXFLAGS),$(INCLUDE))
 endef
 
 
@@ -350,7 +348,6 @@ $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) $(dir $(4)) && \
 	$(ML_EXE) $(gb_AFLAGS) -D$(COM) /Fo$(1) $(3)) && \
 	echo "$(1) : $(realpath $(3))" > $(4)
-$(call gb_Object__command_deponcompile,$(1),$(4),$(3),,,)
 endef
 
 
commit 2653715b5298e3f59b2f1a6cbb1f7fddccad0a11
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 17:10:40 2011 +0300

    Remove bogus whitespace on empty line

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 3e63be3..33c6148 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -203,7 +203,7 @@ gb_LinkTarget_LDFLAGS := \
 	-nxcompat \
 	-dynamicbase \
 	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
-	
+
 gb_DEBUG_CFLAGS := -Zi
 
 # this does not use CFLAGS so it is not overridable
commit ac8b13ee79ba31806124b215de7a1149144d0b11
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 17:09:04 2011 +0300

    Set debug- and dbgutil-related variables here, too

diff --git a/solenv/gbuild/gbuild_simple.mk b/solenv/gbuild/gbuild_simple.mk
index 721bef7..a84e234 100644
--- a/solenv/gbuild/gbuild_simple.mk
+++ b/solenv/gbuild/gbuild_simple.mk
@@ -33,6 +33,51 @@ include $(GBUILDDIR)/Output.mk
 # BuildDirs uses the Output functions already
 include $(GBUILDDIR)/BuildDirs.mk
 
+# Presumably the common parts in gbuild.mk and gbuild_simple.mk should
+# be factored out into one file instead of duplicating, but... perhaps
+# wait until this stabilizes a bit and we know with more certainty
+# what is needed in both.
+
+# Or alternatively: Just mark these variables for export in gbuild.mk?
+# I think any use of gbuild_simple.mk is in a sub-make under one that
+# uses gbuild.mk anyway.
+
+# gb_PRODUCT is used by windows.mk to decide which C/C++ runtime to
+# link with.
+ifneq ($(strip $(PRODUCT)$(product)),)
+gb_PRODUCT := $(true)
+else
+ifneq ($(strip $(product)),)
+gb_PRODUCT := $(true)
+else
+gb_PRODUCT := $(false)
+endif
+endif
+
+# These are useful, too, for stuff built in "custom" Makefiles
+ifneq ($(strip $(ENABLE_SYMBOLS)$(enable_symbols)),)
+gb_SYMBOL := $(true)
+else
+gb_SYMBOL := $(false)
+endif
+
+gb_DEBUGLEVEL := 0
+ifneq ($(strip $(DEBUG)$(debug)),)
+gb_DEBUGLEVEL := 1
+endif
+
+ifneq ($(strip $(DBGLEVEL)$(dbglevel)),)
+ifneq ($(strip $(dbglevel)),)
+gb_DEBUGLEVEL := $(strip $(dbglevel))
+else
+gb_DEBUGLEVEL := $(strip $(DBGLEVEL))
+endif
+endif
+
+ifneq ($(gb_DEBUGLEVEL),0)
+gb_SYMBOL := $(true)
+endif
+
 include $(GBUILDDIR)/Helper.mk
 
 ifeq ($(OS),LINUX)
commit a3bad2855032fb2742feea1e0e350297d41f69fe
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 17:02:41 2011 +0300

    I am tired of thesee assertions, put them behind dbglevel>2

diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 6740dd5..9403de9 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -338,7 +338,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
         delete pWeakMap;
         pWeakMap = 0;
     }
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 2
     OSL_ENSURE( !nTypeDescriptionCount, "### nTypeDescriptionCount is not zero" );
     OSL_ENSURE( !nCompoundTypeDescriptionCount, "### nCompoundTypeDescriptionCount is not zero" );
     OSL_ENSURE( !nUnionTypeDescriptionCount, "### nUnionTypeDescriptionCount is not zero" );
commit bdfca5e003eea0462cf15c3374afce01c2f46906
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 19 12:38:09 2011 +0300

    The shorter icu library names are used for WNTMSC only

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index ee69337..08c34dc 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -372,8 +372,8 @@ endef
 
 else # !SYSTEM_ICU
 
-# icudata and icui18n is called icudt and icuin on Windows :-(
-ifeq ($(OS),WNT)
+# icudata and icui18n is called icudt and icuin when built with MSVC :-(
+ifeq ($(OS)$(COM),WNTMSC)
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
 	icudt \
 	icuin \
diff --git a/i18npool/Executable_gencoll_rule.mk b/i18npool/Executable_gencoll_rule.mk
index a899976..e03d8b0 100644
--- a/i18npool/Executable_gencoll_rule.mk
+++ b/i18npool/Executable_gencoll_rule.mk
@@ -41,7 +41,7 @@ $(eval $(call gb_Executable_add_linked_libs,gencoll_rule,\
 	$(gb_STDLIBS) \
 ))
 
-ifeq ($(OS),WNT)
+ifeq ($(OS)$(COM),WNTMSC)
 $(eval $(call gb_Executable_use_externals,gencoll_rule,\
 	icudt \
 	icuin \
diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk
index 982e43e..ba5cae5 100644
--- a/i18npool/Library_i18npool.mk
+++ b/i18npool/Library_i18npool.mk
@@ -56,7 +56,7 @@ $(eval $(call gb_Library_add_linked_libs,i18npool,\
 	$(gb_STDLIBS) \
 ))
 
-ifeq ($(OS),WNT)
+ifeq ($(OS)$(COM),WNTMSC)
 $(eval $(call gb_Library_use_externals,i18npool,\
 	icuin \
 	icuuc \


More information about the Libreoffice-commits mailing list