Skip to content

Commit

Permalink
Port main/jvmfwk to gbuild / Ant.
Browse files Browse the repository at this point in the history
Fix the gbuild platform CPUDEFS to conform to what modules expect.

Patch by: me



git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1829205 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Damjan Jovanovic committed Apr 15, 2018
1 parent 31eff9f commit 8cb913c
Show file tree
Hide file tree
Showing 39 changed files with 622 additions and 359 deletions.
2 changes: 2 additions & 0 deletions main/Repository.mk
Expand Up @@ -51,6 +51,7 @@ $(eval $(call gb_Helper_register_executables,SDK, \
))

$(eval $(call gb_Helper_register_executables,UREBIN, \
javaldx \
regmerge \
regview \
))
Expand Down Expand Up @@ -179,6 +180,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
jpipe \
jpipx \
sunjavaplugin \
xmlreader \
))

Expand Down
4 changes: 4 additions & 0 deletions main/RepositoryFixes.mk
Expand Up @@ -38,6 +38,7 @@ gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salh
gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst spell:spell.uno%,spell:libspell.uno%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst store:libuno_store%,store:libstore%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst sunjavaplugin:libsunjavaplugin%,sunjavaplugin:sunjavaplugin%,$(gb_Library_FILENAMES))

gb_Library_FILENAMES := $(patsubst stl:%,stl:libstdc++.so,$(gb_Library_FILENAMES))
gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
Expand All @@ -55,6 +56,7 @@ gb_Library_FILENAMES := $(patsubst reg:libuno_reg%,reg:libreg%,$(gb_Library_FILE
gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst spell:spell.uno%,spell:libspell.uno%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst store:libuno_store%,store:libstore%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst sunjavaplugin:libsunjavaplugin%,sunjavaplugin:sunjavaplugin%,$(gb_Library_FILENAMES))
#$(info libnames: $(gb_Library_FILENAMES))

endif
Expand All @@ -70,6 +72,7 @@ gb_Library_FILENAMES := $(patsubst reg:libuno_reg%,reg:libreg%,$(gb_Library_FILE
gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst spell:spell.uno%,spell:libspell.uno%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst store:libuno_store%,store:libstore%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst sunjavaplugin:libsunjavaplugin%,sunjavaplugin:sunjavaplugin%,$(gb_Library_FILENAMES))

ifneq ($(MACOSX_DEPLOYMENT_TARGET),10.4) # default to use libc++
gb_Library_FILENAMES := $(patsubst stl:%,stl:libc++.dylib,$(gb_Library_FILENAMES))
Expand Down Expand Up @@ -281,6 +284,7 @@ gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salh
gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst spell:spell.uno%,spell:libspell.uno%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst store:libuno_store%,store:libstore%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst sunjavaplugin:libsunjavaplugin%,sunjavaplugin:sunjavaplugin%,$(gb_Library_FILENAMES))

gb_Library_FILENAMES := $(patsubst stl:%,stl:libstdc++.so,$(gb_Library_FILENAMES))
gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
Expand Down
27 changes: 27 additions & 0 deletions main/jvmfwk/Ant_jreproperties.mk
@@ -0,0 +1,27 @@
#**************************************************************
#
# 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_Ant_Ant,jreproperties,$(SRCDIR)/jvmfwk/java/jreproperties/build.xml,nodeliver))

# vim: set noet sw=4 ts=4:

Expand Up @@ -21,32 +21,25 @@



PRJ=..$/..$/..
$(eval $(call gb_Executable_Executable,javaldx))

PRJNAME=javaldx
TARGET=javaldx
TARGETTYPE=CUI
NO_DEFAULT_STL=TRUE
LIBTARGET=NO
ENABLE_EXCEPTIONS=true
$(eval $(call gb_Library_add_package_headers,javaldx,jvmfwk_inc))

# --- Settings -----------------------------------------------------
$(eval $(call gb_Executable_set_include,javaldx,\
$$(INCLUDE) \
-I$(SRCDIR)/jvmfwk/inc/ \
-I$(SRCDIR)/jvmfwk/inc/pch \
))

.INCLUDE : settings.mk
$(eval $(call gb_Executable_add_linked_libs,javaldx,\
jvmfwk \
sal \
stl \
$(gb_STDLIBS) \
))

# --- Files --------------------------------------------------------
$(eval $(call gb_Executable_add_exception_objects,javaldx,\
jvmfwk/plugins/sunmajor/javaenvsetup/javaldx \
))

.IF "$(OS)" != "MACOSX" && "$(SOLAR_JAVA)" != ""

OBJFILES=$(OBJ)$/javaldx.obj

APP1TARGET=javaldx
APP1OBJS=$(OBJFILES)
APP1STDLIBS=$(SALLIB) $(JVMFWKLIB)
APP1RPATH=UREBIN

.ENDIF

# --- Targets ------------------------------------------------------

.INCLUDE : target.mk
# vim: set noet sw=4 ts=4:
72 changes: 72 additions & 0 deletions main/jvmfwk/Library_jvmfwk.mk
@@ -0,0 +1,72 @@
#**************************************************************
#
# 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_Library_Library,jvmfwk))

$(eval $(call gb_Library_add_package_headers,jvmfwk,jvmfwk_inc))

$(eval $(call gb_Library_add_precompiled_header,jvmfwk,$(SRCDIR)/jvmfwk/inc/pch/precompiled_jvmfwk))

$(eval $(call gb_Library_set_versionmap,jvmfwk,$(SRCDIR)/jvmfwk/source/framework.map))

$(eval $(call gb_Library_set_include,jvmfwk,\
$$(INCLUDE) \
-I$(SRCDIR)/jvmfwk/inc/pch \
-I$(OUTDIR)/inc \
))

$(eval $(call gb_Library_add_api,jvmfwk, \
udkapi \
))

$(eval $(call gb_Library_add_defs,jvmfwk,\
-DJVMFWK_DLLIMPLEMENTATION \
))

$(eval $(call gb_Library_add_linked_libs,jvmfwk,\
cppuhelper \
sal \
stl \
$(gb_STDLIBS) \
))

ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_linked_libs,jvmfwk,\
advapi32 \
))
endif

