[Libreoffice-commits] core.git: 2 commits - jurt/CustomTarget_test_urp.mk offapi/UnoApi_offapi.mk oovbaapi/UnoApi_oovbaapi.mk ridljar/CustomTarget_javamaker.mk scp2/source solenv/bin solenv/gbuild udkapi/UnoApi_udkapi.mk unoil/CustomTarget_javamaker.mk

Michael Stahl mstahl at redhat.com
Fri Oct 25 07:50:34 PDT 2013


 jurt/CustomTarget_test_urp.mk                      |    5 
 offapi/UnoApi_offapi.mk                            |    4 
 oovbaapi/UnoApi_oovbaapi.mk                        |    4 
 ridljar/CustomTarget_javamaker.mk                  |    2 
 scp2/source/ooo/ure.scp                            |    5 
 solenv/bin/modules/installer.pm                    |    9 -
 solenv/bin/modules/installer/substfilenamefiles.pm |  156 ---------------------
 solenv/gbuild/TargetLocations.mk                   |    5 
 solenv/gbuild/UnoApi.mk                            |   13 -
 udkapi/UnoApi_udkapi.mk                            |    4 
 unoil/CustomTarget_javamaker.mk                    |    8 -
 11 files changed, 21 insertions(+), 194 deletions(-)

New commits:
commit 71adf4e972b3e8a32f60e2edf31bfbba3be28dca
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Oct 25 16:43:55 2013 +0200

    installer: remove SUBST_FILENAME/InstallName with prejudice
    
    Change-Id: I24b086643fad46e4403ba087d2b65528bf090422

diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 3d36acf..d5698cf 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -47,7 +47,6 @@ use installer::scriptitems;
 use installer::setupscript;
 use installer::simplepackage;
 use installer::strip qw(strip_libraries);
-use installer::substfilenamefiles;
 use installer::systemactions;
 use installer::windows::assembly;
 use installer::windows::binary;
@@ -632,14 +631,6 @@ sub run {
         }
 
         #####################################
-        # Files with flag SUBST_FILENAME
-        #####################################
-
-        installer::logger::print_message( "... analyzing files with flag SUBST_FILENAME ...\n" );
-
-        installer::substfilenamefiles::resolving_subst_filename_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, $languagestringref);
-
-        #####################################
         # Files with flag SCPZIP_REPLACE
         #####################################
 
