You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2018/10/05 04:04:07 UTC

svn commit: r1842861 - in /openoffice/trunk/main: ./ idlc/ idlc/prj/ idlc/source/ solenv/gbuild/

Author: damjan
Date: Fri Oct  5 04:04:07 2018
New Revision: 1842861

URL: http://svn.apache.org/viewvc?rev=1842861&view=rev
Log:
Add building of "flex" files (.ll) to gbuild.

Port main/idlc to gbuild.

Patch by: me


Added:
    openoffice/trunk/main/idlc/Executable_idlc.mk
    openoffice/trunk/main/idlc/Makefile   (with props)
    openoffice/trunk/main/idlc/Module_idlc.mk
    openoffice/trunk/main/idlc/prj/makefile.mk
Removed:
    openoffice/trunk/main/idlc/source/makefile.mk
Modified:
    openoffice/trunk/main/Repository.mk
    openoffice/trunk/main/idlc/prj/build.lst
    openoffice/trunk/main/idlc/prj/d.lst
    openoffice/trunk/main/solenv/gbuild/Executable.mk
    openoffice/trunk/main/solenv/gbuild/LinkTarget.mk
    openoffice/trunk/main/solenv/gbuild/TargetLocations.mk

Modified: openoffice/trunk/main/Repository.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/Repository.mk?rev=1842861&r1=1842860&r2=1842861&view=diff
==============================================================================
--- openoffice/trunk/main/Repository.mk (original)
+++ openoffice/trunk/main/Repository.mk Fri Oct  5 04:04:07 2018
@@ -52,6 +52,7 @@ $(eval $(call gb_Helper_register_executa
 $(eval $(call gb_Helper_register_executables,SDK, \
 	autodoc \
 	cppumaker \
+	idlc \
 	javamaker \
 	regcompare \
 	uno-skeletonmaker \

Added: openoffice/trunk/main/idlc/Executable_idlc.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/idlc/Executable_idlc.mk?rev=1842861&view=auto
==============================================================================
--- openoffice/trunk/main/idlc/Executable_idlc.mk (added)
+++ openoffice/trunk/main/idlc/Executable_idlc.mk Fri Oct  5 04:04:07 2018
@@ -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:

Added: openoffice/trunk/main/idlc/Makefile
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/idlc/Makefile?rev=1842861&view=auto
==============================================================================
--- openoffice/trunk/main/idlc/Makefile (added)
+++ openoffice/trunk/main/idlc/Makefile Fri Oct  5 04:04:07 2018
@@ -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:

Propchange: openoffice/trunk/main/idlc/Makefile
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openoffice/trunk/main/idlc/Module_idlc.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/idlc/Module_idlc.mk?rev=1842861&view=auto
==============================================================================
--- openoffice/trunk/main/idlc/Module_idlc.mk (added)
+++ openoffice/trunk/main/idlc/Module_idlc.mk Fri Oct  5 04:04:07 2018
@@ -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:

Modified: openoffice/trunk/main/idlc/prj/build.lst
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/idlc/prj/build.lst?rev=1842861&r1=1842860&r2=1842861&view=diff
==============================================================================
--- openoffice/trunk/main/idlc/prj/build.lst (original)
+++ openoffice/trunk/main/idlc/prj/build.lst Fri Oct  5 04:04:07 2018
@@ -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

Modified: openoffice/trunk/main/idlc/prj/d.lst
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/idlc/prj/d.lst?rev=1842861&r1=1842860&r2=1842861&view=diff
==============================================================================
--- openoffice/trunk/main/idlc/prj/d.lst (original)
+++ openoffice/trunk/main/idlc/prj/d.lst Fri Oct  5 04:04:07 2018
@@ -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

Added: openoffice/trunk/main/idlc/prj/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/idlc/prj/makefile.mk?rev=1842861&view=auto
==============================================================================
--- openoffice/trunk/main/idlc/prj/makefile.mk (added)
+++ openoffice/trunk/main/idlc/prj/makefile.mk Fri Oct  5 04:04:07 2018
@@ -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

Modified: openoffice/trunk/main/solenv/gbuild/Executable.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/gbuild/Executable.mk?rev=1842861&r1=1842860&r2=1842861&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/gbuild/Executable.mk (original)
+++ openoffice/trunk/main/solenv/gbuild/Executable.mk Fri Oct  5 04:04:07 2018
@@ -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))\
 ))

Modified: openoffice/trunk/main/solenv/gbuild/LinkTarget.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/gbuild/LinkTarget.mk?rev=1842861&r1=1842860&r2=1842861&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/gbuild/LinkTarget.mk (original)
+++ openoffice/trunk/main/solenv/gbuild/LinkTarget.mk Fri Oct  5 04:04:07 2018
@@ -647,6 +647,39 @@ $(foreach bisonfile,$(2),$(call gb_LinkT
 
 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

Modified: openoffice/trunk/main/solenv/gbuild/TargetLocations.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/gbuild/TargetLocations.mk?rev=1842861&r1=1842860&r2=1842861&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/gbuild/TargetLocations.mk (original)
+++ openoffice/trunk/main/solenv/gbuild/TargetLocations.mk Fri Oct  5 04:04:07 2018
@@ -58,6 +58,7 @@ gb_CxxObject_get_target = $(WORKDIR)/Cxx
 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)