diff options
author | Rene Engelhard <rene@debian.org> | 2018-04-25 15:53:03 +0100 |
---|---|---|
committer | Rene Engelhard <rene@debian.org> | 2018-04-25 20:57:47 +0200 |
commit | e514db95679658dfdb91a775999793d32de36cff (patch) | |
tree | 10e9899cacaddf80d5d2e0b04ed0f5d783d4726a /odk | |
parent | 70882a41a7645aa279bd08b0ba35e89ceacde56a (diff) |
fix build
Change-Id: If2315987d2447b1a44f3e62384f03d2621be7106
Reviewed-on: https://gerrit.libreoffice.org/53455
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Rene Engelhard <rene@debian.org>
Diffstat (limited to 'odk')
-rw-r--r-- | odk/CustomTarget_build-examples.mk | 8 | ||||
-rw-r--r-- | odk/CustomTarget_build-examples_java.mk | 8 | ||||
-rw-r--r-- | odk/Module_odk.mk | 2 | ||||
-rw-r--r-- | odk/build-examples_common.mk | 34 |
4 files changed, 25 insertions, 27 deletions
diff --git a/odk/CustomTarget_build-examples.mk b/odk/CustomTarget_build-examples.mk index d97fa0abf727..c72efef71b85 100644 --- a/odk/CustomTarget_build-examples.mk +++ b/odk/CustomTarget_build-examples.mk @@ -7,10 +7,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -testname=odk/build-examples - -$(eval $(call gb_CustomTarget_CustomTarget,$(testname))) - my_example_dirs = \ CLI/CSharp/Spreadsheet \ CLI/VB.NET/WriterDemo \ @@ -33,8 +29,6 @@ my_example_dirs = \ # cpp/custompanel \ -.PHONY: $(call gb_CustomTarget_get_target,$(testname)) - -include $(SRCDIR)/odk/build-examples_common.mk +$(eval $(call odk_build-examples_test,odk/build-examples)) # vim: set noet sw=4 ts=4: diff --git a/odk/CustomTarget_build-examples_java.mk b/odk/CustomTarget_build-examples_java.mk index 3fc4d6c40328..6d77ac50f039 100644 --- a/odk/CustomTarget_build-examples_java.mk +++ b/odk/CustomTarget_build-examples_java.mk @@ -7,10 +7,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -testname=odk/build-examples_java - -$(eval $(call gb_CustomTarget_CustomTarget,$(testname))) - my_example_dirs = \ DevelopersGuide/BasicAndDialogs/CreatingDialogs \ DevelopersGuide/Charts \ @@ -61,8 +57,6 @@ my_example_dirs = \ # java/NotesAccess \ # java/Storage \ -.PHONY: $(call gb_CustomTarget_get_target,$(testname)) - -include $(SRCDIR)/odk/build-examples_common.mk +$(eval $(call odk_build-examples_test,odk/build-examples_java)) # vim: set noet sw=4 ts=4: diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk index 2eaa2b1617f0..410f8cf8ef1e 100644 --- a/odk/Module_odk.mk +++ b/odk/Module_odk.mk @@ -7,6 +7,8 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +include $(SRCDIR)/odk/build-examples_common.mk + $(eval $(call gb_Module_Module,odk)) $(eval $(call gb_Module_add_targets,odk,\ diff --git a/odk/build-examples_common.mk b/odk/build-examples_common.mk index 5847c3bc29a8..c0142d3c633b 100644 --- a/odk/build-examples_common.mk +++ b/odk/build-examples_common.mk @@ -1,44 +1,52 @@ -$(call gb_CustomTarget_get_target,$(testname)): \ - $(call gb_CustomTarget_get_workdir,$(testname))/setsdkenv +define odk_build-examples_test + +$(eval $(call gb_CustomTarget_CustomTarget,$(1))) + +$(call gb_CustomTarget_get_target,$(1)): \ + $(call gb_CustomTarget_get_workdir,$(1))/setsdkenv ifneq ($(gb_SUPPRESS_TESTS),) @true else - $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1) - rm -fr $(call gb_CustomTarget_get_workdir,$(testname))/{out,user} + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$(1)),$(true),CHK,1) + rm -fr $(call gb_CustomTarget_get_workdir,$(1))/{out,user} ifeq (MACOSX,$(OS)) $(eval ODK_BUILD_SHELL := $(shell $(gb_MKTEMP))) cp /bin/sh "$(ODK_BUILD_SHELL)" chmod 0700 "$(ODK_BUILD_SHELL)" endif - (saved_library_path=$${$(gb_Helper_LIBRARY_PATH_VAR)} && . $< \ + (saved_library_path=$${$(gb_Helper_LIBRARY_PATH_VAR)} && . $$< \ $(if $(filter MACOSX,$(OS)),, \ && $(gb_Helper_LIBRARY_PATH_VAR)=$$saved_library_path) \ && export \ - UserInstallation=$(call gb_Helper_make_url,$(call gb_CustomTarget_get_workdir,$(testname))/user) \ + UserInstallation=$(call gb_Helper_make_url,$(call gb_CustomTarget_get_workdir,$(1))/user) \ $(foreach my_dir,$(my_example_dirs), \ && (cd $(INSTDIR)/$(SDKDIRNAME)/examples/$(my_dir) \ && printf 'yes\n' | LC_ALL=C make \ $(if $(filter MACOSX,$(OS)), SHELL=$(ODK_BUILD_SHELL), )))) \ - >$(call gb_CustomTarget_get_workdir,$(testname))/log 2>&1 \ + >$(call gb_CustomTarget_get_workdir,$(1))/log 2>&1 \ || (RET=$$? \ $(if $(filter MACOSX,$(OS)), && rm -f $(ODK_BUILD_SHELL) , ) \ - && cat $(call gb_CustomTarget_get_workdir,$(testname))/log \ + && cat $(call gb_CustomTarget_get_workdir,$(1))/log \ && exit $$RET) ifeq (MACOSX,$(OS)) -rm -f $(ODK_BUILD_SHELL) endif endif -$(call gb_CustomTarget_get_workdir,$(testname))/setsdkenv: \ +$(call gb_CustomTarget_get_workdir,$(1))/setsdkenv: \ $(SRCDIR)/odk/config/setsdkenv_unix.sh.in \ $(BUILDDIR)/config_$(gb_Side).mk | \ - $(call gb_CustomTarget_get_workdir,$(testname))/.dir - $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1) + $(call gb_CustomTarget_get_workdir,$(1))/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$(1)),$(true),SED,1) sed -e 's!@OO_SDK_NAME@!sdk!' \ -e 's!@OO_SDK_HOME@!$(INSTDIR)/$(SDKDIRNAME)!' \ -e 's!@OFFICE_HOME@!$(INSTROOTBASE)!' -e 's!@OO_SDK_MAKE_HOME@!!' \ -e 's!@OO_SDK_ZIP_HOME@!!' -e 's!@OO_SDK_CAT_HOME@!!' \ -e 's!@OO_SDK_SED_HOME@!!' -e 's!@OO_SDK_CPP_HOME@!!' \ -e 's!@OO_SDK_JAVA_HOME@!$(JAVA_HOME)!' \ - -e 's!@OO_SDK_OUTPUT_DIR@!$(call gb_CustomTarget_get_workdir,$(testname))/out!' \ - -e 's!@SDK_AUTO_DEPLOYMENT@!YES!' $< > $@ + -e 's!@OO_SDK_OUTPUT_DIR@!$(call gb_CustomTarget_get_workdir,$(1))/out!' \ + -e 's!@SDK_AUTO_DEPLOYMENT@!YES!' $$< > $$@ + +.PHONY: $(call gb_CustomTarget_get_target,$(1)) + +endef |