diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-11-01 14:45:53 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-11-01 14:45:53 +0100 |
commit | 223209d4626538197a60fd85bebb6ef415440ade (patch) | |
tree | 8f4666c14a06592cdfa9759e393fa3d478aeb18e /scp2 | |
parent | 3a3ad68fbdd60f9f913cb764a42fff20f8d0c51b (diff) | |
parent | 3ea95386a5fdaedaa733db4c979c8096c8ec0148 (diff) |
merge commit for DEV300_m63
Diffstat (limited to 'scp2')
-rw-r--r-- | scp2/macros/makefile.mk | 2 | ||||
-rwxr-xr-x | scp2/source/templates/makefile.mk | 2 | ||||
-rwxr-xr-x | scp2/source/templates/modules.pl | 22 |
3 files changed, 21 insertions, 5 deletions
diff --git a/scp2/macros/makefile.mk b/scp2/macros/makefile.mk index 52a0ac1a22d7..c9930631755e 100644 --- a/scp2/macros/makefile.mk +++ b/scp2/macros/makefile.mk @@ -50,4 +50,4 @@ ALLTAR : $(INCCOM)$/langmacros.inc @echo ------------------------------ @echo Making: $@ @@-$(RENAME) $@ $@.tmp - $(PERL) macro.pl -o $@.tmp && $(RENAME:s/+//) $@.tmp $@ + $(COMMAND_ECHO)$(PERL) macro.pl $(VERBOSITY) -o $@.tmp && $(RENAME:s/+//) $@.tmp $@ diff --git a/scp2/source/templates/makefile.mk b/scp2/source/templates/makefile.mk index 03b359068b26..59f5dab89f9e 100755 --- a/scp2/source/templates/makefile.mk +++ b/scp2/source/templates/makefile.mk @@ -52,5 +52,5 @@ PHONYTEMPL=.PHONY .ENDIF # "$(LAST_COMPLETELANGISO_VAR)"!="$(COMPLETELANGISO_VAR)" $(INCCOM)$/alllangmodules%.inc $(PHONYTEMPL) : module_langpack%.sct @@-$(RENAME) $@ $@.tmp - $(PERL) -w modules.pl -i $< -o $@.tmp && $(RENAME:s/+//) $@.tmp $@ + $(COMMAND_ECHO)$(PERL) -w modules.pl -i $< -o $@.tmp && $(RENAME:s/+//) $@.tmp $@ @echo LAST_COMPLETELANGISO_VAR=$(COMPLETELANGISO_VAR) > $(MISC)$/$(TARGET)_lang_track.mk diff --git a/scp2/source/templates/modules.pl b/scp2/source/templates/modules.pl index e022a0a71739..2b77662a95b8 100755 --- a/scp2/source/templates/modules.pl +++ b/scp2/source/templates/modules.pl @@ -36,6 +36,7 @@ my $infile = ""; my @infile = (); my $globalcounter = 0; my $globallinecounter = 0; +my $verbose = 0; if ( !defined $completelangiso_var) { print STDERR "ERROR: No language defined!\n"; @@ -61,7 +62,7 @@ check_counter(); sub check_counter { - print STDERR "Wrote modules for $globalcounter languages ($globallinecounter lines)!\n"; + print STDERR "Wrote modules for $globalcounter languages ($globallinecounter lines)!\n" if $verbose; if ( $globalcounter == 0 ) { print STDERR "ERROR: No languages found!\n"; @@ -113,6 +114,21 @@ sub write_ALL_MODULES sub startup_check { my $i; + + if ( $#ARGV >= 0 ) + { + if ( $ARGV[0] eq "-verbose" ) + { + $verbose = 1; + shift @ARGV; + } + elsif ( $ARGV[0] eq "-quiet" ) + { + # no special quiet flag/mode + shift @ARGV; + } + } + for ( $i=0; $i <= $#ARGV; $i++) { if ( "$ARGV[$i]" eq "-o" ) { if ( defined $ARGV[ $i + 1] ) { @@ -137,7 +153,7 @@ sub startup_check open INFILE, "$infile" or die "$0 - ERROR: $infile exists but isn't readable.\n"; @infile = <INFILE>; close( INFILE ); - print STDERR "Reading template file: $infile\n"; + print STDERR "Reading template file: $infile\n" if $verbose; my $num = $#infile + 1; # print STDERR "Number of lines: $num\n"; } else { @@ -168,6 +184,6 @@ sub startup_check sub usage { print STDERR "Generate language modules from language script particle template (*.sct file)\n"; - print STDERR "perl $0 -o outputfile -i inputfile\n"; + print STDERR "perl $0 [-verbose] -o outputfile -i inputfile\n"; exit 1; } |