[Libreoffice-commits] .: Branch 'feature/gnumake2.1' - tools/Executable_bestreversemap.mk tools/Library_tl.mk tools/Module_tools.mk

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Sun Jan 16 13:47:07 PST 2011


 tools/Executable_bestreversemap.mk |   56 +++++++++++++++++++++++++++++++++++++
 tools/Library_tl.mk                |   10 +++++-
 tools/Module_tools.mk              |    1 
 3 files changed, 66 insertions(+), 1 deletion(-)

New commits:
commit 6b8d5300f1e1d709866adefac360516933429cd8
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Jan 16 15:46:57 2011 -0600

    reversemap.hxx is generated at build-time with bestreversemap

diff --git a/tools/Executable_bestreversemap.mk b/tools/Executable_bestreversemap.mk
new file mode 100644
index 0000000..ec948ed
--- /dev/null
+++ b/tools/Executable_bestreversemap.mk
@@ -0,0 +1,56 @@
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (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.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Norbert Thiebaud <nthiebaud at gmail.com> (C) 2010, All Rights Reserved.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Executable_Executable,bestreversemap))
+
+$(eval $(call gb_Executable_set_include,bestreversemap,\
+	$$(INCLUDE) \
+	-I$(OUTDIR)/inc/ \
+))
+
+$(eval $(call gb_Executable_set_cxxflags,rscdep,\
+	$$(CXXFLAGS) \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,bestreversemap,\
+	sal \
+	stl \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,bestreversemap,\
+	tools/source/reversemap/bestreversemap \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Executable_add_linked_libs,bestreversemap,\
+	kernel32 \
+	user32 \
+	msvcrt \
+))
+endif
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Executable_add_linked_libs,bestreversemap,\
+	pthread \
+	dl \
+))
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk
index b88b51b..2caa73f 100644
--- a/tools/Library_tl.mk
+++ b/tools/Library_tl.mk
@@ -59,7 +59,6 @@ $(eval $(call gb_Library_add_linked_libs,tl,\
 	sal \
 ))
 
-
 $(eval $(call gb_Library_add_exception_objects,tl,\
 	tools/source/communi/parser \
 	tools/source/datetime/tdate \
@@ -94,6 +93,7 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
 	tools/source/stream/stream \
 	tools/source/stream/strmsys \
 	tools/source/stream/vcompat \
+	tools/source/string/reversemap \
 	tools/source/string/tenccvt \
 	tools/source/string/tstring \
 	tools/source/string/tustring \
@@ -121,6 +121,14 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
 	tools/source/zcodec/zcodec \
 ))
 
+# hack to build compile time generated header
+$(SRCDIR)/tools/source/string/reversemap.cxx: $(WORKDIR)/inc/tools/reversemap.hxx
+
+$(WORKDIR)/inc/tools/reversemap.hxx: $(OUTDIR)/bin/bestreversemap
+	mkdir -p $(WORKDIR)/inc/tools
+	$(call gb_Helper_execute,bestreversemap) > $(WORKDIR)/inc/tools/reversemap.hxx
+
+
 ifeq ($(GUI),UNX)
 $(eval $(call gb_Library_add_exception_objects,tl,\
 	tools/unx/source/dll/toolsdll \
diff --git a/tools/Module_tools.mk b/tools/Module_tools.mk
index da9c551..09e5d92 100644
--- a/tools/Module_tools.mk
+++ b/tools/Module_tools.mk
@@ -29,6 +29,7 @@
 $(eval $(call gb_Module_Module,tools))
 
 $(eval $(call gb_Module_add_targets,tools,\
+	Executable_bestreversemap \
 	Executable_mkunroll \
 	Executable_rscdep \
 	Executable_so_checksum \


More information about the Libreoffice-commits mailing list