Commits

obo  committed 07c4047

CWS-TOOLING: integrate CWS ause099
2009-01-29 12:30:57 +0100 hjs r267116 : #i98365# fix unsetting g+s bit
2009-01-23 14:21:19 +0100 hjs r266819 : #i40246# - cleanup
2009-01-23 14:14:07 +0100 hjs r266818 : #i40246# - fix quoting of final echo line
2009-01-23 12:42:33 +0100 hjs r266807 : #i98365# leave higher bits alone
2009-01-23 11:23:42 +0100 rt r266799 : Header
2009-01-22 19:14:25 +0100 hjs r266753 : #i98365# remove unwanted file attributes from archives
2009-01-22 16:22:18 +0100 hjs r266737 : #i98365# remove unwanted file attributes from archives
2009-01-22 16:20:54 +0100 hjs r266736 : #i98365# remove unwanted file attributes from archives
2009-01-22 16:20:24 +0100 hjs r266735 : #i98365# remove unwanted file attributes from archives
2009-01-22 16:08:33 +0100 hjs r266734 : #i40246# renamed variable
2009-01-22 16:05:26 +0100 hjs r266733 : #i40246# renamed variable
2009-01-20 17:46:54 +0100 hjs r266610 : #i98290# cleanup
2009-01-19 19:32:19 +0100 hjs r266522 : CWS-TOOLING: rebase CWS ause099 to trunk@266428 (milestone: DEV300:m39)
2008-12-08 21:00:09 +0100 hjs r265049 : CWS-TOOLING: rebase CWS ause099 to trunk@264807 (milestone: DEV300:m37)
2008-11-27 18:25:18 +0100 hjs r264513 : #i40246# - support multiple patches per archive
2008-11-17 19:00:12 +0100 hjs r263738 : CWS-TOOLING: rebase CWS ause099 to trunk@263288 (milestone: DEV300:m35)

  • Participants
  • Parent commits e174a23

Comments (0)

Files changed (69)

File apache-commons/java/codec/makefile.mk

 
 TARFILE_ROOTDIR=commons-codec-1.3
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/codec.patch
+PATCH_FILES=$(PRJ)$/patches$/codec.patch
 
 #CONVERTFILES=build.xml
 				

File apache-commons/java/httpclient/makefile.mk

 
 TARFILE_ROOTDIR=commons-httpclient-3.1
 
-#PATCH_FILE_NAME=$(PRJ)$/patches$/httpclient.patch
+#PATCH_FILES=$(PRJ)$/patches$/httpclient.patch
 
 #CONVERTFILES=build.xml
 				

File apache-commons/java/lang/makefile.mk

 
 TARFILE_ROOTDIR=commons-lang-2.3-src
 
-#PATCH_FILE_NAME=$(PRJ)$/patches$/logging.patch
+#PATCH_FILES=$(PRJ)$/patches$/logging.patch
 
 #CONVERTFILES=build.xml
 				

File apache-commons/java/logging/makefile.mk

 
 TARFILE_ROOTDIR=commons-logging-1.1.1-src
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/logging.patch
+PATCH_FILES=$(PRJ)$/patches$/logging.patch
 
 CONVERTFILES=build.xml
 				

File beanshell/makefile.mk

 
 TARFILE_NAME=bsh-2.0b1-src
 TARFILE_ROOTDIR=BeanShell
-PATCH_FILE_NAME=bsh-2.0b1-src.patch
+PATCH_FILES=bsh-2.0b1-src.patch
 
 ADDITIONAL_FILES=makefile.mk
 

File berkeleydb/makefile.mk

 
 # not needed for win32. comment out when causing problems...
 .IF "$(GUI)$(COM)"=="WNTGCC"
-PATCH_FILE_NAME=db-4.2.52-mingw.patch
+PATCH_FILES=db-4.2.52-mingw.patch
 .ELSE
-PATCH_FILE_NAME=db-4.2.52.patch
+PATCH_FILES=db-4.2.52.patch
 .ENDIF
 
 # clean compiler flags

File bitstream_vera_fonts/fonts/ttf_dejavu/makefile.mk

 TARFILE_NAME=dejavu-ttf-2.21
 TARFILE_ROOTDIR=dejavu-ttf-2.21
 
-PATCH_FILE_NAME=
+PATCH_FILES=
 
 
 CONFIGURE_DIR=

File bitstream_vera_fonts/fonts/ttf_liberation/makefile.mk

 TARFILE_NAME=liberation-fonts-1.04
 TARFILE_ROOTDIR=liberation-fonts-1.04
 
-PATCH_FILE_NAME=
+PATCH_FILES=
 
 
 CONFIGURE_DIR=

File boost/makefile.mk

 # --- Files --------------------------------------------------------
 
 TARFILE_NAME=boost-1.30.2
-PATCH_FILE_NAME=$(TARFILE_NAME).patch
+PATCH_FILES=$(TARFILE_NAME).patch
 
 .IF "$(COMID)"=="gcc3"
 
 # enabled for gcc4.x
 .IF "$(CCNUMVER)">="000400000000" 
   TARFILE_NAME=boost_1_34_1
-  PATCH_FILE_NAME=$(TARFILE_NAME).patch
+  PATCH_FILES=$(TARFILE_NAME).patch
 .ENDIF
 
 .ENDIF

File boost/spirit/makefile.mk

 .ELSE
 
 TARFILE_NAME=spirit-1.6.1
-PATCH_FILE_NAME=$(PRJ)$/$(TARFILE_NAME).patch
+PATCH_FILES=$(PRJ)$/$(TARFILE_NAME).patch
 
 CONFIGURE_DIR=
 CONFIGURE_ACTION=

File cairo/cairo/makefile.mk

 CAIROVERSION=1.8.0
 
 TARFILE_NAME=$(PRJNAME)-$(CAIROVERSION)
-PATCH_FILE_NAME=..$/$(TARFILE_NAME).patch
+PATCH_FILES=..$/$(TARFILE_NAME).patch
 
 cairo_CFLAGS=$(SOLARINC)
 cairo_LDFLAGS=$(SOLARLIB)

File cppunit/makefile.mk

  src$/win32$/makefile.mk \
  src$/win32$/winstuff.cxx
 
-PATCH_FILE_NAME=cppunit-1.8.0-r1.patch
+PATCH_FILES=cppunit-1.8.0-r1.patch
 
 # CONFIGURE_DIR=
 # CONFIGURE_ACTION=

File curl/makefile.mk

 # --- Files --------------------------------------------------------
 
 TARFILE_NAME=curl-7.12.2
-PATCH_FILE_NAME=curl-7.12.2.patch
+PATCH_FILES=curl-7.12.2.patch
 CONVERTFILES= \
     lib$/Makefile.vc6
 

File epm/makefile.mk

 # --- Files --------------------------------------------------------
 
 TARFILE_NAME=epm-3.7
-PATCH_FILE_NAME=epm-3.7.patch
+PATCH_FILES=epm-3.7.patch
 
 .IF "$(GUI)"=="UNX" && "$(BUILD_EPM)" != "NO"
 

File expat/makefile.mk

 TARFILE_NAME=expat
 ADDITIONAL_FILES=xmlparse$/makefile.mk xmltok$/makefile.mk makefile.mk
 
-PATCH_FILE_NAME=expat.patch
+PATCH_FILES=expat.patch
 
 CONFIGURE_DIR=
 CONFIGURE_ACTION=

File external/glibc/makefile.mk

 TARFILE_ROOTDIR=glibc-2.1.3
 ADDITIONAL_FILES=posix$/makefile.mk posix$/config.h posix$/readdir_r.c
 
-PATCH_FILE_NAME=$(PRJ)$/glibc-2.1.3.patch
+PATCH_FILES=$(PRJ)$/glibc-2.1.3.patch
 
 #CONFIGURE_DIR=glibc-2.1.3/posix
 CONFIGURE_ACTION=

File fondu/makefile.mk

 
 # contains the "magic" to create targets out of the set variables.
 
-.INCLUDE : tg_ext.mk
+.INCLUDE : tg_ext.mk

File hsqldb/makefile.mk

 CONVERTFILES=build$/build.xml \
 			src$/org$/hsqldb$/persist$/HsqlDatabaseProperties.java
 
-PATCH_FILE_NAME=patches$/accumulated_patches.patch
+# PATCH_FILES=patches$/accumulated_patches.patch
 
 # ADDITIONAL_FILES=   src$/org$/hsqldb$/Collation.java \
 #                     src$/org$/hsqldb$/TxManager.java \

File hunspell/makefile.mk

 
 #ADDITIONAL_FILES += src/hunspell/makefile.mk
 
-PATCH_FILE_NAME=hunspell-1.1.12.patch
+PATCH_FILES=hunspell-1.1.12.patch
 
 .IF "$(GUI)"=="UNX"
 #CONFIGURE_DIR=$(BUILD_DIR)

File hyphen/makefile.mk

 
 ADDITIONAL_FILES += makefile.mk
 
-PATCH_FILE_NAME=hyphen-2.3.patch
+PATCH_FILES=hyphen-2.3.patch
 
 .IF "$(GUI)"=="UNX"
 CONFIGURE_DIR=$(BUILD_DIR)

File icc/makefile.mk

 TARFILE_NAME=SampleICC-1.3.2
 #checking for endianess
 .IF "$(CPU)"=="I"
-PATCH_FILE_NAME=$(TARFILE_NAME).patch
+PATCH_FILES=$(TARFILE_NAME).patch
 .ELSE
-PATCH_FILE_NAME=$(TARFILE_NAME)-bendian.patch
+PATCH_FILES=$(TARFILE_NAME)-bendian.patch
 .ENDIF
 
 CONVERTFILES= \

File icu/makefile.mk

 .ENDIF
 TARFILE_ROOTDIR=icu
 
-PATCH_FILE_NAME=${TARFILE_NAME}.patch
+PATCH_FILES=${TARFILE_NAME}.patch
 
 # ADDITIONAL_FILES=
 
 .INCLUDE :	target.mk
 .INCLUDE :	tg_ext.mk
 
-.IF "$(BINARY_PATCH_FILE_NAME)"!=""
+.IF "$(BINARY_PATCH_FILES)"!=""
 
 $(PACKAGE_DIR)$/so_add_binary :  $(PACKAGE_DIR)$/$(ADD_FILES_FLAG_FILE)
-	cd $(PACKAGE_DIR) && gunzip -c $(BACK_PATH)$(BINARY_PATCH_FILE_NAME) | tar $(TAR_EXCLUDE_SWITCH) -xvf -
+	cd $(PACKAGE_DIR) && gunzip -c $(BACK_PATH)$(BINARY_PATCH_FILES) | tar $(TAR_EXCLUDE_SWITCH) -xvf -
 	$(TOUCH) $(PACKAGE_DIR)$/so_add_binary
 
 $(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)$/so_add_binary

File jfreereport/java/flute/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=ant$/build.xml\
 			 ant$/build.properties

File jfreereport/java/jcommon-serializer/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=build.xml\
              build.properties

File jfreereport/java/jcommon/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/jcommon.patch
+PATCH_FILES=$(PRJ)$/patches$/jcommon.patch
 
 CONVERTFILES=ant$/build.xml\
 				ant$/build.properties

File jfreereport/java/jfreereport/makefile.mk

 
 TARFILE_ROOTDIR=core
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=build.xml\
 			 build.properties \

File jfreereport/java/libfonts/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=build.xml\
 			build.properties

File jfreereport/java/libformula/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=build.xml\
 				build.properties \

File jfreereport/java/liblayout/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=build.xml\
 			 build.properties

File jfreereport/java/libloader/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=build.xml\
 				build.properties

File jfreereport/java/librepository/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=build.xml\
 				build.properties

File jfreereport/java/libxml/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/$(TARGET).patch
+PATCH_FILES=$(PRJ)$/patches$/$(TARGET).patch
 
 CONVERTFILES=build.xml\
 				build.properties

File jfreereport/java/sac/makefile.mk

 
 TARFILE_ROOTDIR=$(TARGET)
 
-PATCH_FILE_NAME=$(PRJ)$/patches$/sac.patch
+PATCH_FILES=$(PRJ)$/patches$/sac.patch
 
 ADDITIONAL_FILES=build.xml
 

File jpeg/makefile.mk

 
 TARFILE_NAME=jpeg-6b
 
-PATCH_FILE_NAME=jpeg-6b.patch
+PATCH_FILES=jpeg-6b.patch
 ADDITIONAL_FILES=makefile.mk \
                  jconfig.h
 

File libtextcat/makefile.mk

 TARFILE_NAME=libtextcat-2.2
 TARFILE_ROOTDIR=libtextcat-2.2
 
-PATCH_FILE_NAME=libtextcat-2.2.patch
+PATCH_FILES=libtextcat-2.2.patch
 
 
 ADDITIONAL_FILES= \

File libwpd/makefile.mk

 .ENDIF
 
 TARFILE_NAME=libwpd-0.8.8
-PATCH_FILE_NAME=$(TARFILE_NAME).diff
+PATCH_FILES=$(TARFILE_NAME).diff
 BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
 BUILD_DIR=src$/lib
 

File libxml2/makefile.mk

 
 TARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
 #.IF "$(OS)$(COM)"=="WNTGCC"
-#PATCH_FILE_NAME=$(TARFILE_NAME)-mingw.patch
+#PATCH_FILES=$(TARFILE_NAME)-mingw.patch
 #.ELSE
-PATCH_FILE_NAME=$(TARFILE_NAME).patch
+PATCH_FILES=$(TARFILE_NAME).patch
 #.ENDIF
 
 # This is only for UNX environment now

File libxmlsec/makefile.mk

 XMLSEC1VERSION=1.2.6
 
 TARFILE_NAME=$(PRJNAME)-$(XMLSEC1VERSION)
-PATCH_FILE_NAME=$(TARFILE_NAME).patch
+PATCH_FILES=$(TARFILE_NAME).patch
 
 ADDITIONAL_FILES= \
     include$/xmlsec$/nss$/akmngr.h \

File libxslt/makefile.mk

 LIBXSLTVERSION=$(LIBXSLT_MAJOR).$(LIBXSLT_MINOR).$(LIBXSLT_MICRO)
 
 TARFILE_NAME=$(PRJNAME)-$(LIBXSLTVERSION)
-PATCH_FILE_NAME=$(TARFILE_NAME).patch
+PATCH_FILES=$(TARFILE_NAME).patch
 
 # This is only for UNX environment now
 

File lpsolve/makefile.mk

 TARFILE_NAME=lp_solve_5.5
 
 .IF "$(GUI)"=="WNT"
-PATCH_FILE_NAME=lp_solve_5.5-windows.patch
+PATCH_FILES=lp_solve_5.5-windows.patch
 .ELSE
-PATCH_FILE_NAME=lp_solve_5.5.patch
+PATCH_FILES=lp_solve_5.5.patch
 ADDITIONAL_FILES=lpsolve55$/ccc.solaris lpsolve55$/ccc.os2
 .ENDIF
 

File lucene/makefile.mk

 LUCENE_ANALYZERS_JAR=lucene-analyzers-$(LUCENE_MAJOR).$(LUCENE_MINOR).jar
 
 TARFILE_NAME=$(LUCENE_NAME)
-PATCH_FILE_NAME=lucene.patch
+PATCH_FILES=lucene.patch
 
 BUILD_DIR=.
 BUILD_ACTION= ${ANT} -buildfile .$/contrib$/analyzers$/build.xml

File moz/makefile.mk

 .ENDIF
 TARFILE_ROOTDIR=mozilla
 
-PATCH_FILE_NAME=mozilla-source-$(MOZILLA_VERSION).patch 
+PATCH_FILES=mozilla-source-$(MOZILLA_VERSION).patch 
 
 # These files are needed for the W32 build when BUILD_MOZAB is set
 LIBIDL_VC71_ZIPFILE_NAME*=vc71-libIDL-0.6.8-bin.zip
 # Since you never know what will be in a patch (for example, it may already
 # patch at configure level), we remove the entire package directory if a patch
 # is newer.
-$(MISC)$/remove_build.flag : $(PATCH_FILE_NAME)
+$(MISC)$/remove_build.flag : $(PATCH_FILES)
 	$(REMOVE_PACKAGE_COMMAND)
 	$(TOUCH) $(MISC)$/remove_build.flag
 

File msfontextract/makefile.mk

 .ENDIF
 
 TARFILE_NAME=libmspack
-PATCH_FILE_NAME=msfontextract.patch
+PATCH_FILES=msfontextract.patch
 
 ADDITIONAL_FILES=mspack$/makefile.mk mspack$/msfontextract.c mspack$/ministub.c
 

File neon/makefile.mk

 NEON_NAME=neon-0.26.3
 
 TARFILE_NAME=$(NEON_NAME)
-PATCH_FILE_NAME=neon.patch
+PATCH_FILES=neon.patch
 ADDITIONAL_FILES=src$/makefile.mk src$/config.h
 
 BUILD_DIR=src

File odk/util/makefile.mk

 
 $(BIN)$/$(PRODUCTZIPFILE) : $(SDK_CONTENT_CHECK_FILES) $(SDK_CHECK_FLAGS)
 	cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/$(PRODUCTZIPFILE) . $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(PERL) -w $(SOLARENV)$/bin$/cleanzip.pl $@
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 #	cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/$(PRODUCTZIPFILE) . -x "idl/*" $(CHECKZIPRESULT)
 #	cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/odkidl.zip idl/* $(CHECKZIPRESULT)
 

File officecfg/util/makefile.mk

 
 $(BIN)$/registry_{$(alllangiso)}.zip : $(MISC)$/$(TARGET)_delzip
 	cd $(MISC)$/registry$/res$/$(@:b:s/registry_//) && zip -ru ..$/..$/..$/..$/bin$/registry_$(@:b:s/registry_//).zip org/*
+.IF "$(USE_SHELL)"!="4nt"
+	$(PERL) -w $(SOLARENV)$/bin$/cleanzip.pl $@
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 
 ALLTAR: \
 	$(MISC)$/$(TARGET)_delzip \

File openssl/makefile.mk

 OUT2INC += include/openssl/*
 
 .IF "$(OS)" == "LINUX"
-	PATCH_FILE_NAME=openssllnx.patch
+	PATCH_FILES=openssllnx.patch
 	ADDITIONAL_FILES:= \
 		libcrypto_OOo_0_9_8e.map \
 		libssl_OOo_0_9_8e.map
 .ENDIF
 
 .IF "$(OS)" == "SOLARIS"
-	PATCH_FILE_NAME=opensslsol.patch
+	PATCH_FILES=opensslsol.patch
 	ADDITIONAL_FILES:= \
 		libcrypto_OOo_0_9_8e.map \
 		libssl_OOo_0_9_8e.map
 .IF "$(OS)" == "WNT"
 
 .IF "$(COM)"=="GCC"
-PATCH_FILE_NAME=opensslmingw.patch
+PATCH_FILES=opensslmingw.patch
 .IF "$(USE_MINGW)" == "cygwin"
 CONFIGURE_ACTION=$(PERL) configure
 CONFIGURE_FLAGS=mingw shared 
 .ENDIF
 .ELSE
 
-		PATCH_FILE_NAME=openssl.patch
+		PATCH_FILES=openssl.patch
 		.IF "$(MAKETARGETS)" == ""
 			# The env. vars CC and PERL are used by nmake, and nmake insists on '\'s
 			# If WRAPCMD is set it is prepended before the compiler, don't touch that.

File python/makefile.mk

 
 
 TARFILE_NAME=Python-$(PYVERSION)
-PATCH_FILE_NAME=Python-$(PYVERSION).patch
+PATCH_FILES=Python-$(PYVERSION).patch
 
 PYPROJECTS= \
 	datetime 	\

File redland/raptor/makefile.mk

 RAPTORVERSION=$(RAPTOR_MAJOR).4.17
 
 TARFILE_NAME=raptor-$(RAPTORVERSION)
-PATCH_FILE_NAME=..$/$(TARFILE_NAME).patch
+PATCH_FILES=..$/$(TARFILE_NAME).patch
 
 ADDITIONAL_FILES=src/makefile.mk
 

File redland/rasqal/makefile.mk

 RASQALVERSION=0.9.15
 
 TARFILE_NAME=rasqal-$(RASQALVERSION)
-PATCH_FILE_NAME=..$/$(TARFILE_NAME).patch
+PATCH_FILES=..$/$(TARFILE_NAME).patch
 
 ADDITIONAL_FILES=src/makefile.mk
 

File redland/redland/makefile.mk

 REDLANDVERSION=1.0.7
 
 TARFILE_NAME=redland-$(REDLANDVERSION)
-PATCH_FILE_NAME=..$/$(TARFILE_NAME).patch
+PATCH_FILES=..$/$(TARFILE_NAME).patch
 
 ADDITIONAL_FILES=librdf/makefile.mk
 

File rhino/makefile.mk

 ADDITIONAL_FILES= \
 	toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java
 
-PATCH_FILE_NAME=rhino1_5R5.patch
+PATCH_FILES=rhino1_5R5.patch
 
 .IF "$(JAVACISGCJ)"=="yes"
 JAVA_HOME=

File saxon/makefile.mk

 ADDITIONAL_FILES=build.xml
 TARFILE_ROOTDIR=src
 
-PATCH_FILE_NAME=saxon-9.0.0.7-bj.patch
+PATCH_FILES=saxon-9.0.0.7-bj.patch
 
 BUILD_ACTION=$(ANT) $(ANT_FLAGS) -Dsolarbindir=$(SOLARBINDIR) jar-bj 
 

File solenv/bin/cleanzip.pl

+#!/usr/bin/perl -w
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: cleanzip.pl,v $
+#
+# $Revision$
+#
+# This file is part of OpenOffice.org.
+#
+# 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.
+#
+# 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).
+#
+# 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.
+#
+#*************************************************************************
+
+sub usage
+{
+	print "Cleanup unwanted unix attributes in zip archives\n\n";
+	print "Usage:\n";
+	print "$0 archive\n\n";
+    exit(1);
+}
+
+usage() if ! defined $ARGV[0];
+
+my $filename = $ARGV[0];
+use Archive::Zip qw(:ERROR_CODES :CONSTANTS);
+my $zip = Archive::Zip->new();
+
+unless ( $zip->read( $filename ) == AZ_OK ) {
+	die "$0: ERROR reading $filename\n";
+}
+my @members = $zip ->members();
+
+foreach my $member ( @members ) {
+#	printf ( "%o\n",$member->unixFileAttributes());
+#	printf ( "%o\n",$member->unixFileAttributes() & 0b111111111111);
+	my $attribs = $member->unixFileAttributes();
+	if ( $member->isDirectory ) {
+		$attribs = $attribs & 0b101111111111;
+		$member->unixFileAttributes($attribs)
+	}
+#	printf ( "%o\n",$member->unixFileAttributes());
+#	printf ( "%o\n",$member->unixFileAttributes() & 0b111111111111);
+#	print ( $member->fileName()."\n");
+}
+unless ( $zip->writeToFileNamed( ${filename}."_new" ) == AZ_OK ) {
+	die "$0: ERROR reading ${filename}_new\n";
+}
+rename($filename."_new", $filename);
+

File solenv/inc/_tg_zip.mk

 .IF "$(ZIP1DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP1HELPVAR)_, $(@:db))} $(ZIP1DIR)) $(command_seperator) zip $(ZIP1FLAGS) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $(subst,LANGDIR_away$/, $(ZIP1LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $@.$(INPATH)
     $(RM) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)
 .ELSE			# "$(ZIP1DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP1FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP1LIST) $(subst,LANGDIR,{$(subst,$(ZIP1HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP1DIR)" != ""
 .IF "$(ZIP1DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP1HELPVAR)_, $(@:db))} $(ZIP1DIR)) $(command_seperator) zip $(ZIP1FLAGS) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $(subst,LANGDIR_away$/, $(ZIP1LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)  $@ 
     $(RM) $(ZIP1TMP).$(ZIP1TARGET){$(subst,$(ZIP1HELPVAR),_ $(@:db))}$(ZIP1EXT)
 .ELSE			# "$(ZIP1DIR)" != ""
 	zip $(ZIP1FLAGS) $@ $(foreach,j,$(ZIP1LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP1TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP1DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP2DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP2HELPVAR)_, $(@:db))} $(ZIP2DIR)) $(command_seperator) zip $(ZIP2FLAGS) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $(subst,LANGDIR_away$/, $(ZIP2LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $@.$(INPATH)
     $(RM) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)
 .ELSE			# "$(ZIP2DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP2FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP2LIST) $(subst,LANGDIR,{$(subst,$(ZIP2HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP2DIR)" != ""
 .IF "$(ZIP2DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP2HELPVAR)_, $(@:db))} $(ZIP2DIR)) $(command_seperator) zip $(ZIP2FLAGS) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $(subst,LANGDIR_away$/, $(ZIP2LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)  $@ 
     $(RM) $(ZIP2TMP).$(ZIP2TARGET){$(subst,$(ZIP2HELPVAR),_ $(@:db))}$(ZIP2EXT)
 .ELSE			# "$(ZIP2DIR)" != ""
 	zip $(ZIP2FLAGS) $@ $(foreach,j,$(ZIP2LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP2TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP2DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP3DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP3HELPVAR)_, $(@:db))} $(ZIP3DIR)) $(command_seperator) zip $(ZIP3FLAGS) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $(subst,LANGDIR_away$/, $(ZIP3LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $@.$(INPATH)
     $(RM) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)
 .ELSE			# "$(ZIP3DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP3FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP3LIST) $(subst,LANGDIR,{$(subst,$(ZIP3HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP3DIR)" != ""
 .IF "$(ZIP3DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP3HELPVAR)_, $(@:db))} $(ZIP3DIR)) $(command_seperator) zip $(ZIP3FLAGS) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $(subst,LANGDIR_away$/, $(ZIP3LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)  $@ 
     $(RM) $(ZIP3TMP).$(ZIP3TARGET){$(subst,$(ZIP3HELPVAR),_ $(@:db))}$(ZIP3EXT)
 .ELSE			# "$(ZIP3DIR)" != ""
 	zip $(ZIP3FLAGS) $@ $(foreach,j,$(ZIP3LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP3TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP3DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP4DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP4HELPVAR)_, $(@:db))} $(ZIP4DIR)) $(command_seperator) zip $(ZIP4FLAGS) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $(subst,LANGDIR_away$/, $(ZIP4LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $@.$(INPATH)
     $(RM) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)
 .ELSE			# "$(ZIP4DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP4FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP4LIST) $(subst,LANGDIR,{$(subst,$(ZIP4HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP4DIR)" != ""
 .IF "$(ZIP4DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP4HELPVAR)_, $(@:db))} $(ZIP4DIR)) $(command_seperator) zip $(ZIP4FLAGS) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $(subst,LANGDIR_away$/, $(ZIP4LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)  $@ 
     $(RM) $(ZIP4TMP).$(ZIP4TARGET){$(subst,$(ZIP4HELPVAR),_ $(@:db))}$(ZIP4EXT)
 .ELSE			# "$(ZIP4DIR)" != ""
 	zip $(ZIP4FLAGS) $@ $(foreach,j,$(ZIP4LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP4TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP4DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP5DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP5HELPVAR)_, $(@:db))} $(ZIP5DIR)) $(command_seperator) zip $(ZIP5FLAGS) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $(subst,LANGDIR_away$/, $(ZIP5LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $@.$(INPATH)
     $(RM) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)
 .ELSE			# "$(ZIP5DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP5FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP5LIST) $(subst,LANGDIR,{$(subst,$(ZIP5HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP5DIR)" != ""
 .IF "$(ZIP5DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP5HELPVAR)_, $(@:db))} $(ZIP5DIR)) $(command_seperator) zip $(ZIP5FLAGS) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $(subst,LANGDIR_away$/, $(ZIP5LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)  $@ 
     $(RM) $(ZIP5TMP).$(ZIP5TARGET){$(subst,$(ZIP5HELPVAR),_ $(@:db))}$(ZIP5EXT)
 .ELSE			# "$(ZIP5DIR)" != ""
 	zip $(ZIP5FLAGS) $@ $(foreach,j,$(ZIP5LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP5TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP5DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP6DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP6HELPVAR)_, $(@:db))} $(ZIP6DIR)) $(command_seperator) zip $(ZIP6FLAGS) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $(subst,LANGDIR_away$/, $(ZIP6LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $@.$(INPATH)
     $(RM) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)
 .ELSE			# "$(ZIP6DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP6FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP6LIST) $(subst,LANGDIR,{$(subst,$(ZIP6HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP6DIR)" != ""
 .IF "$(ZIP6DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP6HELPVAR)_, $(@:db))} $(ZIP6DIR)) $(command_seperator) zip $(ZIP6FLAGS) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $(subst,LANGDIR_away$/, $(ZIP6LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)  $@ 
     $(RM) $(ZIP6TMP).$(ZIP6TARGET){$(subst,$(ZIP6HELPVAR),_ $(@:db))}$(ZIP6EXT)
 .ELSE			# "$(ZIP6DIR)" != ""
 	zip $(ZIP6FLAGS) $@ $(foreach,j,$(ZIP6LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP6TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP6DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP7DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP7HELPVAR)_, $(@:db))} $(ZIP7DIR)) $(command_seperator) zip $(ZIP7FLAGS) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $(subst,LANGDIR_away$/, $(ZIP7LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $@.$(INPATH)
     $(RM) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)
 .ELSE			# "$(ZIP7DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP7FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP7LIST) $(subst,LANGDIR,{$(subst,$(ZIP7HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP7DIR)" != ""
 .IF "$(ZIP7DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP7HELPVAR)_, $(@:db))} $(ZIP7DIR)) $(command_seperator) zip $(ZIP7FLAGS) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $(subst,LANGDIR_away$/, $(ZIP7LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)  $@ 
     $(RM) $(ZIP7TMP).$(ZIP7TARGET){$(subst,$(ZIP7HELPVAR),_ $(@:db))}$(ZIP7EXT)
 .ELSE			# "$(ZIP7DIR)" != ""
 	zip $(ZIP7FLAGS) $@ $(foreach,j,$(ZIP7LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP7TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP7DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP8DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP8HELPVAR)_, $(@:db))} $(ZIP8DIR)) $(command_seperator) zip $(ZIP8FLAGS) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $(subst,LANGDIR_away$/, $(ZIP8LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $@.$(INPATH)
     $(RM) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)
 .ELSE			# "$(ZIP8DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP8FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP8LIST) $(subst,LANGDIR,{$(subst,$(ZIP8HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP8DIR)" != ""
 .IF "$(ZIP8DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP8HELPVAR)_, $(@:db))} $(ZIP8DIR)) $(command_seperator) zip $(ZIP8FLAGS) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $(subst,LANGDIR_away$/, $(ZIP8LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)  $@ 
     $(RM) $(ZIP8TMP).$(ZIP8TARGET){$(subst,$(ZIP8HELPVAR),_ $(@:db))}$(ZIP8EXT)
 .ELSE			# "$(ZIP8DIR)" != ""
 	zip $(ZIP8FLAGS) $@ $(foreach,j,$(ZIP8LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP8TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP8DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP9DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP9HELPVAR)_, $(@:db))} $(ZIP9DIR)) $(command_seperator) zip $(ZIP9FLAGS) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $(subst,LANGDIR_away$/, $(ZIP9LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $@.$(INPATH)
     $(RM) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)
 .ELSE			# "$(ZIP9DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP9FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP9LIST) $(subst,LANGDIR,{$(subst,$(ZIP9HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP9DIR)" != ""
 .IF "$(ZIP9DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP9HELPVAR)_, $(@:db))} $(ZIP9DIR)) $(command_seperator) zip $(ZIP9FLAGS) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $(subst,LANGDIR_away$/, $(ZIP9LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)  $@ 
     $(RM) $(ZIP9TMP).$(ZIP9TARGET){$(subst,$(ZIP9HELPVAR),_ $(@:db))}$(ZIP9EXT)
 .ELSE			# "$(ZIP9DIR)" != ""
 	zip $(ZIP9FLAGS) $@ $(foreach,j,$(ZIP9LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP9TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP9DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF
 .IF "$(ZIP10DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP10HELPVAR)_, $(@:db))} $(ZIP10DIR)) $(command_seperator) zip $(ZIP10FLAGS) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $(subst,LANGDIR_away$/, $(ZIP10LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $@.$(INPATH)
     $(RM) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)
 .ELSE			# "$(ZIP10DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP10FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP10LIST) $(subst,LANGDIR,{$(subst,$(ZIP10HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP10DIR)" != ""
 .IF "$(ZIP10DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP10HELPVAR)_, $(@:db))} $(ZIP10DIR)) $(command_seperator) zip $(ZIP10FLAGS) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $(subst,LANGDIR_away$/, $(ZIP10LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)  $@ 
     $(RM) $(ZIP10TMP).$(ZIP10TARGET){$(subst,$(ZIP10HELPVAR),_ $(@:db))}$(ZIP10EXT)
 .ELSE			# "$(ZIP10DIR)" != ""
 	zip $(ZIP10FLAGS) $@ $(foreach,j,$(ZIP10LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP10TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP10DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF

File solenv/inc/rules.mk

 .ELSE			# "$(COM)"=="MSC"
 	$(TOUCH) $(SLO)$/pch_ex$/precompiled_$(PRJNAME).hxx$(PCHPOST)
 .ENDIF			# "$(COM)"=="MSC"
-	@echo USED_EXCEPTIONS_PCHFLAGS=$(CFLAGS)$(CFLAGSCXX)$(CFLAGSCXXSLO)$(CFLAGSSLO)$(CDEFS)$(CDEFSSLO)$(CDEFSMT)$(CFLAGSEXCEPTIONS) -DEXCEPTIONS_ON$(CFLAGSAPPEND)> $(INCCOM)$/pch_ex.mk
+	@echo USED_EXCEPTIONS_PCHFLAGS=$(subst,$(CFLAGSDEBUG), $(CFLAGS))$(CFLAGSCXX)$(CFLAGSCXXSLO)$(CFLAGSSLO)$(CDEFS)$(CDEFSSLO)$(CDEFSMT)$(CFLAGSEXCEPTIONS) -DEXCEPTIONS_ON$(CFLAGSAPPEND)> $(INCCOM)$/pch_ex.mk
 
 .INCLUDE .IGNORE : $(INCCOM)$/pch.mk
 .INCLUDE .IGNORE : $(INCCOM)$/pch_ex.mk
 # eq: first string is a copy of the compile line,
 # second generated by pch creation
 # use pch with exception support
-	@noop $(assign ACT_PCH_SWITCHES+=$(eq,$(strip $(USED_EXCEPTIONS_PCHFLAGS)),$(strip $(CFLAGS)$(CFLAGSCXX)$(CFLAGSCXXSLO)$(CFLAGSSLO)$(CDEFS:s/\//)$(CDEFSSLO)$(CDEFSMT)$(used_exc_switches)$(CFLAGSAPPEND)) $(CFLAGS_USE_EXCEPTIONS_PCH) $(NULL)))
+	@noop $(assign ACT_PCH_SWITCHES+=$(eq,$(strip $(USED_EXCEPTIONS_PCHFLAGS)),$(strip $(subst,$(CFLAGSDEBUG), $(CFLAGS))$(CFLAGSCXX)$(CFLAGSCXXSLO)$(CFLAGSSLO)$(CDEFS:s/\//)$(CDEFSSLO)$(CDEFSMT)$(used_exc_switches)$(CFLAGSAPPEND)) $(CFLAGS_USE_EXCEPTIONS_PCH) $(NULL)))
 # use pch without exception support
-	@noop $(assign ACT_PCH_SWITCHES+=$(eq,$(strip $(USED_PCHFLAGS)),$(strip $(CFLAGS)$(CFLAGSCXX)$(CFLAGSCXXSLO)$(CFLAGSSLO)$(CDEFS:s/\//)$(CDEFSSLO)$(CDEFSMT)$(used_exc_switches)$(CFLAGSAPPEND)) $(CFLAGS_USE_PCH) $(NULL)))
+	@noop $(assign ACT_PCH_SWITCHES+=$(eq,$(strip $(USED_PCHFLAGS)),$(strip $(subst,$(CFLAGSDEBUG), $(CFLAGS))$(CFLAGSCXX)$(CFLAGSCXXSLO)$(CFLAGSSLO)$(CDEFS:s/\//)$(CDEFSSLO)$(CDEFSMT)$(used_exc_switches)$(CFLAGSAPPEND)) $(CFLAGS_USE_PCH) $(NULL)))
 .ENDIF			# "$(ENABLE_PCH)"!=""
 .IF "$(GUI)"=="UNX"
 .IF "$(TEST)"!=""

File solenv/inc/tg_ext.mk

 ABS_PACKAGE_DIR:=$(MAKEDIR)$/$(MISC)$/build
 #MUST match with PACKAGE_DIR
 BACK_PATH=..$/..$/..$/
-
-# Remove entire package from output directory, for example, if new patches are
-# to be applied.
-# is this used at all?
-#.IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
-#	REMOVE_PACKAGE_COMMAND=-$(RM) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR) >& $(NULLDEV)
-#.ELSE			# "$(GUI)"=="WNT"
-#	REMOVE_PACKAGE_COMMAND=-$(RM) /s $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR) >& $(NULLDEV)
-#.ENDIF			# "$(GUI)"=="WNT"
+#MUST match with reference (currently MISC)
+MBACK_PATH=..$/..$/
 
 P_CONFIGURE_DIR=$(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/$(CONFIGURE_DIR)
 P_BUILD_DIR=$(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/$(BUILD_DIR)
 P_INSTALL_DIR=$(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/$(BUILD_DIR)
 P_INSTALL_TARGET_DIR=$(MISC)$/install
 
-.IF "$(PATCH_FILE_NAME)"=="none" ||	"$(PATCH_FILE_NAME)"==""
+.IF "$(PATCH_FILES)"=="none" ||	"$(PATCH_FILES)"==""
 NEW_PATCH_FILE_NAME:=$(TARFILE_NAME)
-.ELSE			# "$(PATCH_FILE_NAME)"=="none" ||	"$(PATCH_FILE_NAME)"==""
-NEW_PATCH_FILE_NAME:=$(PATCH_FILE_NAME)
-PATCH_FILE_DEP:=$(PRJ)$/$(PATH_IN_MODULE)$/$(NEW_PATCH_FILE_NAME)
-.ENDIF			# "$(PATCH_FILE_NAME)"=="none" ||	"$(PATCH_FILE_NAME)"==""
+.ELSE			# "$(PATCH_FILES)"=="none" ||	"$(PATCH_FILES)"==""
+NEW_PATCH_FILE_NAME:=$(TARFILE_NAME)-newpatch-rename_me.patch
+PATCH_FILE_DEP:=$(PRJ)$/$(PATH_IN_MODULE)$/{$(PATCH_FILES)}
+.ENDIF			# "$(PATCH_FILES)"=="none" ||	"$(PATCH_FILES)"==""
 
 .IF "$(TAR_EXCLUDES)"!=""
 TAR_EXCLUDE_SWITCH=--exclude=$(TAR_EXCLUDES)
 
 #patch
 $(PACKAGE_DIR)$/$(PATCH_FLAG_FILE) : $(PACKAGE_DIR)$/$(ADD_FILES_FLAG_FILE)
-.IF "$(PATCH_FILE_NAME)"=="none" ||	"$(PATCH_FILE_NAME)"==""
+.IF "$(PATCH_FILES)"=="none" ||	"$(PATCH_FILES)"==""
 	@echo no patch needed...
     $(TOUCH) $@
-.ELSE			# "$(PATCH_FILE_NAME)"=="none" ||	"$(PATCH_FILE_NAME)"==""
+.ELSE			# "$(PATCH_FILES)"=="none" ||	"$(PATCH_FILES)"==""
 .IF "$(GUI)"=="WNT"
 # hack to make 4nt version 4,01 work and still get propper
 # errorcodes for versions < 3,00
 .IF "$(my4ver:s/.//:s/,//)" >= "300"
-	cd $(PACKAGE_DIR) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)$/$(PATCH_FILE_NAME) | tr -d "\015" | patch $(PATCHFLAGS) -p2 ) && $(TOUCH) $(PATCH_FLAG_FILE)
+	cd $(PACKAGE_DIR) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)$/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 ) && $(TOUCH) $(PATCH_FLAG_FILE)
 .ELSE			# "$(my4ver:s/.//:s/,//)" >= "300"
-	cd $(PACKAGE_DIR) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)$/$(PATCH_FILE_NAME) | tr -d "\015" | patch $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
+	cd $(PACKAGE_DIR) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)$/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
 .ENDIF			# "$(my4ver:s/.//:s/,//)" >= "300"
 .ELSE           # "$(GUI)"=="WNT"
 .IF "$(BSCLIENT)"=="TRUE"
-	cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)$/$(PATCH_FILE_NAME) | $(GNUPATCH) -f $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
+	cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)$/{$(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
 .ELSE           # "$(BSCLIENT)"!=""
-	cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)$/$(PATCH_FILE_NAME) | $(GNUPATCH) $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
+	cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)$/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
 .ENDIF          # "$(BSCLIENT)"!=""
 .ENDIF          # "$(GUI)"=="WNT"
-.ENDIF			# "$(PATCH_FILE_NAME)"=="none" ||	"$(PATCH_FILE_NAME)"==""
+.ENDIF			# "$(PATCH_FILES)"=="none" ||	"$(PATCH_FILES)"==""
 .IF "$(T_ADDITIONAL_FILES)"!=""
 .IF "$(GUI)"=="WNT"
 # Native W32 tools generate only filedates with even seconds, cygwin also with odd seconds
 .ENDIF			# "$(OUT2BIN)"!=""
 	$(TOUCH) $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
 
-$(MISC)$/$(TARFILE_ROOTDIR) : $(MISC)$/$(TARFILE_NAME).unpack
+$(MISC)$/$(TARFILE_ROOTDIR).done : $(MISC)$/$(TARFILE_NAME).unpack $(PATCH_FILES)
 	@-mv $(MISC)$/$(TARFILE_ROOTDIR) $(MISC)$/$(TARFILE_ROOTDIR).old
 	@-rm -rf $(MISC)$/$(TARFILE_ROOTDIR).old
 	cd $(MISC) && $(subst,$(BACK_PATH),..$/..$/ $(shell @$(TYPE) $(PRJ)$/$(ROUT)$/misc$/$(TARFILE_NAME).unpack))
+.IF "$(P_ADDITIONAL_FILES)"!=""
+	noop $(foreach,i,$(P_ADDITIONAL_FILES) $(shell echo dummy > $i))
+.ENDIF			 "$(P_ADDITIONAL_FILES)"!=""
+.IF "$(PATCH_FILES)"!="none" &&	"$(PATCH_FILES)"!=""
+.IF "$(CONVERTFILES)"!=""
+	$(CONVERT) unix $(foreach,i,$(CONVERTFILES) $(MISC)$/$(TARFILE_ROOTDIR)$/$i)
+.ENDIF          # "$(CONVERTFILES)"!=""
+.IF "$(GUI)"=="WNT"
+# hack to make 4nt version 4,01 work and still get propper
+# errorcodes for versions < 3,00
+.IF "$(my4ver:s/.//:s/,//)" >= "300"
+	cd $(MISC) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)$/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 )
+.ELSE			# "$(my4ver:s/.//:s/,//)" >= "300"
+	cd $(MISC) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)$/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2
+.ENDIF			# "$(my4ver:s/.//:s/,//)" >= "300"
+.ELSE           # "$(GUI)"=="WNT"
+.IF "$(BSCLIENT)"=="TRUE"
+	cd $(MISC) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)$/${(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2
+.ELSE           # "$(BSCLIENT)"!=""
+	cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)$/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2
+.ENDIF          # "$(BSCLIENT)"!=""
+.ENDIF          # "$(GUI)"=="WNT"
+.IF "$(CONVERTFILES)"!=""
+	$(CONVERT) dos  $(foreach,i,$(CONVERTFILES) $(MISC)$/$(TARFILE_ROOTDIR)$/$i)
+.ENDIF          # "$(CONVERTFILES)"!=""
+.ENDIF			# "$(PATCH_FILES)"!="none" && "$(PATCH_FILES)"!="
 .IF "$(GUI)"=="UNX"	
 	$(TOUCH) $@
 .ENDIF			# "$(GUI)"=="UNX"	
 
-
-.IF "$(P_ADDITIONAL_FILES)"!=""
-$(P_ADDITIONAL_FILES) :
-	@-$(MKDIRHIER) $(@:d)
-	-echo dummy > $@
-	-$(TOUCH) $@
-.ENDIF			 "$(P_ADDITIONAL_FILES)"!=""
-
 .IF "$(T_ADDITIONAL_FILES)"!=""
 $(T_ADDITIONAL_FILES:+".dummy") : $(PACKAGE_DIR)$/$(UNTAR_FLAG_FILE)
 	@-$(MKDIRHIER) $(@:d)
 	-$(TOUCH) $(@:d)$(@:b)
 .ENDIF			 "$(T_ADDITIONAL_FILES)"!=""
 
-create_patch : $(MISC)$/$(TARFILE_ROOTDIR) $(P_ADDITIONAL_FILES) $(PACKAGE_DIR)$/$(PATCH_FLAG_FILE)
+create_patch : $(MISC)$/$(TARFILE_ROOTDIR).done $(PACKAGE_DIR)$/$(PATCH_FLAG_FILE)
 	@@-$(MKDIRHIER) $(PRJ)$/$(NEW_PATCH_FILE_NAME:d)
 	@@-$(RM) $(MISC)$/$(NEW_PATCH_FILE_NAME:f).tmp
 	@@-$(RM) $(PRJ)$/$(PATH_IN_MODULE)$/$(NEW_PATCH_FILE_NAME).bak
 # hard coded again to get the same directory level as before. quite ugly...
 	-cd $(PRJ)$/$(ROUT) && diff -ru misc$/$(TARFILE_ROOTDIR) misc$/build$/$(TARFILE_ROOTDIR) | $(PERL) $(SOLARENV)$/bin$/cleandiff.pl | tr -d "\015" > misc$/$(NEW_PATCH_FILE_NAME:f).tmp
 	-mv $(PRJ)$/$(PATH_IN_MODULE)$/$(NEW_PATCH_FILE_NAME) $(PRJ)$/$(PATH_IN_MODULE)$/$(NEW_PATCH_FILE_NAME).bak
+	-$(TOUCH) $(PRJ)$/$(PATH_IN_MODULE)$/$(NEW_PATCH_FILE_NAME).bak
 	$(PERL) $(SOLARENV)$/bin$/patch_sanitizer.pl $(PRJ)$/$(PATH_IN_MODULE)$/$(NEW_PATCH_FILE_NAME).bak $(MISC)$/$(NEW_PATCH_FILE_NAME:f).tmp $(PRJ)$/$(PATH_IN_MODULE)$/$(NEW_PATCH_FILE_NAME)
-	@@-$(RM) $(MISC)$/$(NEW_PATCH_FILE_NAME:f).tmp
+	@@-$(RM) $(MISC)$/$(NEW_PATCH_FILE_NAME:f).tmp $(PRJ)$/$(PATH_IN_MODULE)$/$(NEW_PATCH_FILE_NAME).bak
 	$(MAKECMD) $(MAKEMACROS) patch
 	@echo still some problems with win32 generated patches...
+	@echo $(USQ)find your new changes in $(NEW_PATCH_FILE_NAME). don't forget to move/rename that patch and insert it in your makefiles PATCH_FILES to activate.$(USQ)
 
 create_clean : $(PACKAGE_DIR)$/$(UNTAR_FLAG_FILE)
 	@echo done

File solenv/inc/tg_zip.mk

 .IF "$(ZIP$(TNR)DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP$(TNR)HELPVAR)_, $(@:db))} $(ZIP$(TNR)DIR)) $(command_seperator) zip $(ZIP$(TNR)FLAGS) $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT) $(subst,LANGDIR_away$/, $(ZIP$(TNR)LIST:s/LANGDIR/LANGDIR_away/)) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT) $@.$(INPATH)
     $(RM) $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT)
 .ELSE			# "$(ZIP$(TNR)DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 	zip $(ZIP$(TNR)FLAGS) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(foreach,j,$(ZIP$(TNR)LIST) $(subst,LANGDIR,{$(subst,$(ZIP$(TNR)HELPVAR)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 	@@-$(GNUCOPY) -p $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@) $@.$(INPATH)
 	@-$(RM) $(subst,$(COMMON_OUTDIR),$(OUTPATH) $@)
 .ENDIF			# "$(ZIP$(TNR)DIR)" != ""
 .IF "$(ZIP$(TNR)DIR)" != ""
 	@@-$(GNUCOPY) -p $@ $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT)
 	-$(CDD) $(subst,LANGDIR,{$(subst,$(ZIP$(TNR)HELPVAR)_, $(@:db))} $(ZIP$(TNR)DIR)) $(command_seperator) zip $(ZIP$(TNR)FLAGS) $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT) $(subst,LANGDIR_away$/, $(ZIP$(TNR)LIST:s/LANGDIR/LANGDIR_away/)) -x delzip  $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT) $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT) \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
     $(COPY) $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT)  $@ 
     $(RM) $(ZIP$(TNR)TMP).$(ZIP$(TNR)TARGET){$(subst,$(ZIP$(TNR)HELPVAR),_ $(@:db))}$(ZIP$(TNR)EXT)
 .ELSE			# "$(ZIP$(TNR)DIR)" != ""
 	zip $(ZIP$(TNR)FLAGS) $@ $(foreach,j,$(ZIP$(TNR)LIST) $(subst,LANGDIR,{$(subst,$(BIN)$/$(ZIP$(TNR)TARGET)_, $(@:db))} $j )) -x delzip $(avoid_cvs_dir) $(CHECKZIPRESULT)
+.IF "$(USE_SHELL)"!="4nt"
+	$(IFEXIST) $@ $(THEN) \
+	$(PERL) -w $(SOLARENV)$/bin/cleanzip.pl $@ \
+	$(FI)
+.ENDIF			# "$(USE_SHELL)"!="4nt"
 .ENDIF			# "$(ZIP$(TNR)DIR)" != ""
 .ENDIF			# "$(common_build_zip)"!=""
 .ENDIF

File solenv/inc/wntmsci11.mk

 CFLAGSEXCEPTIONS=-EHa
 CFLAGS_NO_EXCEPTIONS=
 
+# with the current debug switches PCH won't work
+# anyway. so keep the existing .pch intact and don't
+# touch it
+.IF "$(debug)"!=""
+ENABLE_PCH:=
+.ENDIF "$(debug)"!=""
+
 CFLAGS_CREATE_PCH=-I$(INCPCH) -Fo$(SLO)$/pchname.obj -Ycprecompiled_$(PRJNAME).hxx -DPRECOMPILED_HEADERS
 CFLAGS_USE_PCH=-I$(INCPCH) -Yuprecompiled_$(PRJNAME).hxx -Fp$(SLO)$/pch/precompiled_$(PRJNAME).hxx$(PCHPOST) -DPRECOMPILED_HEADERS
 CFLAGS_USE_EXCEPTIONS_PCH=-I$(INCPCH) -Yuprecompiled_$(PRJNAME).hxx -Fp$(SLO)$/pch_ex/precompiled_$(PRJNAME).hxx$(PCHPOST) -DPRECOMPILED_HEADERS

File stlport/makefile.mk

 .EXPORT : CC CXX
 .IF "$(COMID)"=="gcc3"
 	TARFILE_NAME=STLport-4.5
-    PATCH_FILE_NAME=STLport-4.5.patch
+    PATCH_FILES=STLport-4.5.patch
 .ELIF "$(GUI)"=="WNT"
     .IF "$(CCNUMVER)"<="001300000000"
         TARFILE_NAME=STLport-4.0
-        PATCH_FILE_NAME=STLport-4.0.patch
+        PATCH_FILES=STLport-4.0.patch
     .ELSE
         TARFILE_NAME=STLport-4.5-0119
-        PATCH_FILE_NAME=STLport-4.5-0119.patch
+        PATCH_FILES=STLport-4.5-0119.patch
     .ENDIF
 .ELSE
     TARFILE_NAME=STLport-4.0
-    PATCH_FILE_NAME=STLport-4.0.patch
+    PATCH_FILES=STLport-4.0.patch
         # To disable warnings from within STLport headers on unxsoli4 and
         # unxsols4, STLport-4.0.patch had to be extended mechanically by
         #
 
 .IF "$(OS)"=="IRIX"
 TARFILE_NAME=STLport-4.5
-PATCH_FILE_NAME=STLport-4.5.patch
+PATCH_FILES=STLport-4.5.patch
 BUILD_ACTION=gmake
 BUILD_FLAGS=-f gcc-3.0.mak
 BUILD_FLAGS+= -j$(MAXPROCESS)

File sysui/desktop/mandriva/mandriva-menus.spec

 	"core02"
 
 %clean
-rm -rf $RPM_BUILD_ROOT/*
+rm -rf $RPM_BUILD_ROOT
 
 %preun
 # remove from /etc/mailcap only on de-install

File sysui/desktop/redhat/redhat-menus.spec

 done
 
 %clean
-rm -rf $RPM_BUILD_ROOT/*
+rm -rf $RPM_BUILD_ROOT
 
 %triggerin --  %pkgprefix, %pkgprefix-writer, %pkgprefix-calc, %pkgprefix-draw, %pkgprefix-impress, %pkgprefix-base, %pkgprefix-math
 if [ -x /usr/bin/update-desktop-database ]; then

File sysui/desktop/solaris/makefile.mk

 	pkgmk -l 1073741824 -r . -f $(MISC)$/$(@:b:b:s/-/ /:1)$/prototype -o -d $(PKGDIR) ARCH=$(PKGARCH) VERSION=$(PKGVERSION.$(@:b:s/-/ /:1)),REV=$(PKGREV).$(PKGDATESTRING) 
 	$(FASPAC) $(SOLARBINDIR)/faspac-so.sh -a -d $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)30-desktop-int
 	@tar -cf - -C $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)30-desktop-int | gzip > $@
-	@rm -rf $(PKGDIR)/$(@:b:b:s/-/ /:1:s/.//)-desktop-int30
+	@rm -rf $(PKGDIR)/$(@:b:b:s/-/ /:1:s/.//)30-desktop-int
 
 .ENDIF

File sysui/desktop/suse/suse-menus.spec

 ./create_tree.sh
 
 %clean
-rm -rf $RPM_BUILD_ROOT/*
+rm -rf $RPM_BUILD_ROOT
 
 %triggerin -- %pkgprefix, %pkgprefix-writer, %pkgprefix-calc, %pkgprefix-draw, %pkgprefix-impress, %pkgprefix-base, %pkgprefix-math
 if [ -x /opt/gnome/bin/update-desktop-database ]; then

File tomcat/makefile.mk

 ADDITIONAL_FILES = jakarta-servletapi-5/build.xml
 #CONVERTFILES=build$/build.xml
 
-PATCH_FILE_NAME=tomcat.patch
+PATCH_FILES=tomcat.patch
 
 BUILD_DIR=jakarta-servletapi-5
 BUILD_ACTION=$(ANT)

File vigra/makefile.mk

 # --- Files --------------------------------------------------------
 
 TARFILE_NAME=vigra1.4.0
-PATCH_FILE_NAME=$(TARFILE_NAME).patch
+PATCH_FILES=$(TARFILE_NAME).patch
 
 CONFIGURE_DIR=
 CONFIGURE_ACTION=

File writer2latex/makefile.mk

 
 TARFILE_ROOTDIR=writer2latex05
 
-PATCH_FILE_NAME=writer2latex05.patch
+PATCH_FILES=writer2latex05.patch
 
 CONVERTFILES=build.xml
 JARFILES 		= ridl.jar unoil.jar jurt.jar juh.jar

File xpdf/makefile.mk

 # --- Files --------------------------------------------------------
 
 TARFILE_NAME=xpdf-3.02
-PATCH_FILE_NAME=$(TARFILE_NAME).patch
+PATCH_FILES=$(TARFILE_NAME).patch
 
 CONFIGURE_DIR=
 BUILD_DIR=$(CONFIGURE_DIR)

File zlib/makefile.mk

 
 TARFILE_NAME=zlib-1.1.4
 
-PATCH_FILE_NAME=zlib-1.1.4.patch
+PATCH_FILES=zlib-1.1.4.patch
 ADDITIONAL_FILES=makefile.mk
 
 #relative to CONFIGURE_DIR