Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

this is gbuild conversion for idlc module.

We don't have lexer function for gbuild, so I converted dmake stuff directly in CustomTarget_scanner.mk.
@Matus, thank you for your help on IRC with that.
If we have more lexer stuff it would be nice to see a convenience function gb_Executable_add_lexers (a lá gb_Executable_add_grammars)
though.

David
From 30026902eddd4d7ba5f37593628489a4a8f32586 Mon Sep 17 00:00:00 2001
From: David Ostrovsky <David.Ostrovsky@gmx.de>
Date: Fri, 6 Apr 2012 01:51:05 +0200
Subject: [PATCH] gbuild conversion: idlc module

---
 Makefile                     |    2 +-
 Repository.mk                |    2 +
 RepositoryModule_ooo.mk      |    1 +
 idlc/CustomTarget_scanner.mk |   39 ++++++++++++++++++++++
 idlc/Executable_idlc.mk      |   74 ++++++++++++++++++++++++++++++++++++++++++
 idlc/Executable_idlcpp.mk    |   44 +++++++++++++++++++++++++
 idlc/Makefile                |    7 ++++
 idlc/Module_idlc.mk          |   36 ++++++++++++++++++++
 idlc/prj/build.lst           |    4 +--
 idlc/prj/d.lst               |    7 ----
 idlc/prj/makefile.mk         |    1 +
 11 files changed, 206 insertions(+), 11 deletions(-)
 create mode 100644 idlc/CustomTarget_scanner.mk
 create mode 100644 idlc/Executable_idlc.mk
 create mode 100644 idlc/Executable_idlcpp.mk
 create mode 100644 idlc/Makefile
 create mode 100644 idlc/Module_idlc.mk
 create mode 100644 idlc/prj/makefile.mk

diff --git a/Makefile b/Makefile
index 865a324..7993cff 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@ i18npool\
 i18nutil\
 idl\
 io\
+idlc\
 javaunohelper\
 jurt\
 jvmaccess\
@@ -176,7 +177,6 @@ hunspell\
 hyphen\
 icc\
 icu\
-idlc\
 instsetoo_native\
 jfreereport\
 jpeg\
