summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2013-03-06 16:34:16 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-11 09:36:54 +0000
commit4154006248513f488b4ca27345a721b9216ae264 (patch)
treebffde3494ba74e31d2ac3684df1c6c34a04f230d /solenv
parentb977c27383b36f511bcedc8cd48c160a1c0be514 (diff)
build concat-deps as ordinary executable
Change-Id: I6404472040f38c14ec7ca4a2c51be0d2f7f8199a Reviewed-on: https://gerrit.libreoffice.org/2659 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/CustomTarget_concat-deps.mk25
-rw-r--r--solenv/Executable_concat-deps.mk (renamed from solenv/Package_concat-deps.mk)6
-rw-r--r--solenv/Module_solenv.mk3
-rw-r--r--solenv/bin/concat-deps.c7
4 files changed, 9 insertions, 32 deletions
diff --git a/solenv/CustomTarget_concat-deps.mk b/solenv/CustomTarget_concat-deps.mk
deleted file mode 100644
index 6e8d56a637d8..000000000000
--- 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/Package_concat-deps.mk b/solenv/Executable_concat-deps.mk
index 9ede3860aea8..a69b75717c50 100644
--- a/solenv/Package_concat-deps.mk
+++ b/solenv/Executable_concat-deps.mk
@@ -7,8 +7,10 @@
# 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_Executable_Executable,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)))
+$(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 538b4e8cff5c..c34dc468c76f 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -34,8 +34,7 @@ $(eval $(call gb_Module_add_targets,solenv,\
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/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 5550897a7f92..575ad7824181 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -209,7 +209,7 @@ void* data = NULL;
* 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 @@ struct hash* hash;
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 @@ unsigned int hashed;
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 @@ unsigned int hashed;
struct hash_elem* hash_elem;
int cost = 0;
+ (void) cost;
hashed = hash_compute(hash, key, key_len);
#ifdef HASH_STAT
hash->stored += 1;