diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2009-11-10 16:27:35 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2009-11-10 16:27:35 +0100 |
commit | 563f071cc437031b16b1b811c0296c3343572d21 (patch) | |
tree | ff5ee0d418e4f05e2a5303d9a14124906b5446d2 /scp2/source | |
parent | ab2c3fca53079b5dd2c3a777d4c2badb6a66bf3e (diff) | |
parent | cd97cfbaf1bbd74a42bc4bda1b192d7709fc64ee (diff) |
merge with DEV300_m64
Diffstat (limited to 'scp2/source')
-rwxr-xr-x | scp2/source/templates/makefile.mk | 2 | ||||
-rwxr-xr-x | scp2/source/templates/modules.pl | 22 |
2 files changed, 20 insertions, 4 deletions
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; } |