office-gobmx/odk/settings/std.mk
Stephan Bergmann 40f2aee658 Provide unoidl-write also for the SDK
...after the new types.rdb format that unoidl-write generates has been used
internally since LibreOffice 4.1 in 2013; following up on
6db34b6b33 "Directly build UNOIDL .rdb files from
.idl files" and its "The legacy tools idlc, regcompare, regmerge, and regview
are still contained in the URE or SDK for now."

The tools idlc and regmerge are deprecated but still shipped in the SDK for now.
The plan is to drop them completely for LO 7.5.

odk/examples/ and ure/source/uretest/ are adapted to use unoidl-write instead of
idlc and regmerge:

* unoidl-write does not use a C preprocessor and the # directives in .idl files,
  it supports reading a single .idl file (containing an arbitrary number of
  declarations) or a directory tree where each directory corresponds to a UNOIDL
  module of the same name and each .idl file contains the declaration of the
  (non-module) UNOIDL entity of the same name.  For some of the odk/examples/,
  that required moving individual .idl files into sub-directories named after
  the respective modules.  In odk/settings/std.mk, definitinos of IDL and
  REGMERGE have been replaced with a new UNOIDLWRITE.

* unoidl-write always enforces reserved UNOIDL identifier restrictions (see
  04af4e4f55 "[API CHANGE] Fix all bad UNOIDL
  identifiers across offapi" and 6201792406
  "Enforce the UNOIDL identifier scheme") (which idlc only enforced optionally
  with -cid -we).  That required renaming "my_module" in
  odk/examples/DevelopersGuide/Components/CppComponent/.

* The new types.rdb format is not compatibly with LibreOffice < 4.1.  Clients
  generating extensions containing such files are advised to use appropriate
  LibreOffice-minimal-version elements.

Change-Id: I1a248fd96e86ecbf407f829bc100d44bfe7f4e7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130533
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-25 16:46:26 +01:00

98 lines
2.9 KiB
Makefile

#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# 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 .
#
ifneq "$(OO_SDK_OUT)" ""
OUT=$(subst \,/,$(OO_SDK_OUT))/$(OS)example.out
else
OUT=$(PRJ)/$(OS)example.out
endif
UNOPKG_EXT=uno.pkg
UNOOXT_EXT=oxt
OUT_BIN=$(OUT)/bin
OUT_INC=$(OUT)/inc
OUT_SLO=$(OUT)/slo
OUT_LIB=$(OUT)/lib
OUT_SLB=$(OUT)/slb
OUT_MISC=$(OUT)/misc
OUT_OBJ=$(OUT)/obj
OUT_CLASS=$(OUT)/class
IDL_DIR=$(PRJ)/idl
BIN_DIR=$(PRJ)/bin
CLASSES_DIR=$(PRJ)/classes
URE_CLASSES_DIR=$(subst \,/,$(OO_SDK_URE_JAVA_DIR))
ifeq "$(PLATFORM)" "macosx"
OFFICE_CLASSES_DIR=$(subst \,/,$(OFFICE_PROGRAM_PATH))/../Resources/java
else
OFFICE_CLASSES_DIR=$(subst \,/,$(OFFICE_PROGRAM_PATH))/classes
endif
COMP_PACKAGE_DIR=$(subst /,$(PS),$(OUT_BIN))
SDKTYPEFLAG=$(OUT_MISC)/oosdk_cpp_types.flag
URE_TYPES="$(subst \,/,$(URE_MISC)$(PS)types.rdb)"
URE_SERVICES="$(subst \\,\,$(URE_MISC)$(PS)services.rdb)"
ifeq "$(PLATFORM)" "macosx"
OFFICE_TYPES="$(subst \,/,$(OFFICE_PROGRAM_PATH)$(PS)..$(PS)Resources$(PS)types$(PS)offapi.rdb)"
OFFICE_SERVICES="$(subst \\,\,$(OFFICE_PROGRAM_PATH)$(PS)..$(PS)Resources$(PS)services$(PS)services.rdb)"
else
OFFICE_TYPES="$(subst \,/,$(OFFICE_PROGRAM_PATH)$(PS)types$(PS)offapi.rdb)"
OFFICE_SERVICES="$(subst \\,\,$(OFFICE_PROGRAM_PATH)$(PS)services$(PS)services.rdb)"
endif
OFFICE_TYPE_LIBRARY="$(OFFICE_TYPES)"
JAVA_OPTIONS=
ifneq "$(OO_SDK_JAVA_HOME)" ""
JAVA_BITS := $(shell $(OO_SDK_JAVA_HOME)/bin/java -version 2>&1 | tail -1 | cut -d " " -f3)
ifeq "$(JAVA_BITS)" "64-Bit"
ifneq "$(PROCTYPE)" "x86_64"
JAVA_OPTIONS=-d32
endif
endif
endif
DEPLOYTOOL="$(OFFICE_PROGRAM_PATH)$(PS)unopkg" add -f
SDK_JAVA="$(OO_SDK_JAVA_HOME)/bin/java" $(JAVA_OPTIONS)
SDK_JAVAC="$(OO_SDK_JAVA_HOME)/bin/javac"
SDK_JAR="$(OO_SDK_JAVA_HOME)/bin/jar"
ifneq "$(OO_SDK_ZIP_HOME)" ""
SDK_ZIP="$(OO_SDK_ZIP_HOME)/zip"
else
SDK_ZIP=zip
endif
ifneq "$(OO_SDK_CAT_HOME)" ""
SDK_CAT="$(OO_SDK_CAT_HOME)/cat"
else
SDK_CAT=cat
endif
ifneq "$(OO_SDK_SED_HOME)" ""
SDK_SED="$(OO_SDK_SED_HOME)/sed"
else
SDK_SED=sed
endif
IDLC="$(OO_SDK_HOME)/bin/idlc"
UNOIDLWRITE="$(OO_SDK_HOME)/bin/unoidl-write"
CPPUMAKER="$(OO_SDK_HOME)/bin/cppumaker"
JAVAMAKER="$(OO_SDK_HOME)/bin/javamaker"
REGMERGE="$(OO_SDK_URE_BIN_DIR)/regmerge"
SDK_JAVA_UNO_BOOTSTRAP_FILES=\
-C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/$(SQM)