diff --git a/solenv/bin/modules/installer/substfilenamefiles.pm b/solenv/bin/modules/installer/substfilenamefiles.pm
deleted file mode 100644
index 839a2af..0000000
--- a/solenv/bin/modules/installer/substfilenamefiles.pm
+++ /dev/null
@@ -1,156 +0,0 @@
-#
-# 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 .
-#
-
-package installer::substfilenamefiles;
-
-use installer::exiter;
-use installer::globals;
-use installer::logger;
-use installer::pathanalyzer;
-use installer::systemactions;
-
-#########################################################
-# Analyzing files with flag SUBST_FILENAME
-#########################################################
-
-sub resolving_subst_filename_flag
-{
-    my ($filesarrayref, $variableshashref, $languagestringref) = @_;
-
-    my $replacedirbase = installer::systemactions::create_directories("change_filename", $languagestringref);
-
-    installer::logger::include_header_into_logfile("Files with flag SUBST_FILENAME:");
-
-    for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
-    {
-        my $onefile = ${$filesarrayref}[$i];
-        my $styles = "";
-
-        if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
-
-        if ( $styles =~ /\bSUBST_FILENAME\b/ )
-        {
-            # Files with flag SUBST_FILENAME must have a "Substitute" key
-            if (( ! $onefile->{'Substitute'} ) && ( ! $onefile->{'InstallName'} ))
-            {
-                installer::exiter::exit_program("ERROR: SUBST_FILENAME is set, but no Substitute and no InstallName defined at file $onefile->{'gid'}!", "resolving_subst_filename_flag");
-            }
-
-            # Language specific subdirectory
-            my $onelanguage = $onefile->{'specificlanguage'};
-
-            if ($onelanguage eq "")
-            {
-                $onelanguage = "00";    # files without language into directory "00"
-            }
-
-            my $replacedir = $replacedirbase . $installer::globals::separator . $onelanguage . $installer::globals::separator;
-            installer::systemactions::create_directory($replacedir);    # creating language specific directories
-
-            # copy files and edit them with the variables defined in the zip.lst
-
-            my $longfilename = 0;
-
-            my $onefilename = $onefile->{'Name'};
-
-            my $sourcepath = $onefile->{'sourcepath'};
-
-            if ( $onefilename =~ /\Q$installer::globals::separator\E/ ) # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
-            {
-                $onefilename =~ s/^\s*\Q$installer::globals::separator\E//;
-                $longfilename = 1;
-            }
-
-            my $destinationpath = $replacedir . $onefilename;
-            my $movepath = $destinationpath . ".orig";
-            my $destdir = $replacedir;
-
-            if ( $longfilename )    # the destination directory has to be created before copying
-            {
-                $destdir = $movepath;
-                installer::pathanalyzer::get_path_from_fullqualifiedname(\$destdir);
-                installer::systemactions::create_directory_structure($destdir);
-            }
-
-            my $copysuccess = installer::systemactions::copy_one_file($sourcepath, $movepath);
-
-            if ( $copysuccess )
-            {
-                if ( $onefile->{'Substitute'} )
-                {
-                    my $substitute = $onefile->{'Substitute'};
-
-                    my $newfilename = $destinationpath;
-                    installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newfilename);
-                    eval '$newfilename =~ ' . "$substitute";
-
-                    my $longnewfilename = $destdir . $newfilename;
-
-                    $copysuccess = installer::systemactions::copy_one_file($movepath, $longnewfilename);
-
-                    # Saving the new file name
-                    $onefile->{'Name'} = $newfilename;
-
-                    # Saving the new destination
-                    my $newdest = $onefile->{'destination'};
-                    installer::pathanalyzer::get_path_from_fullqualifiedname(\$newdest);
-                    $onefile->{'destination'} = $newdest . $newfilename;
-
-                    # Saving the original source, where the file was found
-                    $onefile->{'originalsourcepath'} = $onefile->{'sourcepath'};
-
-                    # Writing the new sourcepath into the hashref, even if it was not copied
-                    $onefile->{'sourcepath'} = $longnewfilename;
-                }
-                else
-                {
-                    if ( $onefile->{'InstallName'} )
-                    {
-                        my $installname = $onefile->{'InstallName'};
-
-                        my $newfilename = $destinationpath;
-                        installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newfilename);
-
-                        my $longnewfilename = $destdir . $installname;
-
-                        $copysuccess = installer::systemactions::copy_one_file($movepath, $longnewfilename);
-
-                        # Saving the new file name
-                        $onefile->{'Name'} = $installname;
-
-                        # Saving the new destination
-                        my $newdest = $onefile->{'destination'};
-                        installer::pathanalyzer::get_path_from_fullqualifiedname(\$newdest);
-                        $onefile->{'destination'} = $newdest . $installname;
-
-                        # Saving the original source, where the file was found
-                        $onefile->{'originalsourcepath'} = $onefile->{'sourcepath'};
-
-                        # Writing the new sourcepath into the hashref, even if it was not copied
-                        $onefile->{'sourcepath'} = $longnewfilename;
-                    }
-                }
-            }
-        }
-    }
-
-    my $infoline = "\n";
-    push( @installer::globals::logfileinfo, $infoline);
-}
-
-1;
commit 5b29d3a7fd759fd3d35af4a13e0977be6c20cd99
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Oct 25 16:45:41 2013 +0200

    gbuild: refactor UnoApi to remove rdb files from OUTDIR
    
    - gb_UnoApi_get_target returns the files in INSTDIR
    - stop using rdb files from OUTDIR
    - remove gb_UnoApi_install
    - remove pointless 2nd parameter of gb_UnoApi_UnoApi
    - order-only dependency from gb_UnoApi_get_target to
      gb_UnoApiHeadersTarget_get_target because INSTDIR .rdb is always outdated
    
    Change-Id: Id418f75e9b38d6fe135b55eca2594c2624bc41cc

diff --git a/jurt/CustomTarget_test_urp.mk b/jurt/CustomTarget_test_urp.mk
index 01bf397..ce2fa37 100644
--- a/jurt/CustomTarget_test_urp.mk
+++ b/jurt/CustomTarget_test_urp.mk
@@ -15,11 +15,12 @@ $(call gb_CustomTarget_get_target,jurt/test/com/sun/star/lib/uno/protocols/urp)
 
 $(jurt_TESTURP)/done : \
 		$(call gb_UnoApiTarget_get_target,test_urp) \
