Author: damjan
Date: Fri Aug 31 18:54:31 2018
New Revision: 1839782
URL: http://svn.apache.org/viewvc?rev=1839782&view=rev
Log:
Implement gbuild functions for building Bison files.
Port main/rsc to gbuild.
Patch by: me
Added:
openoffice/trunk/main/rsc/Executable_rsc.mk
openoffice/trunk/main/rsc/Executable_rsc2.mk
openoffice/trunk/main/rsc/Executable_rscpp.mk
openoffice/trunk/main/rsc/Makefile (with props)
openoffice/trunk/main/rsc/Module_rsc.mk
openoffice/trunk/main/rsc/Package_inc.mk
openoffice/trunk/main/rsc/prj/makefile.mk
openoffice/trunk/main/rsc/source/parser/yyrscyacc.y
- copied unchanged from r1839781,
openoffice/trunk/main/rsc/source/parser/rscyacc.y
Removed:
openoffice/trunk/main/rsc/source/parser/rscyacc.y
Modified:
openoffice/trunk/main/Module_ooo.mk
openoffice/trunk/main/Repository.mk
openoffice/trunk/main/rsc/prj/build.lst
openoffice/trunk/main/rsc/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/Module_ooo.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/Module_ooo.mk?rev=1839782&r1=1839781&r2=1839782&view=diff
==============================================================================
--- openoffice/trunk/main/Module_ooo.mk (original)
+++ openoffice/trunk/main/Module_ooo.mk Fri Aug 31 18:54:31 2018
@@ -72,6 +72,7 @@ $(eval $(call gb_Module_add_moduledirs,o
remotebridges \
reportdesign \
ridljar \
+ rsc \
sane \
sax \
sc \
Modified: openoffice/trunk/main/Repository.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/Repository.mk?rev=1839782&r1=1839781&r2=1839782&view=diff
==============================================================================
--- openoffice/trunk/main/Repository.mk (original)
+++ openoffice/trunk/main/Repository.mk Fri Aug 31 18:54:31 2018
@@ -32,7 +32,10 @@ $(eval $(call gb_Helper_register_executa
mkunroll \
rdbedit \
rdbmaker \
+ rsc \
+ rsc2 \
rscdep \
+ rscpp \
so_checksum \
srvdepy \
svidl \
Added: openoffice/trunk/main/rsc/Executable_rsc.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/Executable_rsc.mk?rev=1839782&view=auto
==============================================================================
--- openoffice/trunk/main/rsc/Executable_rsc.mk (added)
+++ openoffice/trunk/main/rsc/Executable_rsc.mk Fri Aug 31 18:54:31 2018
@@ -0,0 +1,52 @@
+#**************************************************************
+#
+# 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,rsc))
+
+$(eval $(call
gb_Executable_add_precompiled_header,rsc,$(SRCDIR)/rsc/inc/pch/precompiled_rsc))
+
+$(eval $(call gb_Executable_set_include,rsc,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/rsc/inc \
+ -I$(SRCDIR)/rsc/inc/pch \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,rsc,\
+ i18nisolang1 \
+ sal \
+ tl \
+ vos3 \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,rsc,\
+ rsc/source/prj/start \
+ rsc/source/tools/rschash \
+ rsc/source/tools/rsctree \
+ rsc/source/tools/rsctools \
+ rsc/source/tools/rscchar \
+ rsc/source/tools/rscdef \
+))
+
+# vim: set noet sw=4 ts=4:
Added: openoffice/trunk/main/rsc/Executable_rsc2.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/Executable_rsc2.mk?rev=1839782&view=auto
==============================================================================
--- openoffice/trunk/main/rsc/Executable_rsc2.mk (added)
+++ openoffice/trunk/main/rsc/Executable_rsc2.mk Fri Aug 31 18:54:31 2018
@@ -0,0 +1,84 @@
+#**************************************************************
+#
+# 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,rsc2))
+
+$(eval $(call
gb_Executable_add_precompiled_header,rsc2,$(SRCDIR)/rsc/inc/pch/precompiled_rsc))
+
+$(eval $(call gb_Executable_set_include,rsc2,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/rsc/inc \
+ -I$(SRCDIR)/rsc/inc/pch \
+))
+
+$(eval $(call gb_Executable_add_api,rsc2,\
+ offapi \
+ udkapi \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,rsc2,\
+ i18nisolang1 \
+ sal \
+ tl \
+ vos3 \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Executable_add_bison_files,rsc2,\
+ rsc/source/parser/yyrscyacc \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,rsc2,\
+ rsc/source/misc/rsclst \
+ rsc/source/misc/rscdbl \
+ rsc/source/parser/rscpar \
+ rsc/source/parser/rscyacc \
+ rsc/source/parser/rsclex \
+ rsc/source/parser/erscerr \
+ rsc/source/parser/rsckey \
+ rsc/source/parser/rscinit \
+ rsc/source/parser/rscibas \
+ rsc/source/parser/rscdb \
+ rsc/source/parser/rscicpx \
+ rsc/source/prj/gui \
+ rsc/source/res/rscclobj \
+ rsc/source/res/rsctop \
+ rsc/source/res/rscrange \
+ rsc/source/res/rscconst \
+ rsc/source/res/rscflag \
+ rsc/source/res/rscstr \
+ rsc/source/res/rscall \
+ rsc/source/res/rsccont \
+ rsc/source/res/rscclass \
+ rsc/source/res/rscmgr \
+ rsc/source/res/rscarray \
+ rsc/source/rsc/rsc \
+ rsc/source/tools/rschash \
+ rsc/source/tools/rsctree \
+ rsc/source/tools/rsctools \
+ rsc/source/tools/rscchar \
+ rsc/source/tools/rscdef \
+))
+
+# vim: set noet sw=4 ts=4:
Added: openoffice/trunk/main/rsc/Executable_rscpp.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/Executable_rscpp.mk?rev=1839782&view=auto
==============================================================================
--- openoffice/trunk/main/rsc/Executable_rscpp.mk (added)
+++ openoffice/trunk/main/rsc/Executable_rscpp.mk Fri Aug 31 18:54:31 2018
@@ -0,0 +1,68 @@
+#**************************************************************
+#
+# 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,rscpp))
+
+$(eval $(call
gb_Executable_add_precompiled_header,rscpp,$(SRCDIR)/rsc/inc/pch/precompiled_rsc))
+
+$(eval $(call gb_Executable_set_include,rscpp,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/rsc/inc \
+ -I$(SRCDIR)/rsc/inc/pch \
+))
+
+ifeq ($(GUI),UNX)
+$(eval $(call gb_Executable_add_defs,rscpp,\
+ -Dunix \
+))
+endif
+
+$(eval $(call gb_Executable_add_linked_libs,rscpp,\
+ i18nisolang1 \
+ sal \
+ tl \
+ vos3 \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Executable_add_cobjects,rscpp,\
+ rsc/source/rscpp/cpp1 \
+ rsc/source/rscpp/cpp2 \
+ rsc/source/rscpp/cpp3 \
+ rsc/source/rscpp/cpp4 \
+ rsc/source/rscpp/cpp5 \
+ rsc/source/rscpp/cpp6 \
+))
+
+# cc: Sun C 5.5 Patch 112761-10 2004/08/10
+# Solaris x86 compiler ICE
+# "cpp6.c", [get]:ube: internal error
+# remove after compiler upgrade
+ifeq ($(OS)$(CPU),SOLARISI)
+$(eval $(call gb_LinkTarget_set_cxx_optimization, \
+ rsc/source/rscpp/cpp6, $(gb_COMPILERNOOPTFLAGS) \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
Added: openoffice/trunk/main/rsc/Makefile
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/Makefile?rev=1839782&view=auto
==============================================================================
--- openoffice/trunk/main/rsc/Makefile (added)
+++ openoffice/trunk/main/rsc/Makefile Fri Aug 31 18:54:31 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/rsc/Makefile
------------------------------------------------------------------------------
svn:eol-style = native
Added: openoffice/trunk/main/rsc/Module_rsc.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/Module_rsc.mk?rev=1839782&view=auto
==============================================================================
--- openoffice/trunk/main/rsc/Module_rsc.mk (added)
+++ openoffice/trunk/main/rsc/Module_rsc.mk Fri Aug 31 18:54:31 2018
@@ -0,0 +1,34 @@
+#**************************************************************
+#
+# 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,rsc))
+
+$(eval $(call gb_Module_add_targets,rsc,\
+ Executable_rsc \
+ Executable_rsc2 \
+ Executable_rscpp \
+ Package_inc \
+))
+
+
+# vim: set noet sw=4 ts=4:
Added: openoffice/trunk/main/rsc/Package_inc.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/Package_inc.mk?rev=1839782&view=auto
==============================================================================
--- openoffice/trunk/main/rsc/Package_inc.mk (added)
+++ openoffice/trunk/main/rsc/Package_inc.mk Fri Aug 31 18:54:31 2018
@@ -0,0 +1,25 @@
+#**************************************************************
+#
+# 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_Package_Package,rsc_inc,$(SRCDIR)/rsc/inc))
+$(eval $(call gb_Package_add_file,rsc_inc,inc/rsc/rscsfx.hxx,rsc/rscsfx.hxx))
Modified: openoffice/trunk/main/rsc/prj/build.lst
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/prj/build.lst?rev=1839782&r1=1839781&r2=1839782&view=diff
==============================================================================
--- openoffice/trunk/main/rsc/prj/build.lst (original)
+++ openoffice/trunk/main/rsc/prj/build.lst Fri Aug 31 18:54:31 2018
@@ -1,9 +1,2 @@
r rsc : tools NULL
-r rsc
usr1 - all rsc_mkout NULL
-r rsc\source\misc nmake
- all rsc_misc NULL
-r rsc\source\tools nmake
- all rsc_tool NULL
-r rsc\source\res nmake
- all rsc_res NULL
-r rsc\source\parser nmake
- all rsc_pars NULL
-r rsc\source\rsc nmake
- all rsc_rsc NULL
-r rsc\source\rscpp nmake
- all rsc_cpp NULL
-r rsc\source\prj nmake
- all rsc_sprj rsc_misc rsc_pars rsc_res rsc_rsc rsc_tool NULL
+r rsc\prj nmake -
all rsc_sprj NULL
Modified: openoffice/trunk/main/rsc/prj/d.lst
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/prj/d.lst?rev=1839782&r1=1839781&r2=1839782&view=diff
==============================================================================
--- openoffice/trunk/main/rsc/prj/d.lst (original)
+++ openoffice/trunk/main/rsc/prj/d.lst Fri Aug 31 18:54:31 2018
@@ -1,9 +0,0 @@
-..\%__SRC%\bin\rsc.exe %_DEST%\bin%_EXT%\rsc.exe
-..\%__SRC%\bin\rsc2.exe %_DEST%\bin%_EXT%\rsc2.exe
-..\%__SRC%\bin\rsc %_DEST%\bin%_EXT%\rsc
-..\%__SRC%\bin\rsc2 %_DEST%\bin%_EXT%\rsc2
-..\%__SRC%\bin\rscpp.exe %_DEST%\bin%_EXT%\rscpp.exe
-..\%__SRC%\bin\rscpp %_DEST%\bin%_EXT%\rscpp
-
-mkdir: %_DEST%\inc%_EXT%\rsc
-..\inc\rsc/rscsfx.hxx %_DEST%\inc%_EXT%\rsc\rscsfx.hxx
Added: openoffice/trunk/main/rsc/prj/makefile.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/prj/makefile.mk?rev=1839782&view=auto
==============================================================================
--- openoffice/trunk/main/rsc/prj/makefile.mk (added)
+++ openoffice/trunk/main/rsc/prj/makefile.mk Fri Aug 31 18:54:31 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=1839782&r1=1839781&r2=1839782&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/gbuild/Executable.mk (original)
+++ openoffice/trunk/main/solenv/gbuild/Executable.mk Fri Aug 31 18:54:31 2018
@@ -98,6 +98,7 @@ $(eval $(foreach method,\
add_sdi_headers \
add_precompiled_header \
set_private_extract_of_public_api \
+ add_bison_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=1839782&r1=1839781&r2=1839782&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/gbuild/LinkTarget.mk (original)
+++ openoffice/trunk/main/solenv/gbuild/LinkTarget.mk Fri Aug 31 18:54:31 2018
@@ -598,6 +598,33 @@ $(call gb_LinkTarget_get_clean_target,$(
endef
+gb_BisonTarget_get_source = $(SRCDIR)/$(1).y
+
+# Bison-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_bison_file
+
+$(call gb_LinkTarget_get_external_headers_target,$(1)) :| \
+ $(call gb_BisonTarget_get_target,$(1),$(2))
+
+$(call gb_LinkTarget_get_headers_target,$(1)) \
+$(call gb_LinkTarget_get_target,$(1)) : INCLUDE += -I$(dir $(call
gb_BisonTarget_get_target,$(1),$(2)))
+ifeq ($(gb_FULLDEPS),$(true))
+$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE += -I$(dir $(call
gb_BisonTarget_get_target,$(1),$(2)))
+endif
+
+$(call gb_BisonTarget_get_target,$(1),$(2)) : $(call
gb_BisonTarget_get_source,$(2))
+ mkdir -p $(dir $(call gb_BisonTarget_get_target,$(1),$(2))) && \
+ bison -d -o $(call gb_BisonTarget_get_target,$(1),$(2)) $(call
gb_BisonTarget_get_source,$(2))
+
+endef
+
+define gb_LinkTarget_add_bison_files
+$(foreach bisonfile,$(2),$(call
gb_LinkTarget_add_bison_file,$(1),$(bisonfile)))
+
+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=1839782&r1=1839781&r2=1839782&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/gbuild/TargetLocations.mk (original)
+++ openoffice/trunk/main/solenv/gbuild/TargetLocations.mk Fri Aug 31 18:54:31
2018
@@ -46,6 +46,7 @@ endef
gb_AllLangResTarget_get_target = $(WORKDIR)/AllLangRes/$(1)
gb_Ant_get_target = $(WORKDIR)/Ant/$(1).jar
+gb_BisonTarget_get_target = $(WORKDIR)/Bison/$(1)/$(2).cxx
gb_CObject_get_target = $(WORKDIR)/CObject/$(1).o
gb_ComponentTarget_get_target = $(WORKDIR)/ComponentTarget/$(1).component
gb_ComponentTarget_get_inbuild_target =
$(WORKDIR)/ComponentTarget/$(1).inbuild.component