[Libreoffice-commits] core.git: Branch 'aoo/trunk' - idlc/Executable_idlc.mk idlc/Makefile idlc/Module_idlc.mk idlc/prj idlc/source Repository.mk solenv/gbuild
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 5 04:08:07 UTC 2018
Repository.mk | 1
idlc/Executable_idlc.mk | 85 ++++++++++++++++++++++++++
idlc/Makefile | 32 +++++++++
idlc/Module_idlc.mk | 31 +++++++++
idlc/prj/build.lst | 4 -
idlc/prj/d.lst | 4 -
idlc/prj/makefile.mk | 44 +++++++++++++
idlc/source/makefile.mk | 125 ---------------------------------------
solenv/gbuild/Executable.mk | 1
solenv/gbuild/LinkTarget.mk | 33 ++++++++++
solenv/gbuild/TargetLocations.mk | 1
11 files changed, 229 insertions(+), 132 deletions(-)
New commits:
commit b0f9515abe3fec9a57ce2eb0e250b418c6c3f608
Author: Damjan Jovanovic <damjan at apache.org>
AuthorDate: Fri Oct 5 04:04:07 2018 +0000
Commit: Damjan Jovanovic <damjan at apache.org>
CommitDate: Fri Oct 5 04:04:07 2018 +0000
Add building of "flex" files (.ll) to gbuild.
Port main/idlc to gbuild.
Patch by: me
diff --git a/Repository.mk b/Repository.mk
index c5318b09b54b..ef063de99f6d 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -52,6 +52,7 @@ $(eval $(call gb_Helper_register_executables,OOO, \
$(eval $(call gb_Helper_register_executables,SDK, \
autodoc \
cppumaker \
+ idlc \
javamaker \
regcompare \
uno-skeletonmaker \
diff --git a/idlc/Executable_idlc.mk b/idlc/Executable_idlc.mk
new file mode 100644
index 000000000000..0cf535909b38
--- /dev/null
+++ b/idlc/Executable_idlc.mk
@@ -0,0 +1,85 @@
+###############################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+###############################################################
+
+
+
+$(eval $(call gb_Executable_Executable,idlc))
+
+$(eval $(call gb_Executable_set_targettype_gui,idlc,NO))
+
+$(eval $(call gb_Executable_add_precompiled_header,idlc,$(SRCDIR)/idlc/inc/pch/precompiled_idlc))
+
+#$(eval $(call gb_Executable_add_api,idlc,\
+# udkapi \
+# offapi \
+#))
+
+$(eval $(call gb_Executable_set_include,idlc,\
+ $$(INCLUDE) \
+ -I$(WORKDIR)/inc/ \
+ -I$(OUTDIR)/inc/ \
+ -I$(SRCDIR)/idlc/inc \
+ -I$(SRCDIR)/idlc/inc/pch \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,idlc,\
+ reg \
+ sal \
+ salhelper \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Executable_add_bison_files,idlc,\
+ idlc/source/parser \
+))
+
+$(eval $(call gb_Executable_add_flex_files,idlc,\
+ idlc/source/scanner \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,idlc,\
+ idlc/source/wrap_scanner \
+ idlc/source/wrap_parser \
+ 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 noet sw=4 ts=4:
diff --git a/idlc/Makefile b/idlc/Makefile
new file mode 100644
index 000000000000..c1d144cbd4c9
--- /dev/null
+++ b/idlc/Makefile
@@ -0,0 +1,32 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.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 000000000000..76598948837a
--- /dev/null
+++ b/idlc/Module_idlc.mk
@@ -0,0 +1,31 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+
+
+$(eval $(call gb_Module_Module,idlc))
+
+$(eval $(call gb_Module_add_targets,idlc,\
+ Executable_idlc \
+))
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/idlc/prj/build.lst b/idlc/prj/build.lst
index 38ca38750768..9d61d86b1550 100644
--- a/idlc/prj/build.lst
+++ b/idlc/prj/build.lst
@@ -1,4 +1,2 @@
ic idlc : ucpp registry NULL
-ic idlc usr1 - all ic_mkout NULL
-ic idlc\inc nmake - all 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 1433390f415f..e69de29bb2d1 100644
--- a/idlc/prj/d.lst
+++ b/idlc/prj/d.lst
@@ -1,4 +0,0 @@
-..\%__SRC%\bin\idlc.exe %_DEST%\bin%_EXT%\idlc.exe
-..\%__SRC%\bin\idlc.pdb %_DEST%\bin%_EXT%\idlc.pdb
-
-..\%__SRC%\bin\idlc %_DEST%\bin%_EXT%\idlc
diff --git a/idlc/prj/makefile.mk b/idlc/prj/makefile.mk
new file mode 100644
index 000000000000..c62c6a657d16
--- /dev/null
+++ b/idlc/prj/makefile.mk
@@ -0,0 +1,44 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+
+
+PRJ=..
+TARGET=prj
+
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+.IF "$(DEBUG)"!=""
+DEBUG_ARGUMENT=DEBUG=$(DEBUG)
+.ELIF "$(debug)"!=""
+DEBUG_ARGUMENT=debug=$(debug)
+.ELSE
+DEBUG_ARGUMENT=
+.ENDIF
+
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/idlc/source/makefile.mk b/idlc/source/makefile.mk
deleted file mode 100644
index f0d19ede36fd..000000000000
--- a/idlc/source/makefile.mk
+++ /dev/null
@@ -1,125 +0,0 @@
-#**************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#**************************************************************
-
-
-
-PRJ=..
-
-PRJNAME=idlc
-TARGET=idlc
-TARGETTYPE=CUI
-LIBTARGET=NO
-
-ENABLE_EXCEPTIONS=TRUE
-INCPRE=$(MISC)
-
-.IF "$(GUI)" == "OS2"
-STL_OS2_BUILDING=1
-.ENDIF
-
-# --- Settings -----------------------------------------------------
-
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES= \
- wrap_scanner.cxx \
- wrap_parser.cxx \
- idlcmain.cxx \
- idlc.cxx \
- idlccompile.cxx \
- idlcproduce.cxx \
- errorhandler.cxx \
- options.cxx \
- fehelper.cxx \
- astdeclaration.cxx \
- astscope.cxx \
- aststack.cxx \
- astdump.cxx \
- astinterface.cxx \
- aststruct.cxx \
- aststructinstance.cxx \
- astoperation.cxx \
- astconstant.cxx \
- astenum.cxx \
- astarray.cxx \
- astunion.cxx \
- astexpression.cxx \
- astservice.cxx
-
-YACCTARGET=$(MISC)$/parser.cxx
-YACCFILES=parser.y
-
-OBJFILES= \
- $(OBJ)$/wrap_scanner.obj \
- $(OBJ)$/wrap_parser.obj \
- $(OBJ)$/idlcmain.obj \
- $(OBJ)$/idlc.obj \
- $(OBJ)$/idlccompile.obj \
- $(OBJ)$/idlcproduce.obj \
- $(OBJ)$/errorhandler.obj \
- $(OBJ)$/options.obj \
- $(OBJ)$/fehelper.obj \
- $(OBJ)$/astdeclaration.obj \
- $(OBJ)$/astscope.obj \
- $(OBJ)$/aststack.obj \
- $(OBJ)$/astdump.obj \
- $(OBJ)$/astinterface.obj \
- $(OBJ)$/aststruct.obj \
- $(OBJ)$/aststructinstance.obj \
- $(OBJ)$/astoperation.obj \
- $(OBJ)$/astconstant.obj \
- $(OBJ)$/astenum.obj \
- $(OBJ)$/astarray.obj \
- $(OBJ)$/astunion.obj \
- $(OBJ)$/astexpression.obj \
- $(OBJ)$/astservice.obj
-
-APP1TARGET= $(TARGET)
-APP1OBJS= $(OBJFILES)
-
-APP1RPATH=SDK
-
-APP1STDLIBS = \
- $(REGLIB) \
- $(SALLIB) \
- $(SALHELPERLIB)
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(debug)" == ""
-YACCFLAGS+=-l
-.ELSE
-YACCFLAGS+=-v
-.ENDIF
-
-.INCLUDE : target.mk
-
-$(MISC)$/stripped_scanner.ll : scanner.ll
- tr -d "\015" < scanner.ll > $(MISC)$/stripped_scanner.ll
-
-$(MISC)$/scanner.cxx: $(MISC)$/stripped_scanner.ll
- flex -o$(MISC)$/scanner.cxx $(MISC)$/stripped_scanner.ll
-
-$(OBJ)$/wrap_parser.obj: $(MISC)$/parser.cxx
-$(OBJ)$/wrap_scanner.obj: $(MISC)$/scanner.cxx
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 4b1a34946d84..43caf93af296 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -99,6 +99,7 @@ $(eval $(foreach method,\
add_precompiled_header \
set_private_extract_of_public_api \
add_bison_files \
+ add_flex_files \
,\
$(call gb_Executable_forward_to_Linktarget,$(method))\
))
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index ed5eae4487ee..fb8acb3e1377 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -647,6 +647,39 @@ $(foreach bisonfile,$(2),$(call gb_LinkTarget_add_bison_file,$(1),$(bisonfile)))
endef
+
+
+gb_FlexTarget_get_source = $(SRCDIR)/$(1).ll
+
+# Flex-generated .cxx files are always #include'd into in-module files,
+# and aren't compiled, so they effectively act as generated headers, not generated .cxx.
+
+define gb_LinkTarget_add_flex_file
+
+$(call gb_LinkTarget_get_external_headers_target,$(1)) :| \
+ $(call gb_FlexTarget_get_target,$(1),$(2))
+
+$(call gb_LinkTarget_get_headers_target,$(1)) \
+$(call gb_LinkTarget_get_target,$(1)) : INCLUDE += -I$(dir $(call gb_FlexTarget_get_target,$(1),$(2)))
+ifeq ($(gb_FULLDEPS),$(true))
+$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE += -I$(dir $(call gb_FlexTarget_get_target,$(1),$(2)))
+endif
+
+$(call gb_FlexTarget_get_target,$(1),$(2)) : $(call gb_FlexTarget_get_source,$(2))
+ mkdir -p $(dir $(call gb_FlexTarget_get_target,$(1),$(2))) && \
+ tr -d "\015" < $(call gb_FlexTarget_get_source,$(2)) > $(dir $(call gb_FlexTarget_get_target,$(1),$(2)))/stripped_$(notdir $(call gb_FlexTarget_get_source,$(2))) && \
+ flex -o$(call gb_FlexTarget_get_target,$(1),$(2)) $(dir $(call gb_FlexTarget_get_target,$(1),$(2)))/stripped_$(notdir $(call gb_FlexTarget_get_source,$(2)))
+
+endef
+
+define gb_LinkTarget_add_flex_files
+$(foreach flexfile,$(2),$(call gb_LinkTarget_add_flex_file,$(1),$(flexfile)))
+
+endef
+
+
+
+
define gb_LinkTarget_add_libs
$(call gb_LinkTarget_get_target,$(1)) : LIBS += $(2)
endef
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 36c44100dc45..6f5ff811758a 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -58,6 +58,7 @@ gb_CxxObject_get_target = $(WORKDIR)/CxxObject/$(1).o
gb_GenCxxObject_get_target = $(WORKDIR)/GenCxxObject/$(1).o
gb_Executable_get_external_headers_target = $(WORKDIR)/ExternalHeaders/Executable/$(1)
gb_Executable_get_headers_target = $(WORKDIR)/Headers/Executable/$(1)
+gb_FlexTarget_get_target = $(WORKDIR)/Flex/$(1)/$(2).cxx
gb_GoogleTest_get_target = $(WORKDIR)/GoogleTest/$(1).test
gb_Jar_get_target = $(WORKDIR)/Jar/$(1).jar
gb_Jar_get_classsetname = Jar/$(1)
More information about the Libreoffice-commits
mailing list