-		$(OUTDIR)/bin/udkapi.rdb \
+		$(call gb_UnoApi_get_target,udkapi) \
 		$(call gb_Executable_get_runtime_dependencies,javamaker)
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
 	rm -rf $(jurt_TESTURP) && \
-	$(call gb_Helper_execute,javamaker -O$(jurt_TESTURP) -nD $< -X$(OUTDIR)/bin/udkapi.rdb) && \
+	$(call gb_Helper_execute,javamaker -O$(jurt_TESTURP) -nD $< \
+		-X$(call gb_UnoApi_get_target,udkapi)) && \
 	touch $@
 
 # vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 4eb72ac..8b63afd 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -17,9 +17,7 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
-$(eval $(call gb_UnoApi_UnoApi,offapi,offapi))
-
-$(eval $(call gb_UnoApi_install,offapi,$(LIBO_ETC_FOLDER)/types/offapi.rdb))
+$(eval $(call gb_UnoApi_UnoApi,offapi))
 
 $(eval $(call gb_UnoApi_package_idlfiles,offapi))
 
diff --git a/oovbaapi/UnoApi_oovbaapi.mk b/oovbaapi/UnoApi_oovbaapi.mk
index a80fb88..bd883f0 100644
--- a/oovbaapi/UnoApi_oovbaapi.mk
+++ b/oovbaapi/UnoApi_oovbaapi.mk
@@ -17,9 +17,7 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
-$(eval $(call gb_UnoApi_UnoApi,oovbaapi,oovbaapi))
-
-$(eval $(call gb_UnoApi_install,oovbaapi,$(LIBO_ETC_FOLDER)/types/oovbaapi.rdb))
+$(eval $(call gb_UnoApi_UnoApi,oovbaapi))
 
 $(eval $(call gb_UnoApi_use_api,oovbaapi,\
     udkapi \
diff --git a/ridljar/CustomTarget_javamaker.mk b/ridljar/CustomTarget_javamaker.mk
index a06e485..2f53fbf 100644
--- a/ridljar/CustomTarget_javamaker.mk
+++ b/ridljar/CustomTarget_javamaker.mk
@@ -13,7 +13,7 @@ ridljar_DIR := $(call gb_CustomTarget_get_workdir,ridljar/javamaker)
 
 $(call gb_CustomTarget_get_target,ridljar/javamaker) : $(ridljar_DIR)/done
 
-$(ridljar_DIR)/done : $(OUTDIR)/bin/udkapi.rdb \
+$(ridljar_DIR)/done : $(call gb_UnoApi_get_target,udkapi) \
 		$(call gb_Executable_get_runtime_dependencies,javamaker) \
 		| $(ridljar_DIR)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index a1b14c6..653fb6f 100644
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -564,9 +564,8 @@ End
 File gid_File_Misc_TypesRdb
     TXT_FILE_BODY;
     Dir = GID_DIR_URE_SHARE_MISC;
-    Name = "udkapi.rdb";
-    InstallName = "types.rdb";
-    Styles = (PACKED, SUBST_FILENAME);
+    Name = "types.rdb";
+    Styles = (PACKED);
 End
 
 File gid_File_Misc_ServicesRdb
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 6131af1..cdf828b 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -35,7 +35,8 @@ gb_PackagePart_get_destinations = \
 gb_InstallScript_get_target = $(OUTDIR)/bin/$(1)$(gb_InstallScript_EXT)
 gb_ResTarget_get_unittest_target = \
     $(OUTDIR)/unittest/install/$(LIBO_SHARE_RESOURCE_FOLDER)/$(1).res
-gb_UnoApi_get_target = $(OUTDIR)/bin/$(1).rdb
+# kind of lame but with just 3 of these why bother with registration etc.
+gb_UnoApi_get_target = $(INSTDIR)/$(if $(filter udkapi,$(1)),$(LIBO_URE_SHARE_FOLDER)/misc/types,$(LIBO_ETC_FOLDER)/types/$(1)).rdb
 
 # instdir target patterns
 
@@ -307,6 +308,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
 	UIImageListTarget \
 	UILocalizeTarget \
 	UIMenubarTarget \
+	UnoApi \
 	UnoApiHeadersTarget \
 	UnoApiTarget \
 	UnpackedTarball \
@@ -329,7 +331,6 @@ $(eval $(call gb_Helper_make_outdir_clean_targets,\
 	CliNativeLibrary \
 	CliUnoApi \
 	InstallScript \
-	UnoApi \
 ))
 
 $(eval $(call gb_Helper_make_dep_targets,\
diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk
index 1b64941..9595815 100644
--- a/solenv/gbuild/UnoApi.mk
+++ b/solenv/gbuild/UnoApi.mk
@@ -14,8 +14,9 @@ $(call gb_UnoApi_get_clean_target,%) :
 	$(call gb_Helper_abbreviate_dirs,\
 		rm -f $(call gb_UnoApi_get_target,$*))
 
+# call gb_UnoApi_UnoApi,api
 define gb_UnoApi_UnoApi
-$(call gb_UnoApiTarget_UnoApiTarget,$(1),$(2))
+$(call gb_UnoApiTarget_UnoApiTarget,$(1),$(1))
 $(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget,$(1))
 ifneq ($(gb_UnoApi_ENABLE_INSTALL),)
 $(call gb_Package_Package_internal,$(1)_idl,$(SRCDIR))
@@ -24,7 +25,7 @@ endif
 
 $(call gb_UnoApi_get_target,$(1)) :| $(dir $(call gb_UnoApi_get_target,$(1))).dir
 $(call gb_UnoApi_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(1))
-$(call gb_UnoApi_get_target,$(1)) : $(call gb_UnoApiHeadersTarget_get_target,$(1))
+$(call gb_UnoApi_get_target,$(1)) :| $(call gb_UnoApiHeadersTarget_get_target,$(1))
 $(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_UnoApiTarget_get_clean_target,$(1))
 $(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_UnoApiHeadersTarget_get_clean_target,$(1))
 
@@ -35,14 +36,6 @@ $(call gb_Helper_make_userfriendly_targets,$(1),UnoApi)
 
 endef
 
-define gb_UnoApi_install
-$(if $(2),,$(call gb_Output_error,gb_UnoApi_install: missing install name.))
-$(call gb_Helper_install,$(call gb_UnoApi_get_target,$(1)), \
-	$(INSTROOT)/$(2), \
-	$(call gb_UnoApiTarget_get_target,$(1)))
-
-endef
-
 ifneq ($(gb_UnoApi_ENABLE_INSTALL),)
 
 # Create a package of IDL files for putting into SDK.
diff --git a/udkapi/UnoApi_udkapi.mk b/udkapi/UnoApi_udkapi.mk
index cee6ae4..2eaee04 100644
--- a/udkapi/UnoApi_udkapi.mk
+++ b/udkapi/UnoApi_udkapi.mk
@@ -17,9 +17,7 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
-$(eval $(call gb_UnoApi_UnoApi,udkapi,udkapi))
-
-$(eval $(call gb_UnoApi_install,udkapi,$(LIBO_URE_SHARE_FOLDER)/misc/types.rdb))
+$(eval $(call gb_UnoApi_UnoApi,udkapi))
 
 $(eval $(call gb_UnoApi_package_idlfiles,udkapi))
 
diff --git a/unoil/CustomTarget_javamaker.mk b/unoil/CustomTarget_javamaker.mk
index 7ec9ec6..9c4d074 100644
--- a/unoil/CustomTarget_javamaker.mk
+++ b/unoil/CustomTarget_javamaker.mk
@@ -13,13 +13,17 @@ unoil_JAVADIR := $(call gb_CustomTarget_get_workdir,unoil/javamaker)
 
 $(call gb_CustomTarget_get_target,unoil/javamaker) : $(unoil_JAVADIR)/done
 
-$(unoil_JAVADIR)/done : $(OUTDIR)/bin/offapi.rdb $(OUTDIR)/bin/udkapi.rdb \
+$(unoil_JAVADIR)/done : \
+		$(call gb_UnoApi_get_target,offapi) \
+		$(call gb_UnoApi_get_target,udkapi) \
 		$(call gb_Executable_get_runtime_dependencies,javamaker) \
 		| $(unoil_JAVADIR)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
 	$(call gb_Helper_abbreviate_dirs, \
 	rm -r $(unoil_JAVADIR) && \
-	$(call gb_Helper_execute,javamaker -O$(unoil_JAVADIR) $(OUTDIR)/bin/offapi.rdb -X$(OUTDIR)/bin/udkapi.rdb) && \
+	$(call gb_Helper_execute,javamaker -O$(unoil_JAVADIR) \
+		$(call gb_UnoApi_get_target,offapi) \
+		-X$(call gb_UnoApi_get_target,udkapi)) && \
 	touch $@)
 
 # vim:set shiftwidth=4 tabstop=4 noexpandtab:


More information about the Libreoffice-commits mailing list