$(eval $(call gb_Library_use_externals,jvmfwk,\
libxml2 \
))

$(eval $(call gb_Library_add_exception_objects,jvmfwk,\
jvmfwk/source/elements \
jvmfwk/source/framework \
jvmfwk/source/fwkbase \
jvmfwk/source/fwkutil \
jvmfwk/source/libxmlutil \
))

# vim: set noet sw=4 ts=4:

74 changes: 74 additions & 0 deletions main/jvmfwk/Library_sunjavaplugin.mk
@@ -0,0 +1,74 @@
#**************************************************************
#
# 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_Library_Library,sunjavaplugin))

$(eval $(call gb_Library_add_package_headers,sunjavaplugin,jvmfwk_inc))

$(eval $(call gb_Library_add_precompiled_header,sunjavaplugin,$(SRCDIR)/jvmfwk/inc/pch/precompiled_plugin))

$(eval $(call gb_Library_set_versionmap,sunjavaplugin,$(SRCDIR)/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.map))

$(eval $(call gb_Library_set_include,sunjavaplugin,\
$$(INCLUDE) \
-I$(SRCDIR)/jvmfwk/inc/pch \
-I$(OUTDIR)/inc \
))

$(eval $(call gb_Library_add_api,sunjavaplugin, \
udkapi \
))

$(eval $(call gb_Library_add_defs,sunjavaplugin,\
-DJVMFWK_DLLIMPLEMENTATION \
))

$(eval $(call gb_Library_add_linked_libs,sunjavaplugin,\
cppu \
cppuhelper \
sal \
salhelper \
stl \
$(gb_STDLIBS) \
))

ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_linked_libs,sunjavaplugin,\
advapi32 \
uwinapi \
))
endif

$(eval $(call gb_Library_add_exception_objects,sunjavaplugin,\
jvmfwk/plugins/sunmajor/pluginlib/gnujre \
jvmfwk/plugins/sunmajor/pluginlib/otherjre \
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin \
jvmfwk/plugins/sunmajor/pluginlib/sunjre \
jvmfwk/plugins/sunmajor/pluginlib/sunversion \
jvmfwk/plugins/sunmajor/pluginlib/util \
jvmfwk/plugins/sunmajor/pluginlib/vendorbase \
jvmfwk/plugins/sunmajor/pluginlib/vendorlist \
))

# vim: set noet sw=4 ts=4:

32 changes: 32 additions & 0 deletions main/jvmfwk/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:
Expand Up @@ -21,41 +21,23 @@



PRJ = ..$/..
PRJNAME = jvmfwk
TARGET = vendors_ooo

.INCLUDE: settings.mk

.IF "$(SOLAR_JAVA)"==""
nojava:
@echo "Not building jvmfwk because Java is disabled"
.ENDIF

.IF "$(SOLAR_JAVA)"!=""
$(BIN)$/javavendors.xml: javavendors_unx.xml javavendors_wnt.xml javavendors_macosx.xml javavendors_linux.xml
.IF "$(GUI)"=="UNX"
.IF "$(OS)"=="FREEBSD"
-$(COPY) javavendors_freebsd.xml $(BIN)$/javavendors.xml
.ELIF "$(OS)"=="MACOSX"
-$(COPY) javavendors_macosx.xml $(BIN)$/javavendors.xml
.ELIF "$(OS)"=="LINUX"
-$(COPY) javavendors_linux.xml $(BIN)$/javavendors.xml
.ELSE
-$(COPY) javavendors_unx.xml $(BIN)$/javavendors.xml
.ENDIF
.ELIF "$(GUI)"=="WNT"
-$(COPY) javavendors_wnt.xml $(BIN)$/javavendors.xml
.ELIF "$(GUI)"=="OS2"
-$(COPY) javavendors_os2.xml $(BIN)$/javavendors.xml
.ELSE
@echo Unsupported platform.
.ENDIF

.ENDIF # "$(SOLAR_JAVA)"!=""




.INCLUDE: target.mk

$(eval $(call gb_Module_Module,jvmfwk))

$(eval $(call gb_Module_add_targets,jvmfwk,\
Ant_jreproperties \
Library_jvmfwk \
Library_sunjavaplugin \
Package_inc \
Package_javasettingsunopkginstall \
Package_javavendors \
Package_jvmfwk3rc \
Package_sunjavapluginrc \
))

ifeq ($(GUI),UNX)
$(eval $(call gb_Module_add_targets,jvmfwk,\
Executable_javaldx \
))
endif

# vim: set noet sw=4 ts=4:
28 changes: 28 additions & 0 deletions main/jvmfwk/Package_inc.mk
@@ -0,0 +1,28 @@
#**************************************************************
#
# 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,jvmfwk_inc,$(SRCDIR)/jvmfwk/inc))

$(eval $(call gb_Package_add_file,jvmfwk_inc,inc/jvmfwk/framework.h,jvmfwk/framework.h))
$(eval $(call gb_Package_add_file,jvmfwk_inc,inc/jvmfwk/jvmfwkdllapi.h,jvmfwk/jvmfwkdllapi.h))
$(eval $(call gb_Package_add_file,jvmfwk_inc,inc/jvmfwk/vendorplugin.h,jvmfwk/vendorplugin.h))

0 comments on commit 8cb913c

Please sign in to comment.