diff --git a/Repository.mk b/Repository.mk
index 1a3851e..638f4f8 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -31,6 +31,8 @@ $(eval $(call gb_Helper_register_executables,NONE, \
     bmp \
     bmpsum \
     cppunit/cppunittester \
+    idlc \
+    idlcpp \
     g2g \
     gencoll_rule \
     genconv_dict \
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index a79028c..ea5d5ab 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -67,6 +67,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
     i18npool \
     i18nutil \
     idl \
+    idlc \
     javaunohelper \
     jvmaccess \
     jvmfwk \
diff --git a/idlc/CustomTarget_scanner.mk b/idlc/CustomTarget_scanner.mk
new file mode 100644
index 0000000..b8fff44
--- /dev/null
+++ b/idlc/CustomTarget_scanner.mk
@@ -0,0 +1,39 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# 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 or as specified alternatively below. 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.
+#
+# Major Contributor(s):
+# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# 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_CustomTarget_CustomTarget,idlc/scanner,new_style))
+
+DESO := $(call gb_CustomTarget_get_workdir,idlc/scanner)
+
+$(call gb_CustomTarget_get_target,idlc/scanner) : $(DESO)/scanner.cxx
+
+$(DESO)/scanner.cxx : $(DESO)/stripped_scanner.ll
+       flex -o$(DESO)/scanner.cxx $(DESO)/stripped_scanner.ll
+
+$(DESO)/stripped_scanner.ll : $(SRCDIR)/idlc/source/scanner.ll | $(DESO)/.dir
+       tr -d "\015" < $< > $@
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/idlc/Executable_idlc.mk b/idlc/Executable_idlc.mk
new file mode 100644
index 0000000..53c1f50
--- /dev/null
+++ b/idlc/Executable_idlc.mk
@@ -0,0 +1,74 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# 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 or as specified alternatively below. 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.
+#
+# Major Contributor(s):
+# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# 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,idlc))
+
+$(eval $(call gb_Executable_set_include,idlc,\
+       $$(INCLUDE) \
+       -I$(WORKDIR)/YaccTarget/idlc/source \
+       -I$(SRCDIR)/idlc/inc \
+       -I$(SRCDIR)/idlc/source \
+))
+
+$(eval $(call gb_Executable_use_libraries,idlc,\
+    sal \
+    reg \
+))
+
+$(eval $(call gb_Executable_add_grammars,idlc,\
+       idlc/source/parser \
+))
+
+$(WORKDIR)/GenCxxObject/YaccTarget/idlc/source/parser.o: T_CXXFLAGS := 
$(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS)
+
+$(eval $(call gb_Executable_use_custom_headers,idlc,idlc/scanner))
+
+$(eval $(call gb_Executable_add_exception_objects,idlc,\
+    idlc/source/wrap_scanner \
+    idlc/source/idlcmain \
+    idlc/source/idlc \
+    idlc/source/idlccompile \
+    idlc/source/idlcproduce \
+    idlc/source/errorhandler \
+    idlc/source/options \
+    idlc/source/fehelper \
+    idlc/source/astdeclaration \
+    idlc/source/astscope \
+    idlc/source/aststack \
+    idlc/source/astdump \
+    idlc/source/astinterface \
+    idlc/source/aststruct \
+    idlc/source/aststructinstance \
+    idlc/source/astoperation \
+    idlc/source/astconstant \
+    idlc/source/astenum \
+    idlc/source/astarray \
+    idlc/source/astunion \
+    idlc/source/astexpression \
+    idlc/source/astservice \
+))
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/idlc/Executable_idlcpp.mk b/idlc/Executable_idlcpp.mk
new file mode 100644
index 0000000..9accad2
--- /dev/null
+++ b/idlc/Executable_idlcpp.mk
@@ -0,0 +1,44 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# 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 or as specified alternatively below. 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.
+#
+# Major Contributor(s):
+# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# 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,idlcpp))
+
+$(eval $(call gb_Executable_use_linked_libs,idlcpp,\
+    gnu_getopt \
+))
+
+$(eval $(call gb_Executable_add_cobjects,idlcpp,\
+    idlc/source/preproc/cpp \
+    idlc/source/preproc/eval \
+    idlc/source/preproc/include \
+    idlc/source/preproc/lex \
+    idlc/source/preproc/macro \
+    idlc/source/preproc/nlist \
+    idlc/source/preproc/tokens \
+    idlc/source/preproc/unix \
+))
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/idlc/Makefile b/idlc/Makefile
new file mode 100644
index 0000000..ccb1c85
--- /dev/null
+++ b/idlc/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/idlc/Module_idlc.mk b/idlc/Module_idlc.mk
new file mode 100644
index 0000000..2536c58
--- /dev/null
+++ b/idlc/Module_idlc.mk
@@ -0,0 +1,36 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# 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 or as specified alternatively below. 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.
+#
+# Major Contributor(s):
+# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# 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_Module_Module,idlc))
+
+$(eval $(call gb_Module_add_targets,idlc,\
+    CustomTarget_scanner \
+    Executable_idlc \
+    Executable_idlcpp \
+))
+
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/idlc/prj/build.lst b/idlc/prj/build.lst
index 84f2ee1..9a8fb13 100644
--- a/idlc/prj/build.lst
+++ b/idlc/prj/build.lst
@@ -1,5 +1,3 @@
 ic     idlc    :       registry NULL
 ic     idlc                                    usr1    -       all     ic_mkout NULL
-ic     idlc\inc                                nmake   -       all     ic_inc NULL
-ic     idlc\source\preproc             nmake   -       all     ic_preproc ic_inc NULL
-ic     idlc\source                             nmake   -       all ic_source ic_inc NULL
+ic     idlc\prj                                nmake   -       all     ic_prj NULL
diff --git a/idlc/prj/d.lst b/idlc/prj/d.lst
index 8f617ce..e69de29 100644
--- a/idlc/prj/d.lst
+++ b/idlc/prj/d.lst
@@ -1,7 +0,0 @@
-..\%__SRC%\bin\idlc.exe %_DEST%\bin\idlc.exe
-..\%__SRC%\bin\idlc.pdb %_DEST%\bin\idlc.pdb
-..\%__SRC%\bin\idlcpp.exe %_DEST%\bin\idlcpp.exe
-..\%__SRC%\bin\idlcpp.pdb %_DEST%\bin\idlcpp.pdb
-
-..\%__SRC%\bin\idlc %_DEST%\bin\idlc
-..\%__SRC%\bin\idlcpp %_DEST%\bin\idlcpp
diff --git a/idlc/prj/makefile.mk b/idlc/prj/makefile.mk
new file mode 100644
index 0000000..0997622
--- /dev/null
+++ b/idlc/prj/makefile.mk
@@ -0,0 +1 @@
+.INCLUDE : gbuildbridge.mk
-- 
1.7.5.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.