diff options
author | Andras Timar <atimar@suse.com> | 2012-02-24 16:43:08 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-02-24 16:43:08 +0100 |
commit | c695ecda7f589df258853aa2adbfc74c2cd49529 (patch) | |
tree | 31b467eaac99106c87e864545081fdaa84a6bb70 | |
parent | 8ef671b179626f57fc055baa0636552164175e0b (diff) |
more silent output of non-verbose help build
-rw-r--r-- | helpcontent2/helpers/update_tree.pl | 29 | ||||
-rw-r--r-- | helpcontent2/source/auxiliary/makefile.mk | 12 | ||||
-rwxr-xr-x | helpcontent2/util/target.pmk | 9 |
3 files changed, 13 insertions, 37 deletions
diff --git a/helpcontent2/helpers/update_tree.pl b/helpcontent2/helpers/update_tree.pl index 7408b315bc..3d32772489 100644 --- a/helpcontent2/helpers/update_tree.pl +++ b/helpcontent2/helpers/update_tree.pl @@ -32,9 +32,7 @@ use Cwd 'abs_path'; use File::Find; use File::Copy qw/cp mv/; use File::Basename; -use Benchmark; -$t0 = new Benchmark; # update the tree files in <platform>/misc/* $| = 1; @@ -107,7 +105,6 @@ if( defined $with_lang && $with_lang ne "" ) { @langs = split /\s+/, $with_lang; &read_loc; - print "################\nUpdating the treefiles for @langs \n"; for $l(@langs) { if ($l ne "en-US") { @@ -121,9 +118,6 @@ else } #------------------------------- # -$t1 = new Benchmark; -$td = timediff($t1, $t0); -print timestr($td),"\n"; #################### # SUBS @@ -143,7 +137,7 @@ update_tree.pl localized tree files are written based on the English tree file and the localized help topic titles. - Requires a valid SO/OOo environment. + Requires a valid LibreOffice build environment. MSG print "$msg\n"; exit( -1 ); @@ -163,14 +157,12 @@ sub do_english { #--------------------------------------------------- sub do_lang { $lng = shift; - print "\n---------------------------------------------------\nProcessing $lng\n"; + print "Processing $lng\n"; &processtreefiles($lng); - print "\n"; } #--------------------------------------------------- sub readtreestrings { - print "Reading tree strings for en-US..."; if (open TREE, $treestrings) { while (<TREE>) { chomp; @@ -195,21 +187,18 @@ sub readtreestrings { } else { &terminate("Error opening $treestrings"); } - print "done\n"; } #------------------------------------ sub gettreefiles { # Read the tree files from the directory # this list is also used for all foreign languages - print "Reading tree files..."; if (opendir ENUS, "$tree_src") { @treeviews = grep /\.tree/, readdir ENUS; closedir ENUS; } else { &terminate("Cannot open directory $tree_src"); } - print "done\n"; } #------------------------------------ @@ -219,9 +208,7 @@ sub processtreefiles { use File::Spec; for $tv(@treeviews) { - print "\nProcessing $tv\n"; @lines = &readtv("$tree_src/$tv"); - print "Read ".scalar @lines." lines\n"; for $l(@lines) { if ($l =~ /topic/) { ($id = $l) =~ s/^.*id="([^"]*)".*$/$1/gis; @@ -231,23 +218,18 @@ sub processtreefiles { if ($lng eq 'en-US') { # english comes from the file if (open F,$file) { - print "."; undef $/; $cnt = <F>; close F; $cnt =~ s/^.*<title[^>]+id="tit"[^>]*>([^<]*)<\/title>.*$/$1/gis; $cnt =~ s/'/\'/gis; $cnt =~ s/&/+/gis; $cnt =~ s/"/\'/gis; $cnt =~ s/&/+/gis; $l = "<topic id=\"$module/$id\">$cnt</topic>\n"; } else { - print "!"; $l = "<!-- removed $module/$id -->\n"; } } else { # localized comes from the localize sdf - #print "\nid: $id"; if (defined($loc_title{$lng}->{$id})) { - print "."; $l = "<topic id=\"$module/$id\">$loc_title{$lng}->{$id}</topic>\n"; } else { - print "!"; } } } @@ -273,7 +255,6 @@ sub processtreefiles { if (defined($helpsection{$id})) { $l =~ s/title="(.*)"/title="$helpsection{$id}"/; } else { - print "#"; $l =~ s/title="(.*)"/title="NOTFOUND:$id"/; } } else { @@ -338,14 +319,11 @@ sub readtv { # read entries form localize.sdf files #------------------------------------ sub read_loc { - print "\n\nReading localized titles..."; $/ = "\n"; my $path = "$source_dir/text"; - print " in $source_dir/text\n"; @files = `find $source_dir/text -name localize.sdf`; for my $fname (@files) { $FS = '\t'; - print "."; open(LOCALIZE_SDF, $fname) || die 'Cannot open "localize.sdf".'."$fname"; while (<LOCALIZE_SDF>) { my $sdf_line = $_; @@ -401,7 +379,4 @@ sub read_loc { push(@langstat, "$lang:\t ".$no_elements." matches\n"); $total_elements += $no_elements; } - print "\ndone reading a total of ".$total_elements." localized titles for ".scalar(keys(%loc_title))." languages from ".scalar @files ." files\n"; - print sort(@langstat); } - diff --git a/helpcontent2/source/auxiliary/makefile.mk b/helpcontent2/source/auxiliary/makefile.mk index d969e3fa3e..8f4bffd963 100644 --- a/helpcontent2/source/auxiliary/makefile.mk +++ b/helpcontent2/source/auxiliary/makefile.mk @@ -72,7 +72,7 @@ LOCTREEFILES:=$(foreach,j,$(TREEFILES) $(COMMONMISC)$/en-US$/$j) .ENDIF #IF "$(WITH_LANG)"!="" $(COMMONMISC)$/treefiles.done : $(LOCTREEFILES) - +$(PERL) $(PRJ)$/helpers$/update_tree.pl && $(TOUCH) $@ + $(COMMAND_ECHO)+$(PERL) $(PRJ)$/helpers$/update_tree.pl && $(TOUCH) $@ %.created: @-$(MKDIRHIER) $(@:d) && $(TOUCH) $@ @@ -95,12 +95,12 @@ $(LOCTREEFILES) : $(COMMONMISC)/unpack.done .ENDIF # "$(WITH_LANG)"!="" aux_dirs .PHONY : - echo aux_langdirs:=$(aux_langdirs) > $(LOCAL_COMMON_OUT)/inc$/aux_langs.mk - echo help_exist:=$(help_exist) > $(LOCAL_COMMON_OUT)/inc$/help_exist.mk + @echo aux_langdirs:=$(aux_langdirs) > $(LOCAL_COMMON_OUT)/inc$/aux_langs.mk + @echo help_exist:=$(help_exist) > $(LOCAL_COMMON_OUT)/inc$/help_exist.mk $(COMMONBIN)$/helpimg.ilst .PHONY: - -$(RM) $@ - $(PERL) $(PRJ)$/helpers$/create_ilst.pl -dir=$(SRC_ROOT)/icon-themes/galaxy/res/helpimg > $@.$(INPATH) - $(RENAME) $@.$(INPATH) $@ + @@-$(RM) $@ + $(COMMAND_ECHO)$(PERL) $(PRJ)$/helpers$/create_ilst.pl -dir=$(SRC_ROOT)/icon-themes/galaxy/res/helpimg > $@.$(INPATH) + $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ diff --git a/helpcontent2/util/target.pmk b/helpcontent2/util/target.pmk index 0b958424e4..49c3ce47ad 100755 --- a/helpcontent2/util/target.pmk +++ b/helpcontent2/util/target.pmk @@ -33,7 +33,8 @@ ALLTAR : $(LINKALLTARGETS) XSL_DIR*:=$(SOLARBINDIR) $(LINKALLTARGETS) : $(foreach,i,$(LINKLINKFILES) $(COMMONMISC)$/$$(@:b:s/_/./:e:s/.//)/$i) $(subst,LANGUAGE,$$(@:b:s/_/./:e:s/.//) $(LINKADDEDDEPS)) $(COMMONMISC)$/xhp_changed.flag - $(HELPLINKER) @$(mktmp -mod $(LINKNAME) -src $(COMMONMISC) -sty $(XSL_DIR)/embed.xsl -zipdir $(MISC)$/ziptmp$(@:b) -idxcaption $(XSL_DIR)/idxcaption.xsl -idxcontent $(XSL_DIR)/idxcontent.xsl -lang {$(subst,$(LINKNAME)_, $(@:b))} $(subst,LANGUAGE,{$(subst,$(LINKNAME)_, $(@:b))} $(LINKADDEDFILES)) $(foreach,i,$(LINKLINKFILES) $(COMMONMISC)$/{$(subst,$(LINKNAME)_, $(@:b))}/$i) -o $@.$(INPATH)) - $(HELPINDEXER) -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -dir $(MISC)$/ziptmp$(@:b) - cd $(MISC)$/ziptmp$(@:b) && zip -rX --filesync zipfile.zip $(LINKNAME).* - $(RENAME) $(MISC)$/ziptmp$(@:b)$/zipfile.zip $@ + $(COMMAND_ECHO)$(HELPLINKER) @$(mktmp -mod $(LINKNAME) -src $(COMMONMISC) -sty $(XSL_DIR)/embed.xsl -zipdir $(MISC)$/ziptmp$(@:b) -idxcaption $(XSL_DIR)/idxcaption.xsl -idxcontent $(XSL_DIR)/idxcontent.xsl -lang {$(subst,$(LINKNAME)_, $(@:b))} $(subst,LANGUAGE,{$(subst,$(LINKNAME)_, $(@:b))} $(LINKADDEDFILES)) $(foreach,i,$(LINKLINKFILES) $(COMMONMISC)$/{$(subst,$(LINKNAME)_, $(@:b))}/$i) -o $@.$(INPATH)) + $(COMMAND_ECHO)$(HELPINDEXER) -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -dir $(MISC)$/ziptmp$(@:b) + @echo [ building ZIP ] $(@:f) + $(COMMAND_ECHO)cd $(MISC)$/ziptmp$(@:b) && zip $(ZIP_VERBOSITY) -rX --filesync zipfile.zip $(LINKNAME).* + $(COMMAND_ECHO)$(RENAME) $(MISC)$/ziptmp$(@:b)$/zipfile.zip $@ |