[PATCH] build concat-deps as ordinary executable

Matúš Kukan (via_Code_Review) gerrit at gerrit.libreoffice.org
Mon Mar 11 01:20:14 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2659

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/59/2659/1

build concat-deps as ordinary executable

Change-Id: I6404472040f38c14ec7ca4a2c51be0d2f7f8199a
---
M Repository.mk
D solenv/CustomTarget_concat-deps.mk
A solenv/Executable_concat-deps.mk
M solenv/Module_solenv.mk
D solenv/Package_concat-deps.mk
M solenv/bin/concat-deps.c
6 files changed, 22 insertions(+), 44 deletions(-)



diff --git a/Repository.mk b/Repository.mk
index 95a69db..77fe0e1 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -33,6 +33,7 @@
     bmp \
     bmpsum \
     cfgex \
+	concat-deps \
     cpp \
     cppunit/cppunittester \
     $(call gb_Helper_optional,CRASHREP,crashrep) \
diff --git a/solenv/CustomTarget_concat-deps.mk b/solenv/CustomTarget_concat-deps.mk
deleted file mode 100644
index 6e8d56a..0000000
--- a/solenv/CustomTarget_concat-deps.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CustomTarget_CustomTarget,solenv/concat-deps))
-
-$(eval $(call gb_CustomTarget_register_targets,solenv/concat-deps,\
-	concat-deps$(gb_Executable_EXT_for_build) \
-))
-
-$(call gb_CustomTarget_get_workdir,solenv/concat-deps)/concat-deps$(gb_Executable_EXT_for_build) : \
-		$(SRCDIR)/solenv/bin/concat-deps.c
-	$(call gb_Output_announce,solenv/concat-deps,$(true),C,1)
-ifeq ($(COM_FOR_BUILD),MSC)
-	LIB="$(ILIB)" $(CC_FOR_BUILD) -nologo $(SOLARINC) -O2 $< -Fo$(dir $@) -Fe$(dir $@)
-else
-	$(CC_FOR_BUILD) -O2 $< -o $@
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/solenv/Executable_concat-deps.mk b/solenv/Executable_concat-deps.mk
new file mode 100644
index 0000000..a69b757
--- /dev/null
+++ b/solenv/Executable_concat-deps.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Executable_Executable,concat-deps))
+
+$(eval $(call gb_Executable_add_cobjects,concat-deps,\
+	solenv/bin/concat-deps, $(gb_COMPILEROPTFLAGS) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk
index 538b4e8..c34dc46 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -34,8 +34,7 @@
 
 ifeq ($(CROSS_COMPILING),$(false))
 $(eval $(call gb_Module_add_targets,solenv,\
-	CustomTarget_concat-deps \
-	Package_concat-deps \
+	Executable_concat-deps \
 ))
 endif
 
diff --git a/solenv/Package_concat-deps.mk b/solenv/Package_concat-deps.mk
deleted file mode 100644
index 9ede386..0000000
--- a/solenv/Package_concat-deps.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Package_Package,solenv_concat-deps,$(call gb_CustomTarget_get_workdir,solenv/concat-deps)))
-
-$(eval $(call gb_Package_add_file,solenv_concat-deps,bin/concat-deps$(gb_Executable_EXT_for_build),concat-deps$(gb_Executable_EXT_for_build)))
-
-# vim: set noet sw=4 ts=4:
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 5550897..575ad78 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -209,7 +209,7 @@
  * this is a simplified implementation that
  * is _not_ thread safe.
  */
-struct pool* pool_create(int size_elem, int flags, int primary, int secondary)
+struct pool* pool_create(int size_elem, int primary, int secondary)
 {
 struct pool* pool;
 
@@ -482,7 +482,7 @@
     if(hash)
     {
         hash->elems_pool = pool_create(sizeof(struct hash_elem),
-                                       0, size, size << 1);
+                                       size, size << 1);
         if(!hash->elems_pool)
         {
             hash_destroy(hash);
@@ -499,7 +499,7 @@
 struct hash_elem* hash_elem;
 struct hash_elem* next;
 struct hash_elem** array;
-int i;
+unsigned int i;
 
     hash->size = (old_size << 1) + 1;
     /* we really should avoid to get there... so print a message to alert of the condition */
@@ -556,6 +556,7 @@
 struct hash_elem* hash_elem;
 int cost = 0;
 
+    (void) cost;
     hashed = hash_compute(hash, key, key_len);
 #ifdef HASH_STAT
     hash->stored += 1;

-- 
To view, visit https://gerrit.libreoffice.org/2659
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6404472040f38c14ec7ca4a2c51be0d2f7f8199a
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Matúš Kukan <matus.kukan at gmail.com>



More information about the LibreOffice mailing list