2004-11-02 09:01:37 -06:00
|
|
|
:
|
|
|
|
eval 'exec perl -wS $0 ${1+"$@"}'
|
|
|
|
if 0;
|
|
|
|
#*************************************************************************
|
|
|
|
#
|
2008-04-10 10:52:56 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-11-02 09:01:37 -06:00
|
|
|
#
|
2010-02-12 08:01:35 -06:00
|
|
|
# Copyright 2000, 2010 Oracle and/or its affiliates.
|
2004-11-02 09:01:37 -06:00
|
|
|
#
|
2008-04-10 10:52:56 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2004-11-02 09:01:37 -06:00
|
|
|
#
|
2008-04-10 10:52:56 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2004-11-02 09:01:37 -06:00
|
|
|
#
|
2008-04-10 10:52:56 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2004-11-02 09:01:37 -06:00
|
|
|
#
|
2008-04-10 10:52:56 -05:00
|
|
|
# OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2004-11-02 09:01:37 -06:00
|
|
|
#
|
2008-04-10 10:52:56 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2004-11-02 09:01:37 -06:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
my $filename;
|
|
|
|
my $srs;
|
|
|
|
my $prjname;
|
|
|
|
my $defs;
|
|
|
|
my $solarincludes;
|
CWS-TOOLING: integrate CWS buildverbosity
2009-10-13 15:51:48 +0200 fs r276867 : allow building with 'nodep'==''
2009-10-11 22:39:56 +0200 fs r276820 : silence a compiler warning in a file only used when VERBOSE!=""
2009-10-09 14:37:43 +0200 fs r276807 : let not override the non-presence of $VERBOSE the given command line arguments
2009-10-09 14:36:25 +0200 fs r276806 : also deliver spirit/home/classic/debug/impl
2009-10-08 13:38:07 +0200 fs r276789 : not that many line feeds in --show mode
2009-10-08 13:13:01 +0200 fs r276788 : minor adjustments requested by hjs:
- replaced space/tab mixes at beginning of lines with mere tab
- made "nothing to update" message for the ZIPALLTARGET target more prominent
- removed useless "echo > /dev/nul" statements
2009-10-07 13:32:12 +0200 fs r276753 : #i105585#
2009-10-07 11:31:59 +0200 fs r276742 : #i10000# missing dependency between stoc/security and stoc/util
2009-10-06 22:59:59 +0200 fs r276729 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276699 (milestone: DEV300:m61)
2009-09-29 12:04:58 +0200 fs r276518 : #i10000#
2009-09-29 12:04:25 +0200 fs r276517 : oops
2009-09-29 12:01:07 +0200 fs r276516 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:59:29 +0200 fs r276515 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:52:32 +0200 fs r276514 : #i84497# removed the various 'echo ------------' directives from verbose mode, as per hjs' request
2009-09-29 11:44:16 +0200 fs r276513 : do not duplicate IDLC call commands with different verbosity switches
2009-09-28 21:43:50 +0200 thb r276502 : #i84497# fixed potential recursive macro def + extra ls
* solenv/inc/settings.mk: now setting via VERBOSE!:=, removes warning
and my spurious "recursive macro definition" error
* solenv/inc/tg_app.mk: one extra ls silenced for app target (and
quiet mode, that goes without saying)
2009-09-23 08:57:01 +0200 fs r276366 : use ULFEX_VERBOSITY instead of duplicating the ULFEX call
2009-09-21 11:42:26 +0200 fs r276320 : ignore output paths
2009-09-21 11:04:27 +0200 fs r276318 : silence another compiler warning, which only hits us when actually using this (debug) file, which is the case only when slideshow is compiled with a env variable VERBOSE, thus came up in CWS buildverbosity
2009-09-21 10:30:14 +0200 fs r276313 : make some output depend on VERBOSE==TRUE, not COMMAND_ECHO=""
While both are equivalent at the moment, COMMAND_ECHO finally is an implementation
default of the VERBOSE flag only, so better rely on VERBOSE as the primary verbosity flag
2009-09-21 09:56:57 +0200 fs r276311 : forgot to re-generate from tg_zip before committing
2009-09-21 09:52:11 +0200 fs r276310 : #i84497# even less verbosity
2009-09-17 11:02:47 +0200 fs r276232 : #i84497# verbose implies VERBOSE nowadays, and VERBOSE==FALSE should not lead to -DVERBOSE
2009-09-15 22:59:37 +0200 fs r276189 : #i105022# copy fix for this P1 into this CWS
2009-09-15 11:56:35 +0200 fs r276165 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276043 (milestone: DEV300:m58)
2009-09-14 17:45:10 +0200 fs r276137 : #i84497# don't duplicate zip lines w/ and w/o -q switch, use a variable instead (maintenance)
2009-09-14 15:01:33 +0200 fs r276124 : #i10000#
2009-09-11 23:58:46 +0200 thb r276083 : #i84497#: More quiet-build fine tuning
- silenced rsc for real (properly filtering options for
cpp, and a pretty brutal amputation of the tool blurp,
which would have needed cmd opt parser duplication)
- silenced deliver.pl
- silenced checkdll.sh
- silenced zip via -q (in quiet mode)
- silenced various idl, resource, transex whatever tool,
passing appropriate options down to them '-QQ' sometimes
- silenced dmake, pointless blurb that something does *not*
need update removed
- silenced the old starview idl compiler, to not output
tool's name & progress chars in quiet mode
2009-09-11 21:13:59 +0200 thb r276081 : #i84497#: More bits on the quiet mode of the build.
The bulk of the changes is disabling those annoying
"echo ------------------" lines for the quiet build,
which has the stretch goal of outputting *exactly*
one line per file compiled/linked/processed.
Apart from that, silenced a few especialy annoying
module-specific makefiles (basically adding
$(COMMAND_ECHO) in front of a gazillion rules).
Additionally, slightly tweaked what idlc regards
verbose, normal, and quiet mode; this was to have it
echo exactly one line per idl file processed (the
fact that quiet mode did not echo *anything* for idl
files was a bit too much for my taste)
2009-09-04 09:14:35 +0200 fs r275777 : don't emit the link parameters if VERBOSE!=TRUE
2009-09-02 10:31:15 +0200 fs r275700 : #i10000#
2009-09-02 08:44:14 +0200 fs r275697 : update svn:ignore to ignore the output paths
2009-09-02 08:40:54 +0200 fs r275695 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:40:28 +0200 fs r275694 : GRAPHITE is missing in the BUILD_TYPE
2009-09-02 08:40:05 +0200 fs r275693 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:25 +0200 fs r275692 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:02 +0200 fs r275691 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:38:09 +0200 fs r275690 : #i84497# less verbose output during build
2009-09-02 08:37:06 +0200 fs r275689 : #i84497# don't emit that much noise, unless a '-verbose' switch is given
2009-10-21 05:43:22 -05:00
|
|
|
my $verbose = 0;
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
my $debug = 0;
|
2004-11-02 09:01:37 -06:00
|
|
|
my $filebase;
|
2005-06-20 08:51:00 -05:00
|
|
|
my $workfile;
|
|
|
|
my $shell_workfile;
|
|
|
|
my @cleanuplist = ();
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
# variables to setup the compiler line
|
|
|
|
my $appext;
|
|
|
|
my $compiler;
|
|
|
|
my $outbin_flag;
|
2005-10-06 06:41:25 -05:00
|
|
|
my $outobj_flag;
|
2005-06-20 08:51:00 -05:00
|
|
|
my $objext;
|
|
|
|
my $preprocess_flag; # preprocess to stdout
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
my $no_hid_files;
|
|
|
|
|
|
|
|
sub cleandie
|
2004-11-02 09:01:37 -06:00
|
|
|
{
|
2005-06-20 08:51:00 -05:00
|
|
|
my $errstring = shift @_;
|
|
|
|
my $erroreval = $@;
|
|
|
|
|
|
|
|
print STDERR "$errstring\n";
|
|
|
|
if ( not $debug ) {
|
|
|
|
foreach my $i (@cleanuplist) {
|
|
|
|
unlink "$workfile$i" if -f "$workfile$i" or print STDERR "ERROR - couldn't remove $workfile$i\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
die "$erroreval\n";
|
2004-11-02 09:01:37 -06:00
|
|
|
}
|
2005-06-20 08:51:00 -05:00
|
|
|
|
|
|
|
sub setcompiler
|
2004-11-02 09:01:37 -06:00
|
|
|
{
|
2005-06-20 08:51:00 -05:00
|
|
|
my $whichcom = $ENV{COM};
|
2009-07-24 05:08:14 -05:00
|
|
|
my $extra_cflags = $ENV{EXTRA_CFLAGS};
|
|
|
|
$extra_cflags = "" if (!$extra_cflags);
|
2005-06-20 08:51:00 -05:00
|
|
|
if ( "$whichcom" eq "GCC" ) {
|
|
|
|
$appext = ""; # windows for now
|
2009-07-24 05:08:14 -05:00
|
|
|
$compiler = "gcc -x c $extra_cflags";
|
2005-06-24 08:11:05 -05:00
|
|
|
$outbin_flag = "-o ";
|
2005-10-06 06:41:25 -05:00
|
|
|
$outobj_flag = "";
|
2005-06-20 08:51:00 -05:00
|
|
|
$objext = ".o";
|
|
|
|
$preprocess_flag = "-E"; # preprocess to stdout
|
|
|
|
} elsif ( "$whichcom" eq "MSC" ) {
|
|
|
|
$appext = ".exe"; # windows for now
|
CWS-TOOLING: integrate CWS buildverbosity
2009-10-13 15:51:48 +0200 fs r276867 : allow building with 'nodep'==''
2009-10-11 22:39:56 +0200 fs r276820 : silence a compiler warning in a file only used when VERBOSE!=""
2009-10-09 14:37:43 +0200 fs r276807 : let not override the non-presence of $VERBOSE the given command line arguments
2009-10-09 14:36:25 +0200 fs r276806 : also deliver spirit/home/classic/debug/impl
2009-10-08 13:38:07 +0200 fs r276789 : not that many line feeds in --show mode
2009-10-08 13:13:01 +0200 fs r276788 : minor adjustments requested by hjs:
- replaced space/tab mixes at beginning of lines with mere tab
- made "nothing to update" message for the ZIPALLTARGET target more prominent
- removed useless "echo > /dev/nul" statements
2009-10-07 13:32:12 +0200 fs r276753 : #i105585#
2009-10-07 11:31:59 +0200 fs r276742 : #i10000# missing dependency between stoc/security and stoc/util
2009-10-06 22:59:59 +0200 fs r276729 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276699 (milestone: DEV300:m61)
2009-09-29 12:04:58 +0200 fs r276518 : #i10000#
2009-09-29 12:04:25 +0200 fs r276517 : oops
2009-09-29 12:01:07 +0200 fs r276516 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:59:29 +0200 fs r276515 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:52:32 +0200 fs r276514 : #i84497# removed the various 'echo ------------' directives from verbose mode, as per hjs' request
2009-09-29 11:44:16 +0200 fs r276513 : do not duplicate IDLC call commands with different verbosity switches
2009-09-28 21:43:50 +0200 thb r276502 : #i84497# fixed potential recursive macro def + extra ls
* solenv/inc/settings.mk: now setting via VERBOSE!:=, removes warning
and my spurious "recursive macro definition" error
* solenv/inc/tg_app.mk: one extra ls silenced for app target (and
quiet mode, that goes without saying)
2009-09-23 08:57:01 +0200 fs r276366 : use ULFEX_VERBOSITY instead of duplicating the ULFEX call
2009-09-21 11:42:26 +0200 fs r276320 : ignore output paths
2009-09-21 11:04:27 +0200 fs r276318 : silence another compiler warning, which only hits us when actually using this (debug) file, which is the case only when slideshow is compiled with a env variable VERBOSE, thus came up in CWS buildverbosity
2009-09-21 10:30:14 +0200 fs r276313 : make some output depend on VERBOSE==TRUE, not COMMAND_ECHO=""
While both are equivalent at the moment, COMMAND_ECHO finally is an implementation
default of the VERBOSE flag only, so better rely on VERBOSE as the primary verbosity flag
2009-09-21 09:56:57 +0200 fs r276311 : forgot to re-generate from tg_zip before committing
2009-09-21 09:52:11 +0200 fs r276310 : #i84497# even less verbosity
2009-09-17 11:02:47 +0200 fs r276232 : #i84497# verbose implies VERBOSE nowadays, and VERBOSE==FALSE should not lead to -DVERBOSE
2009-09-15 22:59:37 +0200 fs r276189 : #i105022# copy fix for this P1 into this CWS
2009-09-15 11:56:35 +0200 fs r276165 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276043 (milestone: DEV300:m58)
2009-09-14 17:45:10 +0200 fs r276137 : #i84497# don't duplicate zip lines w/ and w/o -q switch, use a variable instead (maintenance)
2009-09-14 15:01:33 +0200 fs r276124 : #i10000#
2009-09-11 23:58:46 +0200 thb r276083 : #i84497#: More quiet-build fine tuning
- silenced rsc for real (properly filtering options for
cpp, and a pretty brutal amputation of the tool blurp,
which would have needed cmd opt parser duplication)
- silenced deliver.pl
- silenced checkdll.sh
- silenced zip via -q (in quiet mode)
- silenced various idl, resource, transex whatever tool,
passing appropriate options down to them '-QQ' sometimes
- silenced dmake, pointless blurb that something does *not*
need update removed
- silenced the old starview idl compiler, to not output
tool's name & progress chars in quiet mode
2009-09-11 21:13:59 +0200 thb r276081 : #i84497#: More bits on the quiet mode of the build.
The bulk of the changes is disabling those annoying
"echo ------------------" lines for the quiet build,
which has the stretch goal of outputting *exactly*
one line per file compiled/linked/processed.
Apart from that, silenced a few especialy annoying
module-specific makefiles (basically adding
$(COMMAND_ECHO) in front of a gazillion rules).
Additionally, slightly tweaked what idlc regards
verbose, normal, and quiet mode; this was to have it
echo exactly one line per idl file processed (the
fact that quiet mode did not echo *anything* for idl
files was a bit too much for my taste)
2009-09-04 09:14:35 +0200 fs r275777 : don't emit the link parameters if VERBOSE!=TRUE
2009-09-02 10:31:15 +0200 fs r275700 : #i10000#
2009-09-02 08:44:14 +0200 fs r275697 : update svn:ignore to ignore the output paths
2009-09-02 08:40:54 +0200 fs r275695 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:40:28 +0200 fs r275694 : GRAPHITE is missing in the BUILD_TYPE
2009-09-02 08:40:05 +0200 fs r275693 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:25 +0200 fs r275692 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:02 +0200 fs r275691 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:38:09 +0200 fs r275690 : #i84497# less verbose output during build
2009-09-02 08:37:06 +0200 fs r275689 : #i84497# don't emit that much noise, unless a '-verbose' switch is given
2009-10-21 05:43:22 -05:00
|
|
|
$compiler = "cl -nologo";
|
2005-06-20 08:51:00 -05:00
|
|
|
$outbin_flag = "-Fe";
|
2005-10-06 06:41:25 -05:00
|
|
|
$outobj_flag = "-Fo";
|
2005-06-20 08:51:00 -05:00
|
|
|
$objext = ".obj";
|
|
|
|
$preprocess_flag = "-EP"; # preprocess to stdout
|
2009-10-26 14:03:30 -05:00
|
|
|
$solarincludes =~ s/\/stl/\/xstlx/g;
|
|
|
|
$defs =~ s/\/stl/\/xstlx/g;
|
2005-06-20 08:51:00 -05:00
|
|
|
} elsif ( "$whichcom" eq "C52" ) {
|
|
|
|
$appext = ""; # windows for now
|
|
|
|
$compiler = "cc";
|
|
|
|
$outbin_flag = "-o ";
|
2005-10-06 06:41:25 -05:00
|
|
|
$outobj_flag = "";
|
2005-06-20 08:51:00 -05:00
|
|
|
$objext = ".o";
|
|
|
|
$preprocess_flag = "-E"; # preprocess to stdout
|
|
|
|
|
|
|
|
# hack for SO cc wrapper
|
|
|
|
$ENV{wrapper_override_cc_wrapper} = "TRUE";
|
|
|
|
$solarincludes =~ s/stl/xstlx/g;
|
|
|
|
$defs =~ s/\/stl/\/xstlx/g;
|
|
|
|
} else {
|
|
|
|
print STDERR "----------------------------------------------------------------------\n";
|
|
|
|
print STDERR "OOops... looks like your compiler isn't known to \n$0\n";
|
|
|
|
print STDERR "please edit the \"setcompiler\" section of this script to make it work.\n";
|
|
|
|
print STDERR "----------------------------------------------------------------------\n";
|
|
|
|
die "ERROR - compiler (or \$COM settings) unknown!\n";
|
|
|
|
}
|
2004-11-02 09:01:37 -06:00
|
|
|
}
|
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
#---------------------------------------------------
|
CWS-TOOLING: integrate CWS buildverbosity
2009-10-13 15:51:48 +0200 fs r276867 : allow building with 'nodep'==''
2009-10-11 22:39:56 +0200 fs r276820 : silence a compiler warning in a file only used when VERBOSE!=""
2009-10-09 14:37:43 +0200 fs r276807 : let not override the non-presence of $VERBOSE the given command line arguments
2009-10-09 14:36:25 +0200 fs r276806 : also deliver spirit/home/classic/debug/impl
2009-10-08 13:38:07 +0200 fs r276789 : not that many line feeds in --show mode
2009-10-08 13:13:01 +0200 fs r276788 : minor adjustments requested by hjs:
- replaced space/tab mixes at beginning of lines with mere tab
- made "nothing to update" message for the ZIPALLTARGET target more prominent
- removed useless "echo > /dev/nul" statements
2009-10-07 13:32:12 +0200 fs r276753 : #i105585#
2009-10-07 11:31:59 +0200 fs r276742 : #i10000# missing dependency between stoc/security and stoc/util
2009-10-06 22:59:59 +0200 fs r276729 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276699 (milestone: DEV300:m61)
2009-09-29 12:04:58 +0200 fs r276518 : #i10000#
2009-09-29 12:04:25 +0200 fs r276517 : oops
2009-09-29 12:01:07 +0200 fs r276516 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:59:29 +0200 fs r276515 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:52:32 +0200 fs r276514 : #i84497# removed the various 'echo ------------' directives from verbose mode, as per hjs' request
2009-09-29 11:44:16 +0200 fs r276513 : do not duplicate IDLC call commands with different verbosity switches
2009-09-28 21:43:50 +0200 thb r276502 : #i84497# fixed potential recursive macro def + extra ls
* solenv/inc/settings.mk: now setting via VERBOSE!:=, removes warning
and my spurious "recursive macro definition" error
* solenv/inc/tg_app.mk: one extra ls silenced for app target (and
quiet mode, that goes without saying)
2009-09-23 08:57:01 +0200 fs r276366 : use ULFEX_VERBOSITY instead of duplicating the ULFEX call
2009-09-21 11:42:26 +0200 fs r276320 : ignore output paths
2009-09-21 11:04:27 +0200 fs r276318 : silence another compiler warning, which only hits us when actually using this (debug) file, which is the case only when slideshow is compiled with a env variable VERBOSE, thus came up in CWS buildverbosity
2009-09-21 10:30:14 +0200 fs r276313 : make some output depend on VERBOSE==TRUE, not COMMAND_ECHO=""
While both are equivalent at the moment, COMMAND_ECHO finally is an implementation
default of the VERBOSE flag only, so better rely on VERBOSE as the primary verbosity flag
2009-09-21 09:56:57 +0200 fs r276311 : forgot to re-generate from tg_zip before committing
2009-09-21 09:52:11 +0200 fs r276310 : #i84497# even less verbosity
2009-09-17 11:02:47 +0200 fs r276232 : #i84497# verbose implies VERBOSE nowadays, and VERBOSE==FALSE should not lead to -DVERBOSE
2009-09-15 22:59:37 +0200 fs r276189 : #i105022# copy fix for this P1 into this CWS
2009-09-15 11:56:35 +0200 fs r276165 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276043 (milestone: DEV300:m58)
2009-09-14 17:45:10 +0200 fs r276137 : #i84497# don't duplicate zip lines w/ and w/o -q switch, use a variable instead (maintenance)
2009-09-14 15:01:33 +0200 fs r276124 : #i10000#
2009-09-11 23:58:46 +0200 thb r276083 : #i84497#: More quiet-build fine tuning
- silenced rsc for real (properly filtering options for
cpp, and a pretty brutal amputation of the tool blurp,
which would have needed cmd opt parser duplication)
- silenced deliver.pl
- silenced checkdll.sh
- silenced zip via -q (in quiet mode)
- silenced various idl, resource, transex whatever tool,
passing appropriate options down to them '-QQ' sometimes
- silenced dmake, pointless blurb that something does *not*
need update removed
- silenced the old starview idl compiler, to not output
tool's name & progress chars in quiet mode
2009-09-11 21:13:59 +0200 thb r276081 : #i84497#: More bits on the quiet mode of the build.
The bulk of the changes is disabling those annoying
"echo ------------------" lines for the quiet build,
which has the stretch goal of outputting *exactly*
one line per file compiled/linked/processed.
Apart from that, silenced a few especialy annoying
module-specific makefiles (basically adding
$(COMMAND_ECHO) in front of a gazillion rules).
Additionally, slightly tweaked what idlc regards
verbose, normal, and quiet mode; this was to have it
echo exactly one line per idl file processed (the
fact that quiet mode did not echo *anything* for idl
files was a bit too much for my taste)
2009-09-04 09:14:35 +0200 fs r275777 : don't emit the link parameters if VERBOSE!=TRUE
2009-09-02 10:31:15 +0200 fs r275700 : #i10000#
2009-09-02 08:44:14 +0200 fs r275697 : update svn:ignore to ignore the output paths
2009-09-02 08:40:54 +0200 fs r275695 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:40:28 +0200 fs r275694 : GRAPHITE is missing in the BUILD_TYPE
2009-09-02 08:40:05 +0200 fs r275693 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:25 +0200 fs r275692 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:02 +0200 fs r275691 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:38:09 +0200 fs r275690 : #i84497# less verbose output during build
2009-09-02 08:37:06 +0200 fs r275689 : #i84497# don't emit that much noise, unless a '-verbose' switch is given
2009-10-21 05:43:22 -05:00
|
|
|
$filename = undef;
|
|
|
|
$srs = undef;
|
|
|
|
$prjname = undef;
|
|
|
|
|
|
|
|
my @expectedArgs = ( \$filename, \$srs, \$prjname );
|
|
|
|
my $expectedArgsIndex = 0;
|
|
|
|
while ( ( $#ARGV >= 0 ) && ( $expectedArgsIndex < 3 ) )
|
|
|
|
{
|
|
|
|
$_ = shift @ARGV;
|
|
|
|
if ( /^-verbose$/ )
|
|
|
|
{
|
|
|
|
$verbose = 1;
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
${$expectedArgs[ $expectedArgsIndex ]} = $_;
|
|
|
|
++$expectedArgsIndex;
|
|
|
|
}
|
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
$defs = join " ",@ARGV if ($#ARGV);
|
|
|
|
|
|
|
|
if ( !defined $prjname ) { die "ERROR - check usage\n"; }
|
|
|
|
|
|
|
|
if ( $ENV{NO_HID_FILES} ) {
|
|
|
|
$no_hid_files = $ENV{"NO_HID_FILES"};
|
|
|
|
}
|
|
|
|
$solarincludes = $ENV{SOLARINCLUDES};
|
2009-08-11 05:37:02 -05:00
|
|
|
if (defined $ENV{TMPDIR}) {
|
|
|
|
$tmpdir = $ENV{TMPDIR};
|
|
|
|
} elsif (defined $ENV{TMP}) {
|
|
|
|
$tmpdir = $ENV{TMP};
|
|
|
|
} else {
|
|
|
|
die "ERROR - \"TMPDIR\" & \"TMP\" environment variables not set\n";
|
|
|
|
};
|
2005-06-20 08:51:00 -05:00
|
|
|
die "ERROR - \"$tmpdir\" doesn't exist\n" if ( ! -d $tmpdir );
|
|
|
|
|
|
|
|
setcompiler();
|
|
|
|
|
|
|
|
# convert windows only?
|
|
|
|
$srs =~ s/\\/\//g;
|
|
|
|
$filename =~ s/\\/\//g;
|
|
|
|
|
|
|
|
$filebase = $filename;
|
|
|
|
$filebase =~ s/.*[\\\/]//;
|
|
|
|
$filebase =~ s/\..*?$//;
|
2009-10-23 10:28:10 -05:00
|
|
|
# now stript it to something that doesn't togger vista execution prevention :(
|
2009-10-26 13:49:37 -05:00
|
|
|
$flbs = $filebase;
|
2009-10-23 10:28:10 -05:00
|
|
|
$flbs =~ s/[aeiou]//g;
|
2010-05-03 09:04:21 -05:00
|
|
|
# call srand ony once per script!
|
|
|
|
srand();
|
|
|
|
$workfile = "$tmpdir/${flbs}_".$$.rand();
|
2009-06-16 13:11:49 -05:00
|
|
|
#$workfile =~ s/setup/set_up/;
|
2005-06-20 08:51:00 -05:00
|
|
|
|
|
|
|
# now get $workfile ready for shell usage...
|
|
|
|
$shell_workfile = $workfile;
|
2004-12-10 10:15:27 -06:00
|
|
|
|
CWS-TOOLING: integrate CWS buildverbosity
2009-10-13 15:51:48 +0200 fs r276867 : allow building with 'nodep'==''
2009-10-11 22:39:56 +0200 fs r276820 : silence a compiler warning in a file only used when VERBOSE!=""
2009-10-09 14:37:43 +0200 fs r276807 : let not override the non-presence of $VERBOSE the given command line arguments
2009-10-09 14:36:25 +0200 fs r276806 : also deliver spirit/home/classic/debug/impl
2009-10-08 13:38:07 +0200 fs r276789 : not that many line feeds in --show mode
2009-10-08 13:13:01 +0200 fs r276788 : minor adjustments requested by hjs:
- replaced space/tab mixes at beginning of lines with mere tab
- made "nothing to update" message for the ZIPALLTARGET target more prominent
- removed useless "echo > /dev/nul" statements
2009-10-07 13:32:12 +0200 fs r276753 : #i105585#
2009-10-07 11:31:59 +0200 fs r276742 : #i10000# missing dependency between stoc/security and stoc/util
2009-10-06 22:59:59 +0200 fs r276729 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276699 (milestone: DEV300:m61)
2009-09-29 12:04:58 +0200 fs r276518 : #i10000#
2009-09-29 12:04:25 +0200 fs r276517 : oops
2009-09-29 12:01:07 +0200 fs r276516 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:59:29 +0200 fs r276515 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:52:32 +0200 fs r276514 : #i84497# removed the various 'echo ------------' directives from verbose mode, as per hjs' request
2009-09-29 11:44:16 +0200 fs r276513 : do not duplicate IDLC call commands with different verbosity switches
2009-09-28 21:43:50 +0200 thb r276502 : #i84497# fixed potential recursive macro def + extra ls
* solenv/inc/settings.mk: now setting via VERBOSE!:=, removes warning
and my spurious "recursive macro definition" error
* solenv/inc/tg_app.mk: one extra ls silenced for app target (and
quiet mode, that goes without saying)
2009-09-23 08:57:01 +0200 fs r276366 : use ULFEX_VERBOSITY instead of duplicating the ULFEX call
2009-09-21 11:42:26 +0200 fs r276320 : ignore output paths
2009-09-21 11:04:27 +0200 fs r276318 : silence another compiler warning, which only hits us when actually using this (debug) file, which is the case only when slideshow is compiled with a env variable VERBOSE, thus came up in CWS buildverbosity
2009-09-21 10:30:14 +0200 fs r276313 : make some output depend on VERBOSE==TRUE, not COMMAND_ECHO=""
While both are equivalent at the moment, COMMAND_ECHO finally is an implementation
default of the VERBOSE flag only, so better rely on VERBOSE as the primary verbosity flag
2009-09-21 09:56:57 +0200 fs r276311 : forgot to re-generate from tg_zip before committing
2009-09-21 09:52:11 +0200 fs r276310 : #i84497# even less verbosity
2009-09-17 11:02:47 +0200 fs r276232 : #i84497# verbose implies VERBOSE nowadays, and VERBOSE==FALSE should not lead to -DVERBOSE
2009-09-15 22:59:37 +0200 fs r276189 : #i105022# copy fix for this P1 into this CWS
2009-09-15 11:56:35 +0200 fs r276165 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276043 (milestone: DEV300:m58)
2009-09-14 17:45:10 +0200 fs r276137 : #i84497# don't duplicate zip lines w/ and w/o -q switch, use a variable instead (maintenance)
2009-09-14 15:01:33 +0200 fs r276124 : #i10000#
2009-09-11 23:58:46 +0200 thb r276083 : #i84497#: More quiet-build fine tuning
- silenced rsc for real (properly filtering options for
cpp, and a pretty brutal amputation of the tool blurp,
which would have needed cmd opt parser duplication)
- silenced deliver.pl
- silenced checkdll.sh
- silenced zip via -q (in quiet mode)
- silenced various idl, resource, transex whatever tool,
passing appropriate options down to them '-QQ' sometimes
- silenced dmake, pointless blurb that something does *not*
need update removed
- silenced the old starview idl compiler, to not output
tool's name & progress chars in quiet mode
2009-09-11 21:13:59 +0200 thb r276081 : #i84497#: More bits on the quiet mode of the build.
The bulk of the changes is disabling those annoying
"echo ------------------" lines for the quiet build,
which has the stretch goal of outputting *exactly*
one line per file compiled/linked/processed.
Apart from that, silenced a few especialy annoying
module-specific makefiles (basically adding
$(COMMAND_ECHO) in front of a gazillion rules).
Additionally, slightly tweaked what idlc regards
verbose, normal, and quiet mode; this was to have it
echo exactly one line per idl file processed (the
fact that quiet mode did not echo *anything* for idl
files was a bit too much for my taste)
2009-09-04 09:14:35 +0200 fs r275777 : don't emit the link parameters if VERBOSE!=TRUE
2009-09-02 10:31:15 +0200 fs r275700 : #i10000#
2009-09-02 08:44:14 +0200 fs r275697 : update svn:ignore to ignore the output paths
2009-09-02 08:40:54 +0200 fs r275695 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:40:28 +0200 fs r275694 : GRAPHITE is missing in the BUILD_TYPE
2009-09-02 08:40:05 +0200 fs r275693 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:25 +0200 fs r275692 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:02 +0200 fs r275691 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:38:09 +0200 fs r275690 : #i84497# less verbose output during build
2009-09-02 08:37:06 +0200 fs r275689 : #i84497# don't emit that much noise, unless a '-verbose' switch is given
2009-10-21 05:43:22 -05:00
|
|
|
print "workfile: $workfile\n" if $verbose;
|
2004-12-10 10:15:27 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
#remove old objects which remained in place by a former bug
|
|
|
|
unlink "$workfile.obj";
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
# can't do this for modules with mixed case!
|
|
|
|
#$prjname =~ lc $prjname;
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
if ( -f "$workfile.hid" )
|
2004-11-02 09:01:37 -06:00
|
|
|
{
|
2010-05-03 09:04:21 -05:00
|
|
|
unlink "$workfile.hid" or die "ERRROR - cannot remove $workfile.hid\n";
|
2004-11-02 09:01:37 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
# hack to quit for files which cannot be handled
|
2005-06-20 08:51:00 -05:00
|
|
|
if ( defined $ENV{"NO_HID_FILES"} ) {
|
|
|
|
foreach $fname ( split / /, $ENV{"NO_HID_FILES"} )
|
2004-11-02 09:01:37 -06:00
|
|
|
{
|
2005-06-20 08:51:00 -05:00
|
|
|
if ( $fname eq $filename )
|
|
|
|
{
|
|
|
|
print "No hid generation for $filename due to NO_HID_FILES\n";
|
|
|
|
print "Touching $srs/$filebase.hid anyways\n";
|
|
|
|
open TOUCH, ">$srs/$filebase.hid" or die "ERRROR - cannot open $srs/$filebase.hid for writing\n";
|
|
|
|
close TOUCH;
|
|
|
|
exit 0;
|
|
|
|
}
|
2004-11-02 09:01:37 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
#echo "perl5 -p -e "s/=[ \t]*\".*\"/=\"\"/go; s/\".*\"[ \t]*;/\"\" ;/go ; s/(\".*)\/\/(.*\")/$1\/\\\/$2/go ;" < %filename% > %srs%\%workfile%.c0"
|
|
|
|
#call perl5 -p -e "s/=[ \t]*\".*\"/=\"\"/go; s/\".*\"[ \t]*;/\"\" ;/go ; s/(\".*)\/\/(.*\")/$1\/\\\/$2/go ;" < %filename% > %srs%\%workfile%.c0
|
2004-11-02 09:01:37 -06:00
|
|
|
|
CWS-TOOLING: integrate CWS buildverbosity
2009-10-13 15:51:48 +0200 fs r276867 : allow building with 'nodep'==''
2009-10-11 22:39:56 +0200 fs r276820 : silence a compiler warning in a file only used when VERBOSE!=""
2009-10-09 14:37:43 +0200 fs r276807 : let not override the non-presence of $VERBOSE the given command line arguments
2009-10-09 14:36:25 +0200 fs r276806 : also deliver spirit/home/classic/debug/impl
2009-10-08 13:38:07 +0200 fs r276789 : not that many line feeds in --show mode
2009-10-08 13:13:01 +0200 fs r276788 : minor adjustments requested by hjs:
- replaced space/tab mixes at beginning of lines with mere tab
- made "nothing to update" message for the ZIPALLTARGET target more prominent
- removed useless "echo > /dev/nul" statements
2009-10-07 13:32:12 +0200 fs r276753 : #i105585#
2009-10-07 11:31:59 +0200 fs r276742 : #i10000# missing dependency between stoc/security and stoc/util
2009-10-06 22:59:59 +0200 fs r276729 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276699 (milestone: DEV300:m61)
2009-09-29 12:04:58 +0200 fs r276518 : #i10000#
2009-09-29 12:04:25 +0200 fs r276517 : oops
2009-09-29 12:01:07 +0200 fs r276516 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:59:29 +0200 fs r276515 : #i84497# removed some more (non-diagnostic) 'echo ------' directives
2009-09-29 11:52:32 +0200 fs r276514 : #i84497# removed the various 'echo ------------' directives from verbose mode, as per hjs' request
2009-09-29 11:44:16 +0200 fs r276513 : do not duplicate IDLC call commands with different verbosity switches
2009-09-28 21:43:50 +0200 thb r276502 : #i84497# fixed potential recursive macro def + extra ls
* solenv/inc/settings.mk: now setting via VERBOSE!:=, removes warning
and my spurious "recursive macro definition" error
* solenv/inc/tg_app.mk: one extra ls silenced for app target (and
quiet mode, that goes without saying)
2009-09-23 08:57:01 +0200 fs r276366 : use ULFEX_VERBOSITY instead of duplicating the ULFEX call
2009-09-21 11:42:26 +0200 fs r276320 : ignore output paths
2009-09-21 11:04:27 +0200 fs r276318 : silence another compiler warning, which only hits us when actually using this (debug) file, which is the case only when slideshow is compiled with a env variable VERBOSE, thus came up in CWS buildverbosity
2009-09-21 10:30:14 +0200 fs r276313 : make some output depend on VERBOSE==TRUE, not COMMAND_ECHO=""
While both are equivalent at the moment, COMMAND_ECHO finally is an implementation
default of the VERBOSE flag only, so better rely on VERBOSE as the primary verbosity flag
2009-09-21 09:56:57 +0200 fs r276311 : forgot to re-generate from tg_zip before committing
2009-09-21 09:52:11 +0200 fs r276310 : #i84497# even less verbosity
2009-09-17 11:02:47 +0200 fs r276232 : #i84497# verbose implies VERBOSE nowadays, and VERBOSE==FALSE should not lead to -DVERBOSE
2009-09-15 22:59:37 +0200 fs r276189 : #i105022# copy fix for this P1 into this CWS
2009-09-15 11:56:35 +0200 fs r276165 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276043 (milestone: DEV300:m58)
2009-09-14 17:45:10 +0200 fs r276137 : #i84497# don't duplicate zip lines w/ and w/o -q switch, use a variable instead (maintenance)
2009-09-14 15:01:33 +0200 fs r276124 : #i10000#
2009-09-11 23:58:46 +0200 thb r276083 : #i84497#: More quiet-build fine tuning
- silenced rsc for real (properly filtering options for
cpp, and a pretty brutal amputation of the tool blurp,
which would have needed cmd opt parser duplication)
- silenced deliver.pl
- silenced checkdll.sh
- silenced zip via -q (in quiet mode)
- silenced various idl, resource, transex whatever tool,
passing appropriate options down to them '-QQ' sometimes
- silenced dmake, pointless blurb that something does *not*
need update removed
- silenced the old starview idl compiler, to not output
tool's name & progress chars in quiet mode
2009-09-11 21:13:59 +0200 thb r276081 : #i84497#: More bits on the quiet mode of the build.
The bulk of the changes is disabling those annoying
"echo ------------------" lines for the quiet build,
which has the stretch goal of outputting *exactly*
one line per file compiled/linked/processed.
Apart from that, silenced a few especialy annoying
module-specific makefiles (basically adding
$(COMMAND_ECHO) in front of a gazillion rules).
Additionally, slightly tweaked what idlc regards
verbose, normal, and quiet mode; this was to have it
echo exactly one line per idl file processed (the
fact that quiet mode did not echo *anything* for idl
files was a bit too much for my taste)
2009-09-04 09:14:35 +0200 fs r275777 : don't emit the link parameters if VERBOSE!=TRUE
2009-09-02 10:31:15 +0200 fs r275700 : #i10000#
2009-09-02 08:44:14 +0200 fs r275697 : update svn:ignore to ignore the output paths
2009-09-02 08:40:54 +0200 fs r275695 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:40:28 +0200 fs r275694 : GRAPHITE is missing in the BUILD_TYPE
2009-09-02 08:40:05 +0200 fs r275693 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:25 +0200 fs r275692 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:39:02 +0200 fs r275691 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given
2009-09-02 08:38:09 +0200 fs r275690 : #i84497# less verbose output during build
2009-09-02 08:37:06 +0200 fs r275689 : #i84497# don't emit that much noise, unless a '-verbose' switch is given
2009-10-21 05:43:22 -05:00
|
|
|
my $verboseSwitch = $verbose ? "-verbose" : "";
|
|
|
|
print "$ENV{SOLARBINDIR}/hidc $verboseSwitch $filename ${shell_workfile}.c1 $prjname\n" if $verbose;
|
|
|
|
$ret = system "$ENV{SOLARBINDIR}/hidc $verboseSwitch $filename ${shell_workfile}.c1 $prjname";
|
2005-06-20 08:51:00 -05:00
|
|
|
if ( $ret ) {
|
|
|
|
push @cleanuplist, ".c1";
|
|
|
|
cleandie("ERROR - calling \"hidc\" failed");
|
|
|
|
}
|
|
|
|
push @cleanuplist, ".c1";
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2010-06-09 10:00:35 -05:00
|
|
|
print "$compiler $defs $solarincludes $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2\n" if $verbose;
|
|
|
|
$ret = system "$compiler $defs $solarincludes $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2";
|
2005-06-20 08:51:00 -05:00
|
|
|
if ( $ret ) {
|
|
|
|
push @cleanuplist, ".c2";
|
|
|
|
cleandie("ERROR - calling compiler for preprocessing failed");
|
|
|
|
}
|
|
|
|
push @cleanuplist, ".c2";
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
if (!open C_PROG, ">$workfile.c") {
|
|
|
|
push @cleanuplist, ".c";
|
|
|
|
cleandie("ERROR - open $workfile.c\n for writing failed");
|
|
|
|
}
|
|
|
|
push @cleanuplist, ".c";
|
2006-10-12 07:49:53 -05:00
|
|
|
print C_PROG "#include <stdio.h>\n";
|
2004-11-02 09:01:37 -06:00
|
|
|
print C_PROG "#include <wctype.h>\n";
|
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
if ( !open PRE, "<$workfile.c2" ) {
|
|
|
|
cleandie("ERROR - open $workfile.c2\n for reading failed");
|
|
|
|
}
|
|
|
|
|
2004-11-02 09:01:37 -06:00
|
|
|
$InMain = 0;
|
|
|
|
while (<PRE>)
|
|
|
|
{
|
|
|
|
if ( /int\s*main/ )
|
|
|
|
{
|
|
|
|
$InMain = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( $InMain && !/^\s*$/ )
|
|
|
|
{
|
|
|
|
print C_PROG;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
close PRE;
|
|
|
|
close C_PROG;
|
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
#cl %SOLARINCLUDES% %_srs%\%_workfile%.c /Fe%_srs%\%_workfile%$appext
|
2005-10-06 06:41:25 -05:00
|
|
|
my $outobj_param = "";
|
|
|
|
if ( $outobj_flag ne "" )
|
|
|
|
{
|
|
|
|
$outobj_param = "$outobj_flag${shell_workfile}$objext";
|
|
|
|
}
|
2010-06-09 10:00:35 -05:00
|
|
|
print "$compiler $defs $solarincludes ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext \n" if $verbose;
|
|
|
|
$ret = system "$compiler $defs $solarincludes ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext";
|
2005-06-20 08:51:00 -05:00
|
|
|
if ( $ret ) {
|
|
|
|
push @cleanuplist, "$appext";
|
|
|
|
cleandie("ERROR - compiling $workfile.c failed");
|
|
|
|
}
|
|
|
|
push @cleanuplist, "$objext";
|
|
|
|
push @cleanuplist, "$appext";
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
#awk -f %ENV_TOOLS%\hidcode.awk < %srs%\%workfile%.c3 > %srs%\%workfile%.hid
|
|
|
|
if ( !open C3,"$workfile$appext|" ) {
|
|
|
|
cleandie("ERROR - executing $workfile$appext failed");
|
|
|
|
}
|
|
|
|
if ( !open HID,">$srs/$filebase.hid.$ENV{INPATH}" ) {
|
|
|
|
cleandie("ERROR - open $srs/$filebase.hid.$ENV{INPATH} for writing failed");
|
|
|
|
}
|
2004-11-02 09:01:37 -06:00
|
|
|
|
|
|
|
while (<C3>)
|
|
|
|
{
|
|
|
|
@fields = split /\s+/;
|
|
|
|
|
|
|
|
if ( $fields[1] eq "HelpID" )
|
|
|
|
{
|
|
|
|
print HID "$fields[0] $fields[2]\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
@arr = split /:/, $fields[0];
|
|
|
|
if( $arr[1] =~ /^leer$|^bitmap$|^font$|^color$|^image$|^imagelist$|^date$|^brush$|^fixedtext$|^keycode$|^time$|^mapmode$/i )
|
|
|
|
{
|
|
|
|
#print "skipping $arr[1]\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( $fields[1] eq "Norm" )
|
|
|
|
{
|
|
|
|
# Felder der Zeile auf Variable verteilen
|
|
|
|
$helpIDString = $fields[0];
|
|
|
|
$GClass = lc($fields[2]);
|
|
|
|
$GID = $fields[3];
|
|
|
|
$LClass = lc($fields[4]);
|
|
|
|
$LID = $fields[5] || 0;
|
|
|
|
|
|
|
|
#print $LID
|
|
|
|
#print $LClass
|
|
|
|
#print $GID
|
|
|
|
#print $GClass
|
|
|
|
|
|
|
|
$nHID=0;
|
|
|
|
|
|
|
|
$VAL1 = 536870912; #2 hoch 29
|
|
|
|
if ( $GClass eq "workwindow" ) { $nHID= $VAL1 *5; }
|
|
|
|
elsif( $GClass eq "modelessdialog" ) { $nHID= $VAL1 *4; }
|
|
|
|
elsif( $GClass eq "floatingwindow" ) { $nHID= $VAL1 *3; }
|
|
|
|
elsif( $GClass eq "modaldialog" ) { $nHID= $VAL1 *2; }
|
|
|
|
elsif( $GClass eq "tabpage" ) { $nHID= $VAL1 *1; }
|
|
|
|
elsif( $GClass eq "dockingwindow" ) { $nHID= $VAL1 *6; }
|
|
|
|
#Maximal bis 7 dann sind 32Bit ausgeschoepft
|
|
|
|
else {
|
|
|
|
$nHID=0;
|
|
|
|
$outline = "No GClass ".$helpIDString." ".$nHID." ".$GClass;
|
|
|
|
#print "$outline\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
if( $LID != 0 ) {
|
|
|
|
if ( $LClass eq "tabcontrol" ) { $nHID += 0; }
|
|
|
|
elsif( $LClass eq "radiobutton" ) { $nHID += 2*256; }
|
|
|
|
elsif( $LClass eq "checkbox" ) { $nHID += 4*256; }
|
|
|
|
elsif( $LClass eq "tristatebox" ) { $nHID += 6*256; }
|
|
|
|
elsif( $LClass eq "edit" ) { $nHID += 8*256; }
|
|
|
|
elsif( $LClass eq "multilineedit" ) { $nHID += 10*256; }
|
|
|
|
elsif( $LClass eq "multilistbox" ) { $nHID += 12*256; }
|
|
|
|
elsif( $LClass eq "listbox" ) { $nHID += 14*256; }
|
|
|
|
elsif( $LClass eq "combobox" ) { $nHID += 16*256; }
|
|
|
|
elsif( $LClass eq "pushbutton" ) { $nHID += 18*256; }
|
|
|
|
elsif( $LClass eq "spinfield" ) { $nHID += 20*256; }
|
|
|
|
elsif( $LClass eq "patternfield" ) { $nHID += 22*256; }
|
|
|
|
elsif( $LClass eq "numericfield" ) { $nHID += 24*256; }
|
|
|
|
elsif( $LClass eq "metricfield" ) { $nHID += 26*256; }
|
|
|
|
elsif( $LClass eq "currencyfield" ) { $nHID += 28*256; }
|
|
|
|
elsif( $LClass eq "datefield" ) { $nHID += 30*256; }
|
|
|
|
elsif( $LClass eq "timefield" ) { $nHID += 32*256; }
|
|
|
|
elsif( $LClass eq "imageradiobutton" ) { $nHID += 34*256; }
|
|
|
|
elsif( $LClass eq "numericbox" ) { $nHID += 36*256; }
|
|
|
|
elsif( $LClass eq "metricbox" ) { $nHID += 38*256; }
|
|
|
|
elsif( $LClass eq "currencybox" ) { $nHID += 40*256; }
|
|
|
|
elsif( $LClass eq "datebox" ) { $nHID += 42*256; }
|
|
|
|
elsif( $LClass eq "timebox" ) { $nHID += 44*256; }
|
|
|
|
elsif( $LClass eq "imagebutton" ) { $nHID += 46*256; }
|
|
|
|
elsif( $LClass eq "menubutton" ) { $nHID += 48*256; }
|
|
|
|
elsif( $LClass eq "morebutton" ) { $nHID += 50*256; }
|
|
|
|
else {
|
|
|
|
$nHID=0;
|
|
|
|
$outline = "No LClass ".$helpIDString." ".$nHID;
|
|
|
|
#print "$outline\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
#GID und LID auch beruecksichtigen
|
|
|
|
$nHID += $LID;
|
|
|
|
}
|
|
|
|
$nHID += $GID * 16384; #14 Bit nach links shiften
|
|
|
|
|
|
|
|
# check here and not above to avoid warnings for restypes not generated anyways
|
|
|
|
if( $GID == 0 || $GID >32767 || $LID > 511 )
|
|
|
|
{
|
|
|
|
#GID & LID ungueltig
|
|
|
|
print STDERR "Invalid Global or Local ID: 0 < GID <= 32767 ; LID <= 511\n";
|
|
|
|
print STDERR "$helpIDString GID = $GID; LID = $LID\n";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# 1. Stelle selber ausgeben, falls groesser als 2^21
|
|
|
|
# wg. problemen von awk/gawk bei printf mit %u
|
|
|
|
#
|
|
|
|
$x=0;
|
|
|
|
if( $nHID >= 4000000000 ) {
|
|
|
|
$nHID -= 4000000000;
|
|
|
|
$x=4;
|
|
|
|
}elsif( $nHID >= 3000000000) {
|
|
|
|
$nHID -= 3000000000;
|
|
|
|
$x=3;
|
|
|
|
}elsif( $nHID >= 2000000000) {
|
|
|
|
$nHID -= 2000000000;
|
|
|
|
$x=2;
|
|
|
|
}
|
|
|
|
if( $x != 0)
|
|
|
|
{ printf HID "%s %d%u \n",$helpIDString,$x, $nHID; }
|
|
|
|
else
|
|
|
|
{ printf HID "%s %u \n",$helpIDString, $nHID; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
close C3;
|
|
|
|
close HID;
|
2004-11-02 09:01:37 -06:00
|
|
|
|
2005-06-20 08:51:00 -05:00
|
|
|
rename("$srs/$filebase.hid.$ENV{INPATH}", "$srs/$filebase.hid") or cleandie("ERROR - couldn't rename tmp file to final for $filebase");
|
|
|
|
|
|
|
|
if ( not $debug ) {
|
|
|
|
foreach my $i (@cleanuplist) {
|
|
|
|
if ( -f "$workfile$i" ) {
|
|
|
|
unlink "$workfile$i" or cleandie("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|