diff options
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 107 |
1 files changed, 71 insertions, 36 deletions
diff --git a/Makefile.in b/Makefile.in index 300469aa0d5e..ab7090ee1e77 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,7 +9,7 @@ gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck uicheck screenshot -.PHONY : check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch get-submodules id install install-gdb-printers install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS) +.PHONY : check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch get-submodules id install install-gdb-printers install-strip tags debugrun help showmodules translations packageinfo coverage internal.clean $(gb_Top_MODULE_CHECK_TARGETS) MAKECMDGOALS?=build build_goal:=$(if $(filter build uicheck,$(MAKECMDGOALS)),build)\ @@ -79,38 +79,27 @@ export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS)) PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),) -IWYU_OPTION := $(if $(IWYU_PATH),-k CC=$(IWYU_PATH) CXX=$(IWYU_PATH),) - -# don't want to have a dependency to iwyudummy.generate because it's -# useful to manually edit the generated StaticLibrary_iwyudummy.mk -iwyudummy: bootstrap fetch - $(if $(wildcard $(BUILDDIR)/iwyudummy),,$(error first call "make iwyudummy.generate")) - cd $(BUILDDIR)/iwyudummy && $(MAKE) $(IWYU_OPTION) $(GMAKE_OPTIONS) - -iwyudummy.generate: - $(SRCDIR)/bin/gen-iwyu-dummy-lib - # # Partial Build # define gb_Top_GbuildModuleRules -.PHONY: $(1) $(1).build $(1).all $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)) +.PHONY: $(1) $(1).build $(1).all $(1).check $(1).clean $(1).showdeliverables $(1).coverage $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)) .PHONY: $(1).allbuild $(1).buildall $(1).allcheck $(1).checkall $(1): bootstrap fetch - cd $(SRCDIR)/$(2) && $$(MAKE) $(IWYU_OPTION) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) + cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -$(1).build $(1).check $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)): bootstrap fetch +$(1).build $(1).check $(1).coverage $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)): bootstrap fetch cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@) $(1).clean $(1).showdeliverables: cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@) $(1).allbuild $(1).buildall: bootstrap fetch - $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) + $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(1).allcheck $(1).checkall: bootstrap fetch - $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1) + $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1) $(1).all: @echo "'make $(1).all' was renamed to 'make $(1).allcheck' (or use 'make $(1).allbuild' to build without unit tests)" @@ -203,6 +192,7 @@ ifeq ($(OS),ANDROID) rm -fr $(SRCDIR)/android/source/assets rm -fr $(SRCDIR)/android/source/assets_fullUI rm -fr $(SRCDIR)/android/source/assets_strippedUI + rm -fr $(SRCDIR)/android/source/res_generated endif endif @@ -211,7 +201,7 @@ include $(SRCDIR)/compilerplugins/Makefile.mk # # Distclean # -distclean : clean compilerplugins-clean +distclean : clean compilerplugins-clean mac-app-store-package.clean rm -fr \ $(BUILDDIR)/Makefile \ $(BUILDDIR)/aclocal.m4 \ @@ -236,9 +226,10 @@ distclean : clean compilerplugins-clean $(BUILDDIR)/hardened_runtime.xcent \ $(BUILDDIR)/instsetoo_native/util/openoffice.lst \ $(BUILDDIR)/solenv/lockfile/autoconf.h \ + $(BUILDDIR)/lo.xcent \ $(BUILDDIR)/sysui/desktop/macosx/Info.plist \ $(BUILDDIR)/vs-code*.code-workspace* - $(if $(filter WNT,$(OS)),env -i PATH="$$PATH") $(FIND) $(SRCDIR)/solenv/gdb -name \*.pyc -exec rm {} \; + $(if $(filter WNT,$(OS)),env -i PATH="$$PATH") $(FIND) $(SRCDIR)/solenv/gdb -name \*.pyc -exec rm -f {} \; # # custom command @@ -270,7 +261,7 @@ $(if $(gb_LO_VER),,$(error Error while retrieving $$lo_sources_ver from $(SRCDIR get-submodules: | download ifneq ($(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),$(SRCDIR)/src/libreoffice-$(i)-$(gb_LO_VER)),$(wildcard $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),$(SRCDIR)/src/libreoffice-$(i)-$(gb_LO_VER)))) $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\ - $(call fetch_Download_item_unchecked,http://download.documentfoundation.org/libreoffice/src/$(shell echo $(gb_LO_VER) | sed -e "s/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/"),libreoffice-$(i)-$(gb_LO_VER).tar.xz)) + $(call fetch_Download_item_unchecked,https://download.documentfoundation.org/libreoffice/src/$(shell echo $(gb_LO_VER) | sed -e "s/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/"),libreoffice-$(i)-$(gb_LO_VER).tar.xz)) $(SRCDIR)/bin/unpack-sources $(SRCDIR) $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\ $(TARFILE_LOCATION)/libreoffice-$(i)-$(gb_LO_VER).tar.xz) endif @@ -301,9 +292,9 @@ ifeq ($(OS),iOS) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios endif -build-non-l10n-only build-l10n-only check debugrun translations packageinfo $(gb_Top_MODULE_CHECK_TARGETS): build +build-non-l10n-only build-l10n-only check debugrun translations packageinfo coverage $(gb_Top_MODULE_CHECK_TARGETS): build -help showmodules gbuildtojson: +help showmodules gbuildtojson pocheck: $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@ cross-toolset: bootstrap fetch install-gdb-printers @@ -330,7 +321,7 @@ endif define gb_Top_DoInstall echo "$(1) in $(INSTALLDIR) ..." && \ -$(SRCDIR)/solenv/bin/ooinstall $(2) "$(INSTALLDIR)" +WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/solenv/bin/ooinstall $(2) "$(INSTALLDIR)" endef @@ -368,7 +359,7 @@ test-install: build ifeq ($(OS_FOR_BUILD),WNT) cd $(SRCDIR)/instsetoo_native && $(MAKE) LIBO_TEST_INSTALL=TRUE $(GMAKE_OPTIONS) else - @$(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR) + @WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR) ifeq ($(OS),MACOSX) # # Create Resources/*.lproj directories for languages supported by macOS @@ -397,7 +388,9 @@ ifneq ($(ENABLE_MACOSX_SANDBOX),) rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unopkg rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unoinfo endif -# +ifneq ($(MACOSX_PROVISIONING_PROFILE),) + cp "$(MACOSX_PROVISIONING_PROFILE)" $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/embedded.provisionprofile +endif ifneq ($(MACOSX_CODESIGNING_IDENTITY),) # Then use the macosx-codesign-app-bundle script @$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app @@ -406,21 +399,61 @@ endif endif @$(call gb_Top_InstallFinished,Test Installation,$(TESTINSTALLDIR)) -mac-app-store-package: test-install +# target to bypass the packaging steps/to only assemble the package +mac-app-store-package.prepare: $(BUILDDIR)/$(PLATFORMID)/done + +# shorthand target to build a complete package for the currently building architecture +mac-app-store-package: mac-app-store-package.$(PLATFORMID) + +# recipe/targets to do the actual packaging +# the symbolication switch to productbuild unfortunately is undocumented, but that is what XCode +# uses when it creates a package with symbols for uploading to the appstore +mac-app-store-package.$(PLATFORMID) mac-app-store-package.universal: mac-app-store-package.%: $(BUILDDIR)/%/done ifneq ($(MACOSX_PACKAGE_SIGNING_IDENTITY),) - rm -rf "$(PRODUCTNAME).app" - mv "$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app" "$(PRODUCTNAME).app" - productbuild --component "$(PRODUCTNAME).app" /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(PRODUCTNAME_WITHOUT_SPACES).pkg + $(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $*/"$(PRODUCTNAME)".app + productbuild $(if $(ENABLE_SYMBOLS_FOR),--symbolication $*/Symbols) --component $*/"$(PRODUCTNAME)".app /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(PRODUCTNAME_WITHOUT_SPACES).pkg else @echo You did not provide an installer signing identity with --enable-macosx-package-signing @exit 1 endif +# the builds need to persist a standard "make clean" to be able to combine them into a universal +# binary, so provide an additional target that can be used standalone or via make distclean +mac-app-store-package.clean: + rm -rf \ + $(BUILDDIR)/macosx_x86_64 \ + $(BUILDDIR)/macosx_aarch64 \ + $(BUILDDIR)/universal \ + $(BUILDDIR)/$(PRODUCTNAME_WITHOUT_SPACES).pkg + +# used by the mac-app-store targets +$(BUILDDIR)/$(PLATFORMID)/done: test-install + rm -rf $(PLATFORMID) + mkdir -p $(PLATFORMID)/Symbols + mv $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app $(PLATFORMID)/"$(PRODUCTNAME)".app +ifneq ($(ENABLE_SYMBOLS_FOR),) + symbols -arch all -symbolsPackageDir $(PLATFORMID)/Symbols $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/[^L]* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/MacOS/* + strip -S $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/[^L]* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/MacOS/* +endif + touch $@ + +# build one arch using the mac-app-store-package.prepare target, make clean and change the autogen.input +# to build for the other target, then use mac-app-store-package.universal to build for the other arch and +# combine the two into a universal binary +$(BUILDDIR)/universal/done: $(BUILDDIR)/macosx_x86_64/done $(BUILDDIR)/macosx_aarch64/done + rm -rf universal + mkdir -p universal/Symbols +ifneq ($(ENABLE_SYMBOLS_FOR),) + cp -a macosx_x86_64/Symbols/* macosx_aarch64/Symbols/* universal/Symbols/ +endif + $(SRCDIR)/bin/merge-app-bundles macosx_x86_64/"$(PRODUCTNAME)".app macosx_aarch64/"$(PRODUCTNAME)".app universal/"$(PRODUCTNAME)".app + touch $@ + distro-pack-install: install - $(SRCDIR)/bin/distro-install-clean-up + WITH_LANG_LIST="$(WITH_LANG_LIST)" WITH_POOR_HELP_LOCALIZATIONS="$(WITH_POOR_HELP_LOCALIZATIONS)" $(SRCDIR)/bin/distro-install-clean-up $(SRCDIR)/bin/distro-install-desktop-integration $(SRCDIR)/bin/distro-install-sdk - $(SRCDIR)/bin/distro-install-file-lists + WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/bin/distro-install-file-lists install-package-%: $(MAKE) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@ @@ -466,9 +499,6 @@ upload-symbols: create-update-info: $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-update-info -upload-update-info: - $(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-update-info - create-partial-info: $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-partial-info @@ -485,10 +515,10 @@ clang-format-check: @$(SRCDIR)/solenv/clang-format/check-last-commit define gb_Top_GbuildToIdeIntegration -$(1)-ide-integration: gbuildtojson $(if $(filter MACOSX,$(OS_FOR_BUILD)),python3.all) +$(1)-ide-integration: gbuildtojson $(if $(filter MACOSX,$(OS_FOR_BUILD)),python3.allbuild) cd $(SRCDIR) && \ $(if $(filter MACOSX,$(OS_FOR_BUILD)),PATH="$(INSTROOT_FOR_BUILD)/Frameworks/LibreOfficePython.framework/Versions/Current/bin:$(PATH)") \ - $(SRCDIR)/bin/gbuild-to-ide --ide $(1) --make $(MAKE) + bin/gbuild-to-ide --ide $(1) --make $(MAKE) endef @@ -508,6 +538,11 @@ $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide)))) # this target is provided primarily for consistency with the other ide-integrations vscode-ide-integration: $(BUILDDIR)/vs-code.code-workspace vim-ide-integration +# ToDo: there probably is a way to have it at least create the compile-commands.json file +# for the vim/vs-code integration without building the registry stuff +Rdb:| fetch +gbuildtojson: Rdb + $(BUILDDIR)/vs-code.code-workspace: $(BUILDDIR)/vs-code.code-workspace.template @test -e $@ || cp $< $@ && \ cmp -s $@ $< || echo "ATTN: $(@F) differs from $(<F), please check yourself for changes" |