diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-10-26 12:45:26 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-10-26 22:41:32 +0000 |
commit | dd8c8d81de4f361d8f4d259d8a27ac15ab871031 (patch) | |
tree | f5f58699b8bac68785b539b1b78940c8be7ccf06 /solenv/gbuild/extensions | |
parent | trust the size ... tdf#79442 follow-up (diff) | |
download | core-dd8c8d81de4f361d8f4d259d8a27ac15ab871031.tar.gz core-dd8c8d81de4f361d8f4d259d8a27ac15ab871031.zip |
add test for running gbuildtoide on non-build modules
- do concat for json in C++, everything else seems fragile on Windows
- have APPEND vars separately
- check that gbuildtoide work on modules without a full build (modulo
some blacklisted "creative" ones)
Change-Id: I6fe267fee7d1b77d758072303729387dfeb8e6c8
Reviewed-on: https://gerrit.libreoffice.org/30293
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'solenv/gbuild/extensions')
-rw-r--r-- | solenv/gbuild/extensions/post_GbuildToIde.mk | 92 |
1 files changed, 69 insertions, 23 deletions
diff --git a/solenv/gbuild/extensions/post_GbuildToIde.mk b/solenv/gbuild/extensions/post_GbuildToIde.mk index 06d36fe0ab2b..4ed8d61cd4c1 100644 --- a/solenv/gbuild/extensions/post_GbuildToIde.mk +++ b/solenv/gbuild/extensions/post_GbuildToIde.mk @@ -9,37 +9,43 @@ ifneq ($(filter gbuildtoide,$(MAKECMDGOALS)),) +# possibly recurse to ensure gbuildtojson was build before running the modded make +gb_GbuildToIde_prep := $(shell $(MAKE) -f $(SRCDIR)/solenv/Makefile Executable_gbuildtojson) gb_FULLDEPS:= gbuildtoide: - true + @true .PHONY : foo foo: - true + @true define gb_LinkTarget__command -mkdir -p $(WORKDIR)/GbuildToIde/$(dir $(2)) $(WORKDIR)/Headers/$(dir $(2)) -$(if $(filter WNT,$(OS)),mkdir -p $(dir $(call gb_WinResTarget_get_target,dummy))) -printf '{"LINKTARGET": "%s"' '$(2)' > $(WORKDIR)/GbuildToIde/$(2) -printf ', "ILIBTARGET": "%s"' '$(ILIBTARGET)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "COBJECTS": "%s"' '$(COBJECTS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "CXXOBJECTS": "%s"' '$(CXXOBJECTS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "YACCOBJECTS": "%s"' '$(YACCOBJECTS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "OBJCOBJECTS": "%s"' '$(OBJCOBJECTS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "OBJCXXOBJECTS": "%s"' '$(OBJCXXOBJECTS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "ASMOBJECTS": "%s"' '$(ASMOBJECTS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "GENCOBJECTS": "%s"' '$(GENCOBJECTS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "GENCXXOBJECTS": "%s"' '$(GENCXXOBJECTS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "CFLAGS": "%s"' '$(T_CFLAGS) $(T_CFLAGS_APPEND)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "CXXFLAGS": "%s"' '$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "OBJCFLAGS": "%s"' '$(T_OBJCFLAGS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "OBJCXXFLAGS": "%s"' '$(T_OBJCXXFLAGS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "DEFS": "%s"' '$(DEFS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "INCLUDE": "%s"' '$(INCLUDE)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "LINKED_LIBS": "%s"' '$(LINKED_LIBS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf ', "LINKED_STATIC_LIBS": "%s"' '$(LINKED_STATIC_LIBS)' >> $(WORKDIR)/GbuildToIde/$(2) -printf '}\n' >> $(WORKDIR)/GbuildToIde/$(2) +mkdir -p $(WORKDIR)/GbuildToIde/$(dir $(2)) +mkdir -p $(WORKDIR)/LinkTarget/$(dir $(2)) +$(call gb_Executable_get_command,gbuildtojson) \ +--linktarget=$(call var2file,$(shell $(gb_MKTEMP)),100,$(2)) \ +--ilibtarget=$(call var2file,$(shell $(gb_MKTEMP)),100,$(ILIBTARGET)) \ +--cxxobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(CXXOBJECTS)) \ +--yaccobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(YACCOBJECTS)) \ +--objcobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(OBJCOBJECTS)) \ +--objcxxobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(OBJCXXOBJECTS)) \ +--asmobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(ASMOBJECTS)) \ +--gencobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(GENCOBJECTS)) \ +--gencxxobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(GENCXXOBJECTS)) \ +--cflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CFLAGS)) \ +--cflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CFLAGS_APPEND)) \ +--cxxflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CXXFLAGS)) \ +--cxxflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CXXFLAGS_APPEND)) \ +--objcflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_OBJCFLAGS)) \ +--objcflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_OBJCFLAGS_APPEND)) \ +--objcxxflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_OBJCXXFLAGS)) \ +--objcxxflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_OBJCXXFLAGS_APPEND)) \ +--defs=$(call var2file,$(shell $(gb_MKTEMP)),100,$(DEFS)) \ +--include=$(call var2file,$(shell $(gb_MKTEMP)),100,$(INCLUDE)) \ +--linked_libs=$(call var2file,$(shell $(gb_MKTEMP)),100,$(LINKED_LIBS)) \ +--linked_static_libs=$(call var2file,$(shell $(gb_MKTEMP)),100,$(LINKED_STATIC_LIBS)) \ +> $(WORKDIR)/GbuildToIde/$(2) endef define gb_Postprocess_register_target @@ -48,6 +54,46 @@ gbuildtoide : $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3) $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3))): $(gb_Helper_MISCDUMMY) foo endef +gb_LinkTarget_use_static_libraries = +gb_UnoApiHeadersTarget_get_target = foo +gb_UnpackedTarball_get_final_target = foo +gb_LinkTarget__get_headers_check = +gb_LinkTarget_add_cobject = $(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2) +gb_LinkTarget_add_cxxobject = $(call gb_LinkTarget_get_target,$(1)) : CXXOBJECTS += $(2) +gb_LinkTarget_use_package = +gb_LinkTarget_add_sdi_headers = +gb_LinkTarget_use_external_project = +gb_LinkTarget_add_scanners = +gb_LinkTarget_add_grammars = +gb_LinkTarget__check_srcdir_paths = +gb_LinkTarget__command_objectlist = @true +gb_WinResTarget_WinResTarget_init = +gb_WinResTarget_set_rcfile = +gb_WinResTarget_add_defs = +gb_LinkTarget_set_nativeres = +gb_LinkTarget_add_nativeres = +gb_Library_set_componentfile = +gb_LinkTarget_use_restarget = + + +#$(call gb_Library_get_exports_target,%): +$(WORKDIR)/LinkTarget/Library/%.exports: + @true + +define gb_LinkTarget__use_custom_headers +$(call gb_LinkTarget__add_include,$(1),$(call gb_CustomTarget_get_workdir,$(2))) + +endef + +define gb_Module_add_target +$(if $(filter Library_% Executable_%,$(2)),$(call gb_Module__read_targetfile,$(1),$(2),target)) + +$(if $(filter Library_% Executable_%,$(2)),$(call gb_Module_get_nonl10n_target,$(1)) : $$(gb_Module_CURRENTTARGET)) + +endef + +gb_Module_add_l10n_target = + endif # vim: set noet ts=4 sw=4: |