[Libreoffice-commits] core.git: solenv/gbuild

Michael Stahl mstahl at redhat.com
Tue Jul 8 14:36:47 PDT 2014


 solenv/gbuild/AutoInstall.mk |   34 +++++++++++++++++++++++++++-------
 1 file changed, 27 insertions(+), 7 deletions(-)

New commits:
commit 13a3364bad27d19eb09c4f9357e0a9758eba7f61
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jul 8 23:24:36 2014 +0200

    gbuild: AutoInstall: fix the command line for Win32 make
    
    Replace one ugly way with a different ugly way; it looks like the
    make_define invocation did not actually work before.
    
    Change-Id: Idd365f82a6fabab9444471ac88f91d81476bf124

diff --git a/solenv/gbuild/AutoInstall.mk b/solenv/gbuild/AutoInstall.mk
index c6b33f9..60e628f 100644
--- a/solenv/gbuild/AutoInstall.mk
+++ b/solenv/gbuild/AutoInstall.mk
@@ -16,6 +16,20 @@ echo "    $(lastword $(1))" >> $@;
 echo "" >> $@
 endef
 
+define gb_AutoInstall__gen_define
+$(file >>$@,#define auto_$*_ALL \)
+$(foreach binary,$(filter-out $(lastword $(1)),$(1)),$(file >>$@,\
+	$(subst .,_,$(subst -,_,$(binary))), \))
+$(file >>$@,\
+	$(lastword $(1)))
+
+endef
+
+define gb_AutoInstall__gen_lib
+$(SCP2LIBTEMPLATE)(auto_$*_lib_$(1),$(call gb_Library_get_runtime_filename,$(1))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))
+
+endef
+
 $(dir $(call gb_AutoInstall_get_target,%)).dir :
 	$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
 
@@ -23,6 +37,7 @@ $(call gb_AutoInstall_get_target,%) : $(GBUILDDIR)/AutoInstall.mk \
 		$(SRCDIR)/Repository.mk $(SRCDIR)/RepositoryExternal.mk \
 		$(BUILDDIR)/config_host.mk
 	$(call gb_Output_announce,$*,$(true),AIN,3)
+ifeq ($(HAVE_GNUMAKE_FILE_FUNC),)
 	echo "/* autogenerated installs for group $* */" > $@
 	$(call gb_AutoInstall__make_define,\
 		$(foreach lib,$(gb_Library_MODULE_$*),auto_$*_lib_$(lib)) \
@@ -30,13 +45,18 @@ $(call gb_AutoInstall_get_target,%) : $(GBUILDDIR)/AutoInstall.mk \
 		$(foreach exe,$(gb_Executable_MODULE_$*),auto_$*_exe_$(exe)) \
 		$(foreach jar,$(gb_Jar_MODULE_$*),auto_$*_jar_$(jar)) \
 		$(foreach pkg,$(gb_Package_MODULE_$*),auto_$*_pkg_$(pkg)))
-	# ugly hack for Win32 8k command line length limit
-	$(foreach lib,$(wordlist 1,70,$(gb_Library_MODULE_$*)),\
-		echo '$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))' >> $@ &&) true
-	$(foreach lib,$(wordlist 71,140,$(gb_Library_MODULE_$*)),\
-		echo '$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))' >> $@ &&) true
-	$(foreach lib,$(wordlist 141,9999,$(gb_Library_MODULE_$*)),\
-		echo '$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))' >> $@ &&) true
+	$(foreach lib,$(gb_Library_MODULE_$*),\
+		echo '$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))' >> $@;)
+else
+	$(file >$@,/* autogenerated installs for group $* */)
+	$(call gb_AutoInstall__gen_define,\
+		$(foreach lib,$(gb_Library_MODULE_$*),auto_$*_lib_$(lib)) \
+		$(foreach lib,$(gb_SdkLinkLibrary_MODULE_$*),auto_$*_link_$(lib)) \
+		$(foreach exe,$(gb_Executable_MODULE_$*),auto_$*_exe_$(exe)) \
+		$(foreach jar,$(gb_Jar_MODULE_$*),auto_$*_jar_$(jar)) \
+		$(foreach pkg,$(gb_Package_MODULE_$*),auto_$*_pkg_$(pkg)))
+	$(file >>$@,$(foreach lib,$(gb_Library_MODULE_$*),$(call gb_AutoInstall__gen_lib,$(lib))))
+endif
 	$(foreach lib,$(gb_SdkLinkLibrary_MODULE_$*),\
 		echo 'SDK_LIBRARY_LINK(auto_$*_link_$(lib),$(notdir $(call gb_Library_get_sdk_link_lib,$(lib))),../../ure-link/lib/$(call gb_Library_get_runtime_filename,$(lib)))' >> $@;)
 	$(foreach exe,$(gb_Executable_MODULE_$*),\


More information about the Libreoffice-commits mailing list