diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2009-10-28 14:07:42 +0100 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2009-10-28 14:07:42 +0100 |
commit | 38c6ee6c2cfdc60df24bd50fc7fcffd1af43807e (patch) | |
tree | 0228e82cd99c3d4e72d7989898ccea41df9c4faa | |
parent | fixed broken manual merge (diff) | |
parent | Create DEV300_m62 milestone tag from trunk@277034 (diff) | |
download | core-38c6ee6c2cfdc60df24bd50fc7fcffd1af43807e.tar.gz core-38c6ee6c2cfdc60df24bd50fc7fcffd1af43807e.zip |
ause103: update to DEV300 m62
58 files changed, 1711 insertions, 3064 deletions
diff --git a/dmake/dag.c b/dmake/dag.c index ab5f7d9400c7..c10c12c18f1e 100644 --- a/dmake/dag.c +++ b/dmake/dag.c @@ -369,14 +369,17 @@ int flags; /* initial ht_flags */ /* strip out any \<nl> combinations where \ is the current * CONTINUATION char */ for(p=q; (p=strchr(p,CONTINUATION_CHAR))!=NIL(char); ) - if( p[1] == '\n' ) - strcpy( p, p+2 ); + if( p[1] == '\n' ) { + size_t len = strlen(p+2)+1; + memmove ( p, p+2, len ); + } else p++; p = DmStrSpn(q ," \t"); /* Strip white space before ... */ if( p != q ) { - strcpy( q, p); + size_t len = strlen(p)+1; + memmove( q, p, len ); p = q; } diff --git a/dmake/expand.c b/dmake/expand.c index f3db8ed02fd3..b7232303177e 100644 --- a/dmake/expand.c +++ b/dmake/expand.c @@ -230,6 +230,7 @@ Map_esc( tok )/* char *tok; { if( strchr( "\"\\vantbrf01234567", tok[1] ) ) { + size_t len; switch( tok[1] ) { case 'a' : *tok = 0x07; break; case 'b' : *tok = '\b'; break; @@ -246,13 +247,15 @@ char *tok; register int j = 0; for( ; i<2 && isdigit(tok[2]); i++ ) { j = (j << 3) + (tok[1] - '0'); - strcpy( tok+1, tok+2 ); + len = strlen(tok+2)+1; + memmove( tok+1, tok+2, len ); } j = (j << 3) + (tok[1] - '0'); *tok = j; } } - strcpy( tok+1, tok+2 ); + len = strlen(tok+2)+1; + memmove( tok+1, tok+2, len ); } } @@ -365,7 +368,8 @@ char *src; if( (e = Basename(s)) != s) { if( !(mod & DIRECTORY_FLAG) ) { /* Move the basename to the start. */ - strcpy(s, e); + size_t len = strlen(e)+1; + memmove(s, e, len); } else s = e; @@ -382,7 +386,8 @@ char *src; if( !(mod & FILE_FLAG) ) { /* Move the suffix to the start. */ - strcpy( s, e ); + size_t len = strlen(e)+1; + memmove(s, e, len); } else s = e; @@ -725,8 +730,10 @@ int doexpand; /* If TRUE enables macro expansion */ done = !lev; break; } else { + size_t len; s[1] = ' '; - strcpy( s, s+1 ); + len = strlen(s+1)+1; + memmove( s, s+1, len ); } /*FALLTHRU*/ case ' ': @@ -835,8 +842,10 @@ int doexpand; /* If TRUE enables macro expansion */ * converted them to a real space. Let's verify this. */ for( p=s; *p && *p != edelim && *p; p++ ) { if( p[0] == '\\' && p[1] == '\n' ) { + size_t len; p[1] = ' '; - strcpy( p, p+1 ); + len = strlen(p+1)+1; + memmove( p, p+1, len ); } } if( !*p ) @@ -1120,7 +1129,10 @@ int *flag; *flag = 1; res = Expand( start ); - if( (t = DmStrSpn( res, " \t" )) != res ) strcpy( res, t ); + if( (t = DmStrSpn( res, " \t" )) != res ) { + size_t len = strlen(t)+1; + memmove( res, t, len ); + } } FREE( start ); /* this is ok! start is assigned a DmSubStr above */ diff --git a/dmake/getinp.c b/dmake/getinp.c index d736f50320a2..5445193d1a90 100644 --- a/dmake/getinp.c +++ b/dmake/getinp.c @@ -169,7 +169,8 @@ do_again: * text lines on input. The maximum size of this is governened by * Buffer_size */ if( q != p && q[-1] == CONTINUATION_CHAR ) { - strcpy( q, q+1 ); + size_t len = strlen(q+1)+1; + memmove( q, q+1, len ); q--; cont = FALSE; } @@ -290,7 +291,8 @@ int keep; while( (c = strchr(c, COMMENT_CHAR)) != NIL(char) ) { if( Comment || State == NORMAL_SCAN ) if( c != str && c[-1] == ESCAPE_CHAR ) { - strcpy( c-1, c ); /* copy it left, due to \# */ + size_t len = strlen(c)+1; + memmove( c-1, c, len ); /* copy it left, due to \# */ if( pend ) (*pend)--; /* shift tail pointer left */ } else { diff --git a/dmake/make.c b/dmake/make.c index c8f5eea7f48d..0f7ab644627f 100644 --- a/dmake/make.c +++ b/dmake/make.c @@ -1352,8 +1352,10 @@ CELLPTR cp; * Nothing in Expand() should be able to change dynamic macros. */ cmnd = Expand( rp->st_string ); - if( new_attr && (p = DmStrSpn(cmnd," \t\n+-@%")) != cmnd ) - strcpy(cmnd,p); + if( new_attr && (p = DmStrSpn(cmnd," \t\n+-@%")) != cmnd ) { + size_t len = strlen(p)+1; + memmove(cmnd,p,len); + } /* COMMAND macro is set to "$(CMNDNAME) $(CMNDARGS)" by default, it is * possible for the user to reset it to, for example @@ -1381,8 +1383,10 @@ CELLPTR cp; shell = ((l_attr & A_SHELL) != 0); /* clean up the attributes that we may have just added. */ - if( (p = DmStrSpn(cmnd," \t\n+-@%")) != cmnd ) - strcpy(cmnd,p); + if( (p = DmStrSpn(cmnd," \t\n+-@%")) != cmnd ) { + size_t len = strlen(p)+1; + memmove(cmnd,p,len); + } } #if defined(MSDOS) @@ -1477,8 +1481,9 @@ int map; for( p=cmnd; *(n = DmStrPbrk(p,tmp)) != '\0'; ) /* Remove the \<nl> sequences. */ if(*n == CONTINUATION_CHAR && n[1] == '\n') { + size_t len = strlen(n+2)+1; DB_PRINT( "make", ("fixing [%s]", p) ); - strcpy( n, n+2 ); + memmove( n, n+2, len ); p = n; } /* Look for an escape sequence and replace it by it's corresponding diff --git a/dmake/path.c b/dmake/path.c index d5dea553afb6..ead163394175 100644 --- a/dmake/path.c +++ b/dmake/path.c @@ -172,6 +172,7 @@ char *path; char *tpath; int hasdriveletter = 0; int delentry; + size_t len; DB_ENTER( "Clean_path" ); @@ -231,14 +232,16 @@ char *path; p++; } while( *p == *DirSepStr); - strcpy(t+1,p); + len = strlen(p)+1; + memmove(t+1,p,len); continue; } /* Remove './'. If OOODMAKEMODE is set do this only if it is not at * the start of the path. */ if ( p-q == 1 && *q == '.' && (q != path || !STOBOOL(OOoDmMode)) ) { - strcpy(q,p+1); + len = strlen(p+1)+1; + memmove(q,p+1,len); q = tpath; continue; } @@ -268,7 +271,8 @@ char *path; } while( *t == *DirSepStr); /* q points to first letter of the current directory/file. */ - strcpy(q,t); + len = strlen(t)+1; + memmove(q,t,len); q = tpath; } else diff --git a/dmake/rulparse.c b/dmake/rulparse.c index 338e77e8ad09..af7915fb129b 100644 --- a/dmake/rulparse.c +++ b/dmake/rulparse.c @@ -897,7 +897,7 @@ CELLPTR prereq; /* list of prerequisites */ /* Handle %-targets. */ CELLPTR cur; CELLPTR tpq = NIL(CELL); - CELLPTR nprq; + CELLPTR nprq = NULL; #ifdef DBUG DB_PRINT( "%", ("Handling %%-target [%s : : <prerequisites follow, maybe empty>]", @@ -915,7 +915,8 @@ CELLPTR prereq; /* list of prerequisites */ if( *name == '\'' && name[len-1]=='\'' ){ name[len-1] = '\0'; - strcpy(name,name+1); + len = strlen(name+1)+1; + memmove(name,name+1,len); /* add indirect prerequisite */ _add_indirect_prereq( cur ); } diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk index 23face9e04ca..e9347074b73f 100644 --- a/instsetoo_native/util/makefile.mk +++ b/instsetoo_native/util/makefile.mk @@ -99,7 +99,7 @@ xxxx: echo $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml .IF "$(GUI)"!="WNT" && "$(EPM)"=="NO" && "$(USE_PACKAGER)"=="" -#ALLTAR : $(LOCALPYFILES) +ALLTAR : $(LOCALPYFILES) @echo "No EPM: do no packaging at this stage" .ELSE # "$(GUI)"!="WNT" && "$(EPM)"=="NO" && "$(USE_PACKAGER)"=="" .IF "$(UPDATER)"=="" || "$(USE_PACKAGER)"=="" diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index 1a28d5d71d9d..16855101dfd2 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -1720,7 +1720,7 @@ End File gid_File_Lib_LibXMLSec_xmlseccore TXT_FILE_BODY; #ifdef _gcc3 - Name = "libxmlsec1-1.dll"; + Name = "libxmlsec1.dll"; #else Name = "libxmlsec.dll"; #endif @@ -1731,7 +1731,7 @@ End File gid_File_Lib_LibXMLSec_xmlsecmscrypto TXT_FILE_BODY; #ifdef _gcc3 - Name = "libxmlsec1-mscrypto-1.dll"; + Name = "libxmlsec1-mscrypto.dll"; #else Name = "libxmlsec-mscrypto.dll"; #endif diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp index 519a2f865a38..7d1d8bb5cc40 100644 --- a/scp2/source/ooo/file_ooo.scp +++ b/scp2/source/ooo/file_ooo.scp @@ -178,17 +178,6 @@ End #endif -#ifndef WITHOUT_FONTOOO - -File gid_File_Exe_Msfontextract - BIN_FILE_BODY; - Dir = gid_Dir_Program; - Name = EXENAME(msfontextract); - Styles = (PACKED); -End - -#endif - #ifdef UNX File gid_File_Bin_Open_Url @@ -3047,6 +3036,15 @@ End #endif #ifndef WITHOUT_MYSPELL_DICTS +File gid_File_Extension_Dictionary_He + Dir = gid_Brand_Dir_Share_Extension_Install; + Name = "dict-he.oxt"; + Styles = (PACKED, FORCELANGUAGEPACK); + UnixRights = 444; +End +#endif + +#ifndef WITHOUT_MYSPELL_DICTS File gid_File_Extension_Dictionary_Hu Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-hu.oxt"; diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp index 1d7e0f297148..9607c88b6e0c 100644 --- a/scp2/source/ooo/module_hidden_ooo.scp +++ b/scp2/source/ooo/module_hidden_ooo.scp @@ -52,7 +52,6 @@ Module gid_Module_Root_Files_2 gid_File_Profile_Gengal, gid_File_Bin_Spadmin_Bin, gid_File_Bin_Uri_Encode, - gid_File_Exe_Msfontextract, gid_File_Exe_Nsplugin, gid_File_Lib_Npsoplugin, gid_File_Lib_Soffice, @@ -1061,6 +1060,17 @@ Module gid_Module_Root_Extension_Dictionary_Gl Styles = (HIDDEN_ROOT); End +Module gid_Module_Root_Extension_Dictionary_He + Name = "gid_Module_Root_Extension_Dictionary_He"; + Description = "gid_Module_Root_Extension_Dictionary_He"; + Files = (gid_File_Extension_Dictionary_He); + InstallOrder = "2000"; + Spellcheckerlanguage = "he"; + PackageInfo = "packinfo_office.txt"; + ParentID = gid_Module_Root; + Styles = (HIDDEN_ROOT); +End + Module gid_Module_Root_Extension_Dictionary_Hu Name = "gid_Module_Root_Extension_Dictionary_Hu"; Description = "gid_Module_Root_Extension_Dictionary_Hu"; diff --git a/set_soenv.in b/set_soenv.in index 1a7fdc7d0da8..71f6d6bf90df 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -355,7 +355,7 @@ elsif ( $platform =~ m/freebsd/ ) elsif ( $platform =~ m/linux/ ) { # General Linux settings: - $CVER = "C300"; + $CVER = "C341"; $BIG_SVX = "TRUE"; $COM = "GCC"; $COMPATH = '@COMPATH@'; @@ -390,20 +390,13 @@ elsif ( $platform =~ m/linux/ ) $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads"; } - if( @GCCVER@ >= 30401 ) { - $OUTPATH = "unxlngi6"; - $CVER = "C341"; - } - else { - $OUTPATH = "unxlngi4"; - } + $OUTPATH = "unxlngi6"; } elsif ($platform =~ m/^x86_64/) { print "Setting Linux x86-64 specific values... "; $outfile = "LinuxX86-64Env.Set"; $CPU = "X"; $CPUNAME = "X86_64"; - $CVER = "C341"; $OUTPATH = "unxlngx6"; # Blackdown.org JDK porting project uses `amd64' and `server' in JDK 1.4.2 RC1 $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64"; @@ -416,7 +409,6 @@ elsif ( $platform =~ m/linux/ ) $outfile = "LinuxIA64Env.Set"; $CPU = "A"; $CPUNAME = "IA64"; - $CVER = "C341"; $OUTPATH = "unxlnga"; $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ia64"; $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ia64".$ds."server"; @@ -499,7 +491,6 @@ elsif ( $platform =~ m/linux/ ) $outfile = "LinuxM68KEnv.Set"; $CPU = "6"; $CPUNAME = "M68K"; - $CVER = "C341"; $OUTPATH = "unxlngm68k"; $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."m68k"; $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."m68k".$ds."server"; diff --git a/soldep/bootstrp/makefile.mk b/soldep/bootstrp/makefile.mk index 48a6b244201f..d38b25982b86 100644 --- a/soldep/bootstrp/makefile.mk +++ b/soldep/bootstrp/makefile.mk @@ -38,7 +38,7 @@ ENABLE_EXCEPTIONS=true # --- Settings ----------------------------------------------------- -.INCLUDE : $(PRJ)$/util$/perl.mk +#.INCLUDE : $(PRJ)$/util$/perl.mk .INCLUDE : settings.mk # fixme, code is not yet 64 bit clean @@ -50,8 +50,7 @@ all: # --- Files -------------------------------------------------------- EXCEPTIONSFILES= \ - $(SLO)$/prj.obj \ - $(SLO)$/XmlBuildList.obj + $(SLO)$/prj.obj SLOFILES=\ $(SLO)$/dep.obj \ @@ -60,8 +59,6 @@ SLOFILES=\ $(SLO)$/appdef.obj \ $(SLO)$/hashtbl.obj \ $(SLO)$/prj.obj \ - $(SLO)$/XmlBuildList.obj - SHL1TARGET =$(TARGET)$(DLLPOSTFIX) SHL1IMPLIB =$(TARGET) @@ -72,8 +69,7 @@ SHL1STDLIBS=\ $(TOOLSLIB) \ $(BTSTRPLIB) \ $(VOSLIB) \ - $(SALLIB) \ - $(PERL_LIB) + $(SALLIB) DEF1NAME =$(SHL1TARGET) DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt diff --git a/soldep/bootstrp/prj.cxx b/soldep/bootstrp/prj.cxx index c6a0fedd12b4..f81e03c5a7a3 100644 --- a/soldep/bootstrp/prj.cxx +++ b/soldep/bootstrp/prj.cxx @@ -37,8 +37,6 @@ #include <tools/geninfo.hxx> #include <soldep/prj.hxx> #include <bootstrp/inimgr.hxx> -#include <soldep/XmlBuildList.hxx> -#include "XmlBuildListDef.hxx" #ifndef MACOSX #pragma hdrstop @@ -74,7 +72,7 @@ #endif #endif -static const char * XML_ALL = "all"; +//static const char * XML_ALL = "all"; // // class SimpleConfig @@ -1105,46 +1103,42 @@ Prj& Prj::operator<< ( SvStream& rStream ) // /*****************************************************************************/ -Star::Star(XmlBuildList* pXmlBuildListObj) +Star::Star() /*****************************************************************************/ : pDepMode (NULL), - pAllDepMode (NULL), - mpXmlBuildList (pXmlBuildListObj) + pAllDepMode (NULL) { // this ctor is only used by StarWriter } /*****************************************************************************/ -Star::Star(XmlBuildList* pXmlBuildListObj, String aFileName, USHORT nMode ) +Star::Star(String aFileName, USHORT nMode ) /*****************************************************************************/ : nStarMode( nMode ), sFileName( aFileName ), pDepMode (NULL), - pAllDepMode (NULL), - mpXmlBuildList (pXmlBuildListObj) + pAllDepMode (NULL) { Read( aFileName ); } /*****************************************************************************/ -Star::Star(XmlBuildList* pXmlBuildListObj, SolarFileList *pSolarFiles ) +Star::Star(SolarFileList *pSolarFiles ) /*****************************************************************************/ : nStarMode( STAR_MODE_MULTIPLE_PARSE ), pDepMode (NULL), - pAllDepMode (NULL), - mpXmlBuildList (pXmlBuildListObj) + pAllDepMode (NULL) { // this ctor is used by StarBuilder to get the information for the whole workspace Read( pSolarFiles ); } /*****************************************************************************/ -Star::Star(XmlBuildList* pXmlBuildListObj, GenericInformationList *pStandLst, ByteString &rVersion, +Star::Star(GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal, const char *pSourceRoot ) /*****************************************************************************/ : pDepMode (NULL), - pAllDepMode (NULL), - mpXmlBuildList (pXmlBuildListObj) + pAllDepMode (NULL) { UpdateFileList (pStandLst, rVersion, TRUE, bLocal, pSourceRoot); } @@ -1230,6 +1224,12 @@ void Star::UpdateFileList( GenericInformationList *pStandLst, ByteString &rVersi aEntry += DirEntry( ssAddPath ); } } + sPath = rVersion; + sPath += "/settings/SHORTPATH"; + GenericInformation *pShortPath = pStandLst->GetInfo( sPath, TRUE ); + BOOL bShortPath = FALSE; + if (pShortPath && (pShortPath->GetValue() == "_TRUE")) + bShortPath = TRUE; sSourceRoot = aEntry.GetFull(); GenericInformationList *pProjects = pProjectsKey->GetSubList(); if ( pProjects ) { @@ -1243,7 +1243,11 @@ void Star::UpdateFileList( GenericInformationList *pStandLst, ByteString &rVersi GenericInformation * pDir = pProject->GetSubInfo (aDirStr); if (pDir) { ByteString aDir = pDir->GetValue(); - DirEntry aRootEntry = aEntry.GetPath() + DirEntry(aDir); + DirEntry aRootEntry; + if (bShortPath) + aRootEntry = aEntry + DirEntry(aDir); + else + aRootEntry = aEntry.GetPath() + DirEntry(aDir); sLocalSourceRoot = aRootEntry.GetFull(); } @@ -1277,6 +1281,18 @@ void Star::UpdateFileList( GenericInformationList *pStandLst, ByteString &rVersi } /*****************************************************************************/ +void Star::FullReload( GenericInformationList *pStandLst, ByteString &rVersion, + BOOL bRead, BOOL bLocal, const char *pSourceRoot ) +/*****************************************************************************/ +{ + ClearAvailableDeps(); + ClearCurrentDeps(); + ClearLoadedFilesList(); + RemoveAllPrj(); + UpdateFileList( pStandLst, rVersion, bRead, bLocal, pSourceRoot ); +} + +/*****************************************************************************/ BOOL Star::CheckFileLoadList(SolarFileList *pSolarFiles) /*****************************************************************************/ { @@ -1393,14 +1409,14 @@ void Star::Read( String &rFileName ) ByteString sFileName_l(ssFileName, RTL_TEXTENCODING_ASCII_US); StarFile *pFile = new StarFile( ssFileName ); if ( pFile->Exists()) { - if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) - { - ReadXmlBuildList(sFileName_l); - } else { +// if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) +// { +// ReadXmlBuildList(sFileName_l); +// } else { SimpleConfig aSolarConfig( ssFileName ); while (( aString = aSolarConfig.GetNext()) != "" ) InsertToken (( char * ) aString.GetBuffer()); - } +// } } aMutex.acquire(); ReplaceFileEntry (&aLoadedFilesList, pFile); @@ -1460,14 +1476,14 @@ void Star::Read( SolarFileList *pSolarFiles ) StarFile *pFile = new StarFile( ssFileName ); if ( pFile->Exists()) { - if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) - { - ReadXmlBuildList(sFileName_l); - } else { +// if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) +// { +// ReadXmlBuildList(sFileName_l); +// } else { SimpleConfig aSolarConfig( ssFileName ); while (( aString = aSolarConfig.GetNext()) != "" ) InsertToken (( char * ) aString.GetBuffer()); - } +// } DirEntry aEntry( pFile->GetName() ); DirEntry aEntryPrj = aEntry.GetPath().GetPath(); @@ -1500,7 +1516,7 @@ String Star::CreateFileName( String& rProject, String& rSourceRoot ) // this method is used to find solarlist parts of nabours (other projects) String sPrjDir( String::CreateFromAscii( "prj" )); String sBuildList( String::CreateFromAscii( "build.lst" )); - String sXmlBuildList( String::CreateFromAscii( "build.xlist" )); +// String sXmlBuildList( String::CreateFromAscii( "build.xlist" )); DirEntry aEntry( rSourceRoot ); aEntry += DirEntry( rProject ); @@ -1519,15 +1535,17 @@ String Star::CreateFileName( String& rProject, String& rSourceRoot ) aEntry += DirEntry( sPrjDir ); - DirEntry aPossibleEntry(aEntry); - aPossibleEntry += DirEntry( sXmlBuildList ); +// DirEntry aPossibleEntry(aEntry); +// aPossibleEntry += DirEntry( sXmlBuildList ); aEntry += DirEntry( sBuildList ); DirEntry& aActualEntry = aEntry; +/* if (aPossibleEntry.Exists()) { aActualEntry = aPossibleEntry; - } else if ( !aActualEntry.Exists() && aDBNotFoundHdl.IsSet()) + } else */ + if ( !aActualEntry.Exists() && aDBNotFoundHdl.IsSet()) aDBNotFoundHdl.Call( &rProject ); return aActualEntry.GetFull(); } @@ -1985,163 +2003,163 @@ void Star::SetCurrentDeps (SByteStringList* pDepList) Expand_Impl(); } -/*****************************************************************************/ -void Star::ReadXmlBuildList(const ByteString& sBuildLstPath) { -/*****************************************************************************/ - if (mpXmlBuildList) { - Prj* pPrj = NULL; - - try { - mpXmlBuildList->loadXMLFile(sBuildLstPath); - } - catch (XmlBuildListException) { - DirEntry aDirEntry (sBuildLstPath); - String ssPrjName = aDirEntry.GetPath().GetPath().GetBase(); - ByteString sPrjName = ByteString(ssPrjName, RTL_TEXTENCODING_ASCII_US); - pPrj = GetPrj( sPrjName ); - if (pPrj) - { - //remove old Project - RemovePrj (pPrj); - } - return; - } - - try { - ByteString sProjectName = mpXmlBuildList->getModuleName(); - pPrj = GetPrj( sProjectName ); - if (pPrj) - { - //remove old Project - RemovePrj (pPrj); - } - - // insert new Project - pPrj = new Prj ( sProjectName ); - pPrj->SetPreFix( sProjectName ); // use ProjectName as Prefix - Insert(pPrj,LIST_APPEND); - - // get global dependencies - FullByteStringListWrapper aProducts = mpXmlBuildList->getProducts(); - ByteString aDepType = ByteString(DEP_MD_ALWAYS_STR); - if (mpXmlBuildList->hasModuleDepType(aProducts, aDepType)) - pPrj->HasHardDependencies( TRUE ); - - aDepType = ByteString(DEP_MD_FORCE_STR); - if (mpXmlBuildList->hasModuleDepType(aProducts, aDepType)) - { - pPrj->HasHardDependencies( TRUE ); - pPrj->HasFixedDependencies( TRUE ); - } - - // modul dependencies - ByteString sModulDepType = ByteString(); - FullByteStringListWrapper aModulDeps = mpXmlBuildList->getModuleDependencies(aProducts, sModulDepType); - ByteString * pModulDep = aModulDeps.First(); - while (pModulDep) - { - FullByteStringListWrapper aModulProducts = mpXmlBuildList->getModuleProducts(*pModulDep); - ByteString *pModulePoduct = aModulProducts.First(); - while (pModulePoduct) - { - if (*pModulePoduct == XML_ALL) - pPrj->AddDependencies( *pModulDep ); - else - pPrj->AddDependencies( *pModulDep, *pModulePoduct); - - pModulePoduct = aModulProducts.Next(); - } - pModulDep = aModulDeps.Next(); - } - - // job dirs - ByteString sJobType = ByteString(); - ByteString sJobPlatforms = ByteString(); - FullByteStringListWrapper aJobDirs = mpXmlBuildList->getJobDirectories(sJobType, sJobPlatforms); // all dirs - ByteString* pJobDir = aJobDirs.First(); - while (pJobDir) - { - FullByteStringListWrapper aJobPlatforms = mpXmlBuildList->getJobPlatforms (*pJobDir); - ByteString* pJobPlatform = aJobPlatforms.First(); - while (pJobPlatform) - { - ByteString sJobRestriction = ByteString(); - FullByteStringListWrapper aJobReq = mpXmlBuildList->getJobBuildReqs (*pJobDir, *pJobPlatform); - // nur ein Req pro Platform wird zur Zeit unterstützt - // mehr geht wegen der Struktur zur Zeit nicht! - // lese sie trotzdem kommasepariert ein, wenn nötig - if (aJobReq.Count() > 0) - { - ByteString* pRestriction = aJobReq.First(); - sJobRestriction = ByteString (*pRestriction); - pRestriction = aJobReq.Next(); - while (pRestriction) - { - sJobRestriction += ByteString (","); - sJobRestriction += ByteString (*pRestriction); - pRestriction = aJobReq.Next(); - } - } - - FullByteStringListWrapper aJobTypes = mpXmlBuildList->getJobTypes (*pJobDir); - ByteString * pJobType = aJobTypes.First(); - while(pJobType) - { - FullByteStringListWrapper aDirDependencies = mpXmlBuildList->getDirDependencies(*pJobDir, *pJobType, *pJobPlatform); - SByteStringList *pDepList = NULL; - if (aDirDependencies.Count() > 0) - { - pDepList = new SByteStringList; - ByteString* pDirDep = aDirDependencies.First(); - while (pDirDep) - { - ByteString sFullDir = sProjectName; - sFullDir += *pDirDep; - sFullDir.SearchAndReplaceAll('/', '\\'); - *pDirDep = sFullDir; - pDepList->PutString(pDirDep); // String wird übergeben - aDirDependencies.Remove(); // Zeiger aus alter Liste löschen - pDirDep = aDirDependencies.First(); - } - } - // insert CommandData - CommandData * pCmdData = new CommandData; - ByteString sRequiredPath = sProjectName; - sRequiredPath += *pJobDir; - sRequiredPath.SearchAndReplaceAll('/', '\\'); - pCmdData->SetPath(sRequiredPath); - pCmdData->SetCommandType( GetJobType(*pJobType) ); - pCmdData->SetCommandPara( ByteString() ); - pCmdData->SetOSType( GetOSType(*pJobPlatform) ); - ByteString sLogFileName = sProjectName; - sLogFileName += ByteString::CreateFromInt64( pPrj->Count() ); - pCmdData->SetLogFile( sLogFileName ); - pCmdData->SetClientRestriction( sJobRestriction ); - if ( pDepList ) - pCmdData->SetDependencies( pDepList ); - - pPrj->Insert ( pCmdData, LIST_APPEND ); - - pJobType = aJobTypes.Next(); - } - - pJobPlatform = aJobPlatforms.Next(); - } - - pJobDir = aJobDirs.Next(); - } - pPrj->ExtractDependencies(); - } - catch (XmlBuildListException) { - if (pPrj) - { - RemovePrj (pPrj); - delete pPrj; - } - - } - } -} +///*****************************************************************************/ +//void Star::ReadXmlBuildList(const ByteString& sBuildLstPath) { +///*****************************************************************************/ +// if (mpXmlBuildList) { +// Prj* pPrj = NULL; +// +// try { +// mpXmlBuildList->loadXMLFile(sBuildLstPath); +// } +// catch (XmlBuildListException) { +// DirEntry aDirEntry (sBuildLstPath); +// String ssPrjName = aDirEntry.GetPath().GetPath().GetBase(); +// ByteString sPrjName = ByteString(ssPrjName, RTL_TEXTENCODING_ASCII_US); +// pPrj = GetPrj( sPrjName ); +// if (pPrj) +// { +// //remove old Project +// RemovePrj (pPrj); +// } +// return; +// } +// +// try { +// ByteString sProjectName = mpXmlBuildList->getModuleName(); +// pPrj = GetPrj( sProjectName ); +// if (pPrj) +// { +// //remove old Project +// RemovePrj (pPrj); +// } +// +// // insert new Project +// pPrj = new Prj ( sProjectName ); +// pPrj->SetPreFix( sProjectName ); // use ProjectName as Prefix +// Insert(pPrj,LIST_APPEND); +// +// // get global dependencies +// FullByteStringListWrapper aProducts = mpXmlBuildList->getProducts(); +// ByteString aDepType = ByteString(DEP_MD_ALWAYS_STR); +// if (mpXmlBuildList->hasModuleDepType(aProducts, aDepType)) +// pPrj->HasHardDependencies( TRUE ); +// +// aDepType = ByteString(DEP_MD_FORCE_STR); +// if (mpXmlBuildList->hasModuleDepType(aProducts, aDepType)) +// { +// pPrj->HasHardDependencies( TRUE ); +// pPrj->HasFixedDependencies( TRUE ); +// } +// +// // modul dependencies +// ByteString sModulDepType = ByteString(); +// FullByteStringListWrapper aModulDeps = mpXmlBuildList->getModuleDependencies(aProducts, sModulDepType); +// ByteString * pModulDep = aModulDeps.First(); +// while (pModulDep) +// { +// FullByteStringListWrapper aModulProducts = mpXmlBuildList->getModuleProducts(*pModulDep); +// ByteString *pModulePoduct = aModulProducts.First(); +// while (pModulePoduct) +// { +// if (*pModulePoduct == XML_ALL) +// pPrj->AddDependencies( *pModulDep ); +// else +// pPrj->AddDependencies( *pModulDep, *pModulePoduct); +// +// pModulePoduct = aModulProducts.Next(); +// } +// pModulDep = aModulDeps.Next(); +// } +// +// // job dirs +// ByteString sJobType = ByteString(); +// ByteString sJobPlatforms = ByteString(); +// FullByteStringListWrapper aJobDirs = mpXmlBuildList->getJobDirectories(sJobType, sJobPlatforms); // all dirs +// ByteString* pJobDir = aJobDirs.First(); +// while (pJobDir) +// { +// FullByteStringListWrapper aJobPlatforms = mpXmlBuildList->getJobPlatforms (*pJobDir); +// ByteString* pJobPlatform = aJobPlatforms.First(); +// while (pJobPlatform) +// { +// ByteString sJobRestriction = ByteString(); +// FullByteStringListWrapper aJobReq = mpXmlBuildList->getJobBuildReqs (*pJobDir, *pJobPlatform); +// // nur ein Req pro Platform wird zur Zeit unterstützt +// // mehr geht wegen der Struktur zur Zeit nicht! +// // lese sie trotzdem kommasepariert ein, wenn nötig +// if (aJobReq.Count() > 0) +// { +// ByteString* pRestriction = aJobReq.First(); +// sJobRestriction = ByteString (*pRestriction); +// pRestriction = aJobReq.Next(); +// while (pRestriction) +// { +// sJobRestriction += ByteString (","); +// sJobRestriction += ByteString (*pRestriction); +// pRestriction = aJobReq.Next(); +// } +// } +// +// FullByteStringListWrapper aJobTypes = mpXmlBuildList->getJobTypes (*pJobDir); +// ByteString * pJobType = aJobTypes.First(); +// while(pJobType) +// { +// FullByteStringListWrapper aDirDependencies = mpXmlBuildList->getDirDependencies(*pJobDir, *pJobType, *pJobPlatform); +// SByteStringList *pDepList = NULL; +// if (aDirDependencies.Count() > 0) +// { +// pDepList = new SByteStringList; +// ByteString* pDirDep = aDirDependencies.First(); +// while (pDirDep) +// { +// ByteString sFullDir = sProjectName; +// sFullDir += *pDirDep; +// sFullDir.SearchAndReplaceAll('/', '\\'); +// *pDirDep = sFullDir; +// pDepList->PutString(pDirDep); // String wird übergeben +// aDirDependencies.Remove(); // Zeiger aus alter Liste löschen +// pDirDep = aDirDependencies.First(); +// } +// } +// // insert CommandData +// CommandData * pCmdData = new CommandData; +// ByteString sRequiredPath = sProjectName; +// sRequiredPath += *pJobDir; +// sRequiredPath.SearchAndReplaceAll('/', '\\'); +// pCmdData->SetPath(sRequiredPath); +// pCmdData->SetCommandType( GetJobType(*pJobType) ); +// pCmdData->SetCommandPara( ByteString() ); +// pCmdData->SetOSType( GetOSType(*pJobPlatform) ); +// ByteString sLogFileName = sProjectName; +// sLogFileName += ByteString::CreateFromInt64( pPrj->Count() ); +// pCmdData->SetLogFile( sLogFileName ); +// pCmdData->SetClientRestriction( sJobRestriction ); +// if ( pDepList ) +// pCmdData->SetDependencies( pDepList ); +// +// pPrj->Insert ( pCmdData, LIST_APPEND ); +// +// pJobType = aJobTypes.Next(); +// } +// +// pJobPlatform = aJobPlatforms.Next(); +// } +// +// pJobDir = aJobDirs.Next(); +// } +// pPrj->ExtractDependencies(); +// } +// catch (XmlBuildListException) { +// if (pPrj) +// { +// RemovePrj (pPrj); +// delete pPrj; +// } +// +// } +// } +//} /*****************************************************************************/ int Star::GetOSType ( ByteString& aWhatOS ) { @@ -2275,27 +2293,27 @@ Star& Star::operator<< ( SvStream& rStream ) // /*****************************************************************************/ -StarWriter::StarWriter( XmlBuildList* pXmlBuildListObj, String aFileName, BOOL bReadComments, USHORT nMode ) +StarWriter::StarWriter( String aFileName, BOOL bReadComments, USHORT nMode ) /*****************************************************************************/ - : Star (pXmlBuildListObj) + : Star () { sFileName = aFileName; Read ( aFileName, bReadComments, nMode ); } /*****************************************************************************/ -StarWriter::StarWriter( XmlBuildList* pXmlBuildListObj, SolarFileList *pSolarFiles, BOOL bReadComments ) +StarWriter::StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments ) /*****************************************************************************/ - : Star (pXmlBuildListObj) + : Star () { Read( pSolarFiles, bReadComments ); } /*****************************************************************************/ -StarWriter::StarWriter( XmlBuildList* pXmlBuildListObj, GenericInformationList *pStandLst, ByteString &rVersion, +StarWriter::StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, ByteString &rMinor, BOOL bReadComments, BOOL bLocal, const char *pSourceRoot ) /*****************************************************************************/ - : Star (pXmlBuildListObj) + : Star () { ByteString sPath( rVersion ); if ( pSourceRoot ) @@ -2377,6 +2395,12 @@ StarWriter::StarWriter( XmlBuildList* pXmlBuildListObj, GenericInformationList * aEntry += DirEntry( ssAddPath ); } } + sPath = rVersion; + sPath += "/settings/SHORTPATH"; + GenericInformation *pShortPath = pStandLst->GetInfo( sPath, TRUE ); + BOOL bShortPath = FALSE; + if (pShortPath && (pShortPath->GetValue() == "_TRUE")) + bShortPath = TRUE; sSourceRoot = aEntry.GetFull(); GenericInformationList *pProjects = pProjectsKey->GetSubList(); if ( pProjects ) { @@ -2394,7 +2418,11 @@ StarWriter::StarWriter( XmlBuildList* pXmlBuildListObj, GenericInformationList * GenericInformation * pDir = pProject->GetSubInfo (aDirStr); if (pDir) { ByteString aDir = pDir->GetValue(); - aPrjEntry = aEntry.GetPath() + DirEntry(aDir); + if (bShortPath) + aPrjEntry = aEntry; + else + aPrjEntry = aEntry.GetPath(); + aPrjEntry += DirEntry(aDir); } aPrjEntry += DirEntry( ssProject ); @@ -2445,15 +2473,15 @@ USHORT StarWriter::Read( String aFileName, BOOL bReadComments, USHORT nMode ) ByteString sFileName_l(ssFileName, RTL_TEXTENCODING_ASCII_US); StarFile *pFile = new StarFile( ssFileName ); if ( pFile->Exists()) { - if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) - { - ReadXmlBuildList(sFileName_l); - } else { +// if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) +// { +// ReadXmlBuildList(sFileName_l); +// } else { SimpleConfig aSolarConfig( ssFileName ); while (( aString = aSolarConfig.GetCleanedNextLine( bReadComments )) != "" ) InsertTokenLine ( aString ); } - } +// } aMutex.acquire(); aLoadedFilesList.Insert( pFile, LIST_APPEND ); @@ -2481,16 +2509,16 @@ USHORT StarWriter::Read( SolarFileList *pSolarFiles, BOOL bReadComments ) ByteString sFileName_l(ssFileName, RTL_TEXTENCODING_ASCII_US); StarFile *pFile = new StarFile( ssFileName); if ( pFile->Exists()) { - if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) - { - ReadXmlBuildList(sFileName_l); - } - else - { +// if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) +// { +// ReadXmlBuildList(sFileName_l); +// } +// else +// { SimpleConfig aSolarConfig( ssFileName ); while (( aString = aSolarConfig.GetCleanedNextLine( bReadComments )) != "" ) InsertTokenLine ( aString ); - } +// } } aMutex.acquire(); diff --git a/soldep/inc/XmlBuildListDef.hxx b/soldep/inc/XmlBuildListDef.hxx index 2ea62679eb11..7f68059e18f5 100755 --- a/soldep/inc/XmlBuildListDef.hxx +++ b/soldep/inc/XmlBuildListDef.hxx @@ -39,11 +39,11 @@ enum DepTypes }; #define DEP_MD_SIMPLE 1; -#define DEP_MD_ALWAYS 2; -#define DEP_MD_FORCE 4; +//#define DEP_MD_ALWAYS 2; +//#define DEP_MD_FORCE 4; -static const char * DEP_MD_ALWAYS_STR = "md-always"; -static const char * DEP_MD_FORCE_STR = "md-force"; +//static const char * DEP_MD_ALWAYS_STR = "md-always"; +//static const char * DEP_MD_FORCE_STR = "md-force"; #endif diff --git a/soldep/inc/soldep/prj.hxx b/soldep/inc/soldep/prj.hxx index df6833eb8bcd..858afac2d56a 100644 --- a/soldep/inc/soldep/prj.hxx +++ b/soldep/inc/soldep/prj.hxx @@ -58,7 +58,6 @@ class SByteStringList; class GenericInformationList; -class XmlBuildList; /* // Pfade auf Konfigurationsdateien des Build-Servers @@ -377,7 +376,6 @@ protected: String sFileName; SByteStringList* pDepMode; SByteStringList* pAllDepMode; - XmlBuildList* mpXmlBuildList; Link aFileIOErrorHdl; // called with &String as parameter!!! @@ -389,10 +387,10 @@ protected: ULONG SearchFileEntry( StarFileList *pStarFiles, StarFile* pFile ); public: - Star( XmlBuildList* pXmlBuildListObj ); - Star( XmlBuildList* pXmlBuildListObj, String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - Star( XmlBuildList* pXmlBuildListObj, SolarFileList *pSolarFiles ); - Star( XmlBuildList* pXmlBuildListObj, GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, + Star(); + Star( String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE ); + Star( SolarFileList *pSolarFiles ); + Star( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, const char *pSourceRoot = NULL ); ~Star(); @@ -403,7 +401,7 @@ public: ByteString GetName(){ return aStarName; }; // dummy function of VG void Read( String &rFileName ); void Read( SolarFileList *pSOlarFiles ); - void ReadXmlBuildList(const ByteString& sBuildLstPath); +// void ReadXmlBuildList(const ByteString& sBuildLstPath); BOOL HasProject( ByteString aProjectName ); @@ -418,6 +416,8 @@ public: void ReplaceFileEntry( StarFileList *pStarFiles, StarFile* pFile ); void UpdateFileList( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bRead = FALSE, BOOL bLocal = FALSE, const char *pSourceRoot = NULL ); + void FullReload( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bRead = FALSE, + BOOL bLocal = FALSE, const char *pSourceRoot = NULL ); void GenerateFileLoadList( SolarFileList *pSolarFiles ); BOOL CheckFileLoadList(SolarFileList *pSolarFiles); @@ -446,9 +446,9 @@ private: USHORT WritePrj( Prj *pPrj, SvFileStream& rStream ); public: - StarWriter( XmlBuildList* pXmlBuildListObj, String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - StarWriter( XmlBuildList* pXmlBuildListObj, SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - StarWriter( XmlBuildList* pXmlBuildListObj, GenericInformationList *pStandLst, ByteString &rVersion, ByteString &rMinor, + StarWriter( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); + StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); + StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, ByteString &rMinor, BOOL bReadComments = FALSE, BOOL bLocal = FALSE, const char *pSourceRoot = NULL ); void CleanUp(); diff --git a/soldep/inc/soldep/soldep.hxx b/soldep/inc/soldep/soldep.hxx index cca9ccbc6721..8c65e9ca08eb 100644 --- a/soldep/inc/soldep/soldep.hxx +++ b/soldep/inc/soldep/soldep.hxx @@ -55,7 +55,6 @@ class SolDep : public Depper ByteString msProject; ObjectWin* mpFocusWin; BOOL mbIsHide; - XmlBuildList* mpXmlBuildList; GenericInformationList *mpStandLst; diff --git a/soldep/source/makefile.mk b/soldep/source/makefile.mk index 63f6d422b6f5..7ababf509010 100644 --- a/soldep/source/makefile.mk +++ b/soldep/source/makefile.mk @@ -36,7 +36,7 @@ TARGET=soldep # --- Settings ----------------------------------------------------- -.INCLUDE : $(PRJ)$/util$/perl.mk +#.INCLUDE : $(PRJ)$/util$/perl.mk .INCLUDE : settings.mk # fixme, code is not yet 64 bit clean diff --git a/soldep/source/soldep.cxx b/soldep/source/soldep.cxx index 30e19985a9cf..6c6abf80c33b 100644 --- a/soldep/source/soldep.cxx +++ b/soldep/source/soldep.cxx @@ -43,7 +43,6 @@ #include <soldep/depper.hxx> #include <soldep/soldep.hxx> #include <soldep/soldlg.hxx> -#include <soldep/XmlBuildList.hxx> #include "dtsodcmp.hrc" IMPLEMENT_HASHTABLE_OWNER( SolIdMapper, ByteString, ULONG* ); @@ -66,19 +65,8 @@ SolDep::SolDep( Window* pBaseWindow ) : Depper( pBaseWindow ), mbBServer(FALSE), mpTravellerList( NULL ), - mbIsHide( FALSE ), - mpXmlBuildList (NULL) + mbIsHide( FALSE ) { - /* - ByteString sModulPath ("."); // wo soll das Perlmodul stehen??? - try - { - mpXmlBuildList = new XmlBuildList (sModulPath); - } - catch (XmlBuildListException& Exception) { - const char* Message = Exception.getMessage(); - } - */ mnSolWinCount = 0; mnSolLastId = 0; // mpPrjIdMapper = new SolIdMapper( 63997 ); @@ -103,8 +91,6 @@ SolDep::~SolDep() delete mpSolIdMapper; delete mpStarWriter; delete mpStandLst; - if (mpXmlBuildList) - delete mpXmlBuildList; } /*****************************************************************************/ @@ -571,12 +557,12 @@ USHORT SolDep::ReadSource(BOOL bUpdater) mpSolIdMapper = new SolIdMapper( 63997 ); if (mpStandLst && bUpdater) { - mpStarWriter = new StarWriter( mpXmlBuildList, mpStandLst, msVersionMajor, msVersionMinor, TRUE ); + mpStarWriter = new StarWriter( mpStandLst, msVersionMajor, msVersionMinor, TRUE ); } else { SolarFileList* pSolarFileList; pSolarFileList = GetPrjListFromDir(); - mpStarWriter = new StarWriter( mpXmlBuildList, pSolarFileList, TRUE ); + mpStarWriter = new StarWriter( pSolarFileList, TRUE ); } ByteString sTitle( SOLDEPL_NAME ); if ( mpStarWriter->GetMode() == STAR_MODE_SINGLE_PARSE ) { diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index fba2336f8852..c351e81dd670 100644 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -38,10 +38,14 @@ use POSIX; use Cwd qw (cwd); use File::Path; - use File::Temp qw(tmpnam); + use File::Temp qw(tmpnam tempdir); use File::Find; use Socket; use IO::Socket::INET; + use IO::Select; + use Fcntl; + use POSIX qw(:errno_h); + use Sys::Hostname; use lib ("$ENV{SOLARENV}/bin/modules"); use SourceConfig; @@ -61,6 +65,7 @@ if ($ENV{GUI} eq 'WNT' && !$cygwin) { eval { require Win32::Process; import Win32::Process; }; $enable_multiprocessing = 0 if ($@); + eval { require Win32::Pipe; import Win32::Pipe; }; }; ### for XML file format @@ -72,8 +77,7 @@ #### script id ##### ( $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/; - - $id_str = ' $Revision$ '; + $id_str = ' $Revision: 275224 $ '; $id_str =~ /Revision:\s+(\S+)\s+\$/ ? ($script_rev = $1) : ($script_rev = "-"); @@ -117,25 +121,25 @@ $custom_job = ''; $post_custom_job = ''; %LocalDepsHash = (); - %BuildQueue = (); %PathHash = (); %PlatformHash = (); %AliveDependencies = (); %global_deps_hash = (); # hash of dependencies of the all modules - %broken_modules_hashes = (); # hash of modules hashes, which cannot be built further + %global_deps_hash_backup = (); # backup hash of external dependencies of the all modules + %module_deps_hash_backup = (); # backup hash of internal dependencies for aech module + %modules_with_errors = (); # hash of modules hashes, which cannot be built further @broken_modules_names = (); # array of modules, which cannot be built further @dmake_args = (); %dead_parents = (); $CurrentPrj = ''; - $no_projects = 0; - $only_dependent = 0; - $build_from = ''; + $all_dependent = 1; # a flag indicating if the hash has independent keys + $build_from_with_branches = ''; $build_all_cont = ''; $build_since = ''; $dlv_switch = ''; $child = 0; %processes_hash = (); -# %module_announced = (); + %module_announced = (); $prepare = ''; # prepare for following incompatible build $ignore = ''; $html = ''; @@ -177,11 +181,15 @@ # %weight_stored = (); $grab_output = 1; $stop_build_on_error = 0; # for multiprocessing mode: do not build further module if there is an error + $interactive = 0; # for interactive mode... (for testing purpose enabled by default) + $parent_process = 1; $server_mode = 0; $setenv_string = ''; # string for configuration of the client environment $ports_string = ''; # string with possible ports for server @server_ports = (); - $socket_obj = undef; # socket object for server + $html_port; + $server_socket_obj = undef; # socket object for server + $html_socket_obj = undef; # socket object for server my %clients_jobs = (); my %clients_times = (); my $client_timeout = 0; # time for client to build (in sec)... @@ -189,12 +197,18 @@ # the server considered as an error/client crash my %lost_client_jobs = (); # hash containing lost jobs my %job_jobdir = (); # hash containing job-dir pairs + my $reschedule_queue = 0; + my %module_build_queue = (); + my %reversed_dependencies = (); my %module_paths = (); # hash with absolute module paths my %active_modules = (); my $generate_config = 0; my %add_to_config = (); my %remove_from_config = (); my $clear_config = 0; + my $finisched_children = 0; + my $debug = 0; + %module_deps_hash_pids = (); ### main ### get_options(); @@ -225,6 +239,7 @@ provide_consistency() if (defined $ENV{CWS_WORK_STAMP} && defined($ENV{COMMON_ENV_TOOLS})); $deliver_command = $ENV{DELIVER}; + $deliver_command .= ' -verbose' if ($html); $deliver_command .= ' '. $dlv_switch if ($dlv_switch); $ENV{mk_tmp}++; %prj_platform = (); @@ -255,6 +270,8 @@ }; print $new_line; + get_server_ports(); + start_interactive() if ($interactive); if ($checkparents) { GetParentDeps( $CurrentPrj, \%global_deps_hash ); @@ -422,6 +439,207 @@ sub add_modules_to_source_config { }; }; +sub start_interactive { + if ( $^O eq 'MSWin32' ) { + my $posix_sys_wait = 'POSIX ":sys_wait_h"'; + eval "use $posix_sys_wait"; + die "couldn't use $posix_sys_wait: $!\n" if ($@); + + pipe(FROM_PARENT, TO_CHILD) or die "pipe: $!"; + pipe(HTML_PIPE, TO_PARENT) or die "pipe: $!"; + + + if (my $pid = fork()) { + $html_listener_pid = 1; + close FROM_PARENT; + close TO_PARENT; + ioctl(HTML_PIPE, 0x8004667e, 1); + return; + } else { + close HTML_PIPE; + close TO_CHILD; + select TO_PARENT; + $|++; + $parent_process = 0; + start_html_listener(); + } + } else { + $pid = open(HTML_PIPE, "-|"); + print "Pipe is open\n"; + + if ($pid) { # parent + # make file handle non-bloking + my $flags = ''; + fcntl(HTML_PIPE, F_GETFL, $flags); + $flags |= O_NONBLOCK; + fcntl(HTML_PIPE, F_SETFL, $flags); + } else { # child + $parent_process = 0; + start_html_listener(); + }; + }; +}; + +sub start_html_listener { + $html_port = $server_ports[$#server_ports]; + do { + $html_port++ + } while (start_server_on_port($html_port, \$html_socket_obj)); + print "html_port:$html_port html_socket_obj: $html_socket_obj\n"; + my $new_socket_obj; + do { + $new_socket_obj = accept_html_connection(); + if (defined $new_socket_obj) { + my $html_message; + $html_message = <$new_socket_obj>; + chomp $html_message; + print $html_message . "\n"; + my $socket_message = ''; + for my $action ('rebuild', 'delete') { + if ($html_message =~ /$action=(\S+)/) { + print $new_socket_obj "Module $1 is scheduled for $action"; + }; + }; + close($new_socket_obj); + } else { + sleep(10); + }; + } while(1); +}; + +sub start_html_message_trigger { + my $child_id=fork(); ### VG: for windows there is a "simulation of the "fork"", no new procs... One can use Win32::Process::Create + + if ($child_id) { + # parent + $html_message_trigger{$child_id}++; +# print "started listener trigger\n"; + } else { + my $buffer_size = 1024; + my $buffer; + my $rv; + my $full_buffer = ''; + my %modules_to_rebuild = (); + while ($rv = sysread(HTML_PIPE, $buffer, $buffer_size)) { + $full_buffer .= $buffer; + }; + if (length $full_buffer) { + print "**********Got message $fullbuffer\n"; + socket(SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or die "socket: $!"; + if (connect(SOCKET, $paddr)) { + $full_buffer .= "\n"; + syswrite SOCKET, $full_buffer, length $full_buffer; +# close SOCKET or die "Child close socket: $!"; + } else { + die "Child connect: $!"; + }; + } + _exit(0); + }; +}; + +sub get_html_orders { +# print "Parent gonna read\n"; + return if (!$interactive); + my $buffer_size = 1024; + my $buffer; + my $rv; + my $full_buffer = ''; + my %modules_to_rebuild = (); + my %modules_to_delete = (); + while ($rv = sysread(HTML_PIPE, $buffer, $buffer_size)) { + $full_buffer .= $buffer; + }; +# }; + my @html_messages = split(/\n/, $full_buffer); + foreach (@html_messages) { + if (/^html_port:(\d+)/) { + $html_port = $1; + print "Html port is: $html_port\n"; + next; + };# GET /rebuild=officenames HTTP/1.0 + print "Message: $_\n"; + chomp; + if (/GET\s+\/delete=(\S+)[:(\S+)]*\s*HTTP/) { + $modules_to_delete{$1} = $2; + print "$1 scheduled for removal from build for \n"; + } + if (/GET\s+\/rebuild=(\S+)[:(\S+)]*\s*HTTP/) { + if (defined $global_deps_hash{$1}) { + print "!!! /tarModule $1 has not been built. Html order ignored\n"; + } else { + $modules_to_rebuild{$1} = $2; + print "Scheduled $1 for rebuild\n"; + } + } + }; + if (scalar keys %modules_to_delete) { + $reschedule_queue++; + schedule_delete(\%modules_to_delete); + generate_html_file(); + }; + if (scalar keys %modules_to_rebuild) { + $reschedule_queue++; + schedule_rebuild(\%modules_to_rebuild); + generate_html_file(); + }; +# print "Parent got nothing to read\n"; +}; + +sub schedule_delete { + my $modules_to_delete = shift; + foreach (keys %$modules_to_delete) { + print "Schedule module $_ for delete\n"; + delete ($global_deps_hash{$_}); + delete ($global_deps_hash_backup{$_}); + if (scalar keys %{$module_deps_hash_pids{$projects_deps_hash{$_}}}) { + kill 9, keys %{$module_deps_hash_pids{$projects_deps_hash{$_}}}; + handle_dead_children(0); + }; + RemoveFromDependencies($_, \%global_deps_hash); + RemoveFromDependencies($_, \%global_deps_hash_backup); + delete $reversed_dependencies{$_}; + delete $build_is_finished{$_} if defined $build_is_finished{$_}; + delete $modules_with_errors{$_} if defined $modules_with_errors{$_}; + delete $module_announced{$_} if defined $module_announced{$_}; + delete $html_info{$_} if defined $html_info{$_}; + delete $projects_deps_hash{$_} if defined $projects_deps_hash{$_}; + }; +}; + +sub schedule_rebuild { + my $modules_to_rebuild = shift; + foreach (keys %$modules_to_rebuild) { + if (defined $$modules_to_rebuild{$_}) { + print "Schedule directory for rebuild"; + } else { + print "Schedule complete $_ module for rebuild\n"; + if (scalar keys %{$module_deps_hash_pids{$projects_deps_hash{$_}}}) { + kill 9, keys %{$module_deps_hash_pids{$projects_deps_hash{$_}}}; + handle_dead_children(0); + }; + delete $build_is_finished{$_} if defined $build_is_finished{$_}; + delete $modules_with_errors{$_} if defined $modules_with_errors{$_}; + delete $module_announced{$_}; + initialize_html_info($_); + + foreach my $waiter (keys %{$reversed_dependencies{$_}}) { + # for rebuild_all_dependent - refacture "if" condition + ${$global_deps_hash{$waiter}}{$_}++ if (!defined $build_is_finished{$waiter}); + }; + delete $projects_deps_hash{$_} if defined $projects_deps_hash{$_}; + my %single_module_dep_hash = (); + foreach my $module (keys %{$global_deps_hash_backup{$_}}) { + if (defined ${$global_deps_hash_backup{$_}}{$module} && (!defined $build_is_finished{$module})) { + $single_module_dep_hash{$module}++; + }; + }; + $global_deps_hash{$_} = \%single_module_dep_hash; + }; + }; +}; + + # # procedure retrieves build list path # (all possibilities are taken into account) @@ -483,6 +701,42 @@ sub store_weights { }; # +# This procedure builds comlete dependency for each module, ie if the deps look like: +# mod1 -> mod2 -> mod3 -> mod4,mod5, +# than mod1 get mod3,mod4,mod5 as eplicit list of deps, not only mod2 as earlier +# +sub expand_dependencies { + my $deps_hash = shift; + + foreach my $module1 (keys %$deps_hash) { + foreach my $module2 (keys %$deps_hash) { + next if ($module1 eq $module2); + if (defined ${$$deps_hash{$module2}}{$module1}) { + ${$$deps_hash{$module2}}{$_}++ foreach (keys %{$$deps_hash{$module1}}) + }; + }; + }; +}; + +# +# This procedure fills out the %reversed_dependencies hash, +# the hash contaninig the info about modules "waiting" for the module +# +sub reverse_dependensies { + my $deps_hash = shift; + foreach my $module (keys %$deps_hash) { + foreach (keys %{$$deps_hash{$module}}) { + if (defined $reversed_dependencies{$_}) { + ${$reversed_dependencies{$_}}{$module}++ + } else { + my %single_module_dep_hash = ($module => 1); + $reversed_dependencies{$_} = \%single_module_dep_hash; + }; + }; + }; +}; + +# # Build everything that should be built # sub BuildAll { @@ -505,6 +759,9 @@ sub BuildAll { push (@warnings, "\nThere are active module in $source_config_file. Inactive modules are skipped.\n\n"); prepare_build_all_cont(\%global_deps_hash); }; + backup_deps_hash(\%global_deps_hash, \%global_deps_hash_backup); + expand_dependencies (\%global_deps_hash_backup); + reverse_dependensies(\%global_deps_hash_backup); $modules_number = scalar keys %global_deps_hash; initialize_html_info($_) foreach (keys %global_deps_hash); if ($QuantityToBuild) { @@ -514,7 +771,7 @@ sub BuildAll { if ($server_mode) { run_server(); }; - while ($Prj = PickPrjToBuild(\%global_deps_hash)) { + while ($Prj = pick_prj_to_build(\%global_deps_hash)) { if (!defined $dead_parents{$Prj}) { if (scalar keys %broken_build) { print $echo . "Skipping project $Prj because of error(s)\n"; @@ -524,7 +781,7 @@ sub BuildAll { }; $PrjDir = $module_paths{$Prj}; - get_deps_hash($Prj, \%LocalDepsHash); + get_module_dep_hash($Prj, \%LocalDepsHash); my $info_hash = $html_info{$Prj}; $$info_hash{DIRS} = check_deps_hash(\%LocalDepsHash, $Prj); $module_by_hash{\%LocalDepsHash} = $Prj; @@ -534,11 +791,10 @@ sub BuildAll { RemoveFromDependencies($Prj, \%global_deps_hash); $build_is_finished{$Prj}++; - $no_projects = 0; }; } else { store_build_list_content($CurrentPrj); - get_deps_hash($CurrentPrj, \%LocalDepsHash); + get_module_dep_hash($CurrentPrj, \%LocalDepsHash); initialize_html_info($CurrentPrj); my $info_hash = $html_info{$CurrentPrj}; $$info_hash{DIRS} = check_deps_hash(\%LocalDepsHash, $CurrentPrj); @@ -551,6 +807,15 @@ sub BuildAll { }; }; +sub backup_deps_hash { + my $source_hash = shift; + my $backup_hash = shift; + foreach $key (keys %$source_hash) { + my %values_hash = %{$$source_hash{$key}}; + $$backup_hash{$key} = \%values_hash; + }; +}; + sub initialize_html_info { my $module = shift; return if (defined $dead_parents{$module}); @@ -568,7 +833,8 @@ sub dmake_dir { my $BuildDir = shift; $jobs_hash{$BuildDir}->{START_TIME} = time(); $jobs_hash{$BuildDir}->{STATUS} = 'building'; - if ($BuildDir =~ /(\s)/o) { + if ($BuildDir =~ /(\s)/o && (!-d $BuildDir)) { + print "\n$BuildDir\n\n" if ($BuildDir =~ /\sdeliver$/o); $error_code = do_custom_job($BuildDir, \%LocalDepsHash); } else { html_store_job_info(\%LocalDepsHash, $BuildDir); @@ -713,6 +979,20 @@ sub get_deps_from_object { }; }; +# +# this function wraps the get_module_dep_hash and backups the resultung hash +# +sub get_module_dep_hash { + my ($module, $module_dep_hash) = @_; + if (defined $module_deps_hash_backup{$module}) { + backup_deps_hash($module_deps_hash_backup{$module}, $module_dep_hash); + } else { + get_deps_hash($module, $module_dep_hash); + my %values_hash = (); + backup_deps_hash($module_dep_hash, \%values_hash); + $module_deps_hash_backup{$module} = \%values_hash; + } +}; # # Getting hashes of all internal dependencies and additional @@ -739,7 +1019,7 @@ sub get_deps_hash { }; my $build_list_ref = $build_lists_hash{$module_to_build}; - delete $build_lists_hash{$module_to_build}; +# delete $build_lists_hash{$module_to_build}; if (ref($build_list_ref) eq 'XMLBuildListParser') { get_deps_from_object($module_to_build, $build_list_ref, $dependencies_hash); } else { @@ -777,12 +1057,11 @@ sub get_deps_hash { print_error("$module_to_build/prj/build.lst has wrongly written dependencies string:\n$_\n") if (!$Dependencies); $deps_hash{$_}++ foreach (GetDependenciesArray($Dependencies)); $$dependencies_hash{$DirAlias} = \%deps_hash; - $BuildQueue{$DirAlias}++; my $local_dir = ''; if ($Dir =~ /(\\|\/)/o) { - $local_dir = $'; + $local_dir = "/$'"; }; - $PathHash{$DirAlias} = CorrectPath($module_paths{$module_to_build} . "/$local_dir"); + $PathHash{$DirAlias} = CorrectPath($module_paths{$module_to_build} . $local_dir); } elsif ($_ !~ /^\s*$/ && $_ !~ /^\w*\s/o) { chomp; push(@errors, $_); @@ -967,12 +1246,14 @@ sub get_stand_dir { # # Picks project which can be built now from hash and then deletes it from hash # -sub PickPrjToBuild { +sub pick_prj_to_build { my $DepsHash = shift; - handle_dead_children(0) if ($QuantityToBuild); - my $Prj = FindIndepPrj($DepsHash); - delete $$DepsHash{$Prj}; - generate_html_file(); + get_html_orders(); + my $Prj = find_indep_prj($DepsHash); + if ($Prj) { + delete $$DepsHash{$Prj}; + generate_html_file(); + }; return $Prj; }; @@ -1015,12 +1296,9 @@ sub check_deps_hash { my @possible_order; my $module_path = $module_paths{$module} if (defined $module); return if (!scalar keys %$deps_hash_ref); - my %deps_hash = %$deps_hash_ref; + my %deps_hash = (); my $consistent; - foreach $key (keys %$deps_hash_ref) { - my %values_hash = %{$$deps_hash_ref{$key}}; - $deps_hash{$key} = \%values_hash; - }; + backup_deps_hash($deps_hash_ref, \%deps_hash); my $string; my $log_name; my $build_number = 0; @@ -1094,39 +1372,50 @@ sub check_deps_hash { # # Find project with no dependencies left. # -sub FindIndepPrj { - my ($Prj, @Prjs, $Dependencies, $i); +sub find_indep_prj { + my ($Dependencies, $i); my @candidates = (); + $all_dependent = 1; + handle_dead_children(0) if ($QuantityToBuild); my $children = children_number(); return '' if (!$server_mode && $children && ($children >= $QuantityToBuild)); $Dependencies = shift; - @Prjs = keys %$Dependencies; - if ($#Prjs != -1) { - foreach $Prj (@Prjs) { - next if (&IsHashNative($Prj)); - my $PrjDeps = $$Dependencies{$Prj}; - push(@candidates, $Prj) if (!scalar keys %$PrjDeps); + if (scalar keys %$Dependencies) { + foreach my $job (keys %$Dependencies) { + push(@candidates, $job) if (!scalar keys %{$$Dependencies{$job}}); }; if (scalar @candidates) { + $all_dependent = 0; my $best_candidate = undef; - my $weight = 0; - foreach my $candidate (sort @candidates) { - if (defined $weights_hash{$candidate} && $weights_hash{$candidate} > $weight) { - $best_candidate = $candidate; - $weight = $weights_hash{$candidate}; + my $best_weight = 0; + if (scalar @candidates > 1) { + foreach my $candidate (@candidates) { + my $candidate_weight = get_waiters_number($candidate); + if ($candidate_weight > $best_weight) { + $best_candidate = $candidate; + $best_weight = $candidate_weight; + }; }; - }; - if (defined $best_candidate) { - return $best_candidate; + if (defined $best_candidate) { + return $best_candidate; + } } my @sorted_candidates = sort(@candidates); return $sorted_candidates[0]; }; - return ''; - } else { - $no_projects = 1; - return ''; }; + return ''; +}; + +sub get_waiters_number { + my $module = shift; + if (defined $weights_hash{$module}) { + return $weights_hash{$module}; + }; + if (defined $reversed_dependencies{$module}) { + return scalar keys %{$reversed_dependencies{$module}}; + }; + return 0; }; # @@ -1206,7 +1495,7 @@ sub print_error { sub usage { print STDERR "\nbuild\n"; - print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches|-b]|[--prepare|-p][:platform] [--dontchekoutmissingmodules]] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add module1,module2[,...,moduleN]]]\n"; + print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add module1,module2[,...,moduleN]]] [--interactive]\n"; print STDERR "Example1: build --from sfx2\n"; print STDERR " - build all projects dependent from sfx2, starting with sfx2, finishing with the current module\n"; print STDERR "Example2: build --all:sfx2\n"; @@ -1246,7 +1535,7 @@ sub usage { print STDERR " --removeall|--clear - remove all active modules(s) from configuration file\n"; print STDERR " --stoponerror - stop build when error occurs (for mp builds)\n"; - print STDERR " --dontchekoutmissingmodules - do not chekout missing modules when running prepare (links still will be broken)\n"; + print STDERR " --interactive - start interactive build process (process can be managed via html page)\n"; print STDERR " Custom jobs:\n"; print STDERR " --job=job_string - execute custom job in (each) module. job_string is a shell script/command to be executed instead of regular dmake jobs\n"; print STDERR " --pre_job=pre_job_string - execute preliminary job in (each) module. pre_job_string is a shell script/command to be executed before regular job in the module\n"; @@ -1278,9 +1567,9 @@ sub get_options { $arg =~ /^-F$/ and $cmd_file = shift @ARGV and next; $arg =~ /^--with_branches$/ and $BuildAllParents = 1 - and $build_from = shift @ARGV and next; + and $build_from_with_branches = shift @ARGV and next; $arg =~ /^-b$/ and $BuildAllParents = 1 - and $build_from = shift @ARGV and next; + and $build_from_with_branches = shift @ARGV and next; $arg =~ /^--all:(\S+)$/ and $BuildAllParents = 1 and $build_all_cont = $1 and next; @@ -1327,6 +1616,7 @@ sub get_options { $arg =~ /^-m$/ and get_modes() and next; $arg =~ /^--mode$/ and get_modes() and next; $arg =~ /^--stoponerror$/ and $stop_build_on_error = 1 and next; + $arg =~ /^--interactive$/ and $interactive = 1 and next; if ($arg =~ /^--$/) { push (@dmake_args, get_dmake_args()) if (!$custom_job); next; @@ -1338,9 +1628,9 @@ sub get_options { print_error("\"--dontgraboutput\" switch is used only with \"--html\"") if ($dont_grab_output); }; $grab_output = 0 if ($dont_grab_output); - print_error('Switches --with_branches and --all collision') if ($build_from && $build_all_cont); + print_error('Switches --with_branches and --all collision') if ($build_from_with_branches && $build_all_cont); # print_error('Please prepare the workspace on one of UNIX platforms') if ($prepare && ($ENV{GUI} ne 'UNX')); - print_error('Switches --with_branches and --since collision') if ($build_from && $build_since); + print_error('Switches --with_branches and --since collision') if ($build_from_with_branches && $build_since); if ($show) { $QuantityToBuild = 0; $cmd_file = ''; @@ -1363,7 +1653,7 @@ sub get_options { print_error("Switches -P and --server collision"); }; } elsif ($stop_build_on_error) { - print_error("Switche --stoponerror is only for multiprocessing builds"); + print_error("Switch --stoponerror is only for multiprocessing builds"); }; if ($server_mode) { $html++; @@ -1388,6 +1678,11 @@ sub get_options { $only_common = 'common'; $only_common .= '.pro' if ($only_platform =~ /\.pro$/); }; + if ($interactive) { + $html++; # enable html page generation... + $local_host_name = hostname(); + $local_host_ip = inet_ntoa(scalar(gethostbyname($local_host_name)) || 'localhost'); + } # Default build modes(for OpenOffice.org) $ENV{BUILD_TYPE} = 'OOo EXT' if (!defined $ENV{BUILD_TYPE}); @ARGV = @dmake_args; @@ -1474,7 +1769,7 @@ sub cancel_build { }; # -# Function for storing error in multiprocessing AllParents build +# Function for storing errors in multiprocessing AllParents build # sub store_error { my ($pid, $error_code) = @_; @@ -1486,7 +1781,7 @@ sub store_error { return 1; }; }; - $broken_modules_hashes{$folders_hashes{$child_nick}}++; + $modules_with_errors{$folders_hashes{$child_nick}}++; $broken_build{$child_nick} = $error_code; if ($stop_build_on_error) { clear_from_child($pid); @@ -1539,6 +1834,7 @@ sub handle_dead_children { } else { clear_from_child($pid); }; + $finisched_children++; }; }; } while(children_number() >= $QuantityToBuild); @@ -1564,11 +1860,13 @@ sub clear_from_child { RemoveFromDependencies($child_nick, $folders_hashes{$child_nick}); }; + foreach (keys %module_deps_hash_pids) { + delete ${$module_deps_hash_pids{$_}}{$pid} if defined (${$module_deps_hash_pids{$_}}{$pid}); + }; my $module = $module_by_hash{$folders_hashes{$child_nick}}; html_store_job_info($folders_hashes{$child_nick}, $child_nick, $error_code); $running_children{$folders_hashes{$child_nick}}--; delete $processes_hash{$pid}; - $only_dependent = 0; print 'Running processes: ' . children_number() . "\n"; }; @@ -1580,32 +1878,28 @@ sub BuildDependent { my $pid = 0; my $child_nick = ''; $running_children{$dependencies_hash} = 0 if (!defined $running_children{$dependencies_hash}); - while ($child_nick = PickPrjToBuild($dependencies_hash)) { - if (($QuantityToBuild)) { # multiprocessing not for $BuildAllParents (-all etc)!! + while ($child_nick = pick_prj_to_build($dependencies_hash)) { + if ($QuantityToBuild) { do { - handle_dead_children(0); - if (defined $broken_modules_hashes{$dependencies_hash} && !$ignore) { - return if ($BuildAllParents); + if (defined $modules_with_errors{$dependencies_hash} && !$ignore) { + return 0 if ($BuildAllParents); last; }; # start current child & all # that could be started now start_child($child_nick, $dependencies_hash) if ($child_nick); - $child_nick = PickPrjToBuild($dependencies_hash); - if (!$child_nick) { - return if ($BuildAllParents); - handle_dead_children(1) if (!$no_projects); - }; - } while (!$no_projects); - return if ($BuildAllParents); + return 1 if ($BuildAllParents); + $child_nick = pick_prj_to_build($dependencies_hash); + } while (scalar keys %$dependencies_hash || $child_nick); while (children_number()) { +# print "#### 1902: Starting waiting for dead child\n"; handle_dead_children(1); }; # if (defined $last_module) { # $build_is_finished{$last_module}++ if (!defined $modules_with_errors{$last_module}); # }; - if (defined $broken_modules_hashes{$dependencies_hash}) { + if (defined $modules_with_errors{$dependencies_hash}) { cancel_build(); } mp_success_exit(); @@ -1626,44 +1920,41 @@ sub start_child { $jobs_hash{$job_dir}->{STATUS} = 'building'; if ($job_dir =~ /(\s)/o) { my $error_code = undef; - $error_code = do_custom_job($job_dir, $dependencies_hash); - return; + if ($job_dir !~ /\sdeliver$/o) { + $error_code = do_custom_job($job_dir, $dependencies_hash); + return; + } }; + $build_in_progress{$module_by_hash{$dependencies_hash}}++; html_store_job_info($dependencies_hash, $job_dir); my $pid = undef; my $children_running; my $oldfh = select STDOUT; $| = 1; - if ($ENV{GUI} eq 'WNT' && !$cygwin) { - print "$job_dir\n"; - my $process_obj = undef; - my $rc = Win32::Process::Create($process_obj, $dmake_bin, - $dmake_args, - 0, 0, #NORMAL_PRIORITY_CLASS, - $job_dir); -# my $rc = Win32::Process::Create($process_obj, $_4nt_exe, -# "/c $dmake_batch", -# 0, NORMAL_PRIORITY_CLASS, -# $job_dir); - print_error("Cannot start child process") if (!$rc); - $pid = $process_obj->GetProcessID(); - $windows_procs{$pid} = $process_obj; - } else { - if ($pid = fork) { # parent - } elsif (defined $pid) { # child - select $oldfh; - $child = 1; - dmake_dir($job_dir); - do_exit(1); - }; - }; - select $oldfh; - $processes_hash{$pid} = $job_dir; - $children_running = children_number(); - print 'Running processes: ', $children_running, "\n"; - $maximal_processes = $children_running if ($children_running > $maximal_processes); - $folders_hashes{$job_dir} = $dependencies_hash; - $running_children{$dependencies_hash}++; + if ($pid = fork) { # parent + select $oldfh; + $processes_hash{$pid} = $job_dir; + $children_running = children_number(); + print 'Running processes: ', $children_running, "\n"; + $maximal_processes = $children_running if ($children_running > $maximal_processes); + $folders_hashes{$job_dir} = $dependencies_hash; + store_pid($dependencies_hash, $pid); + $running_children{$dependencies_hash}++; + } elsif (defined $pid) { # child + select $oldfh; + $child = 1; + dmake_dir($job_dir); + do_exit(1); + }; +}; + +sub store_pid { + my ($deps_hash, $pid) = @_; + if (!defined $module_deps_hash_pids{$deps_hash}) { + my %module_hash_pids = (); + $module_deps_hash_pids{$deps_hash} = \%module_hash_pids; + }; + ${$module_deps_hash_pids{$deps_hash}}{$pid}++; }; # @@ -1671,26 +1962,33 @@ sub start_child { # sub build_multiprocessing { my $Prj; - my @build_queue = (); # array, containing queue of projects - # to build do { - while ($Prj = PickPrjToBuild(\%global_deps_hash)) { - push @build_queue, $Prj; - $projects_deps_hash{$Prj} = {}; - get_deps_hash($Prj, $projects_deps_hash{$Prj}); - my $info_hash = $html_info{$Prj}; - $$info_hash{DIRS} = check_deps_hash($projects_deps_hash{$Prj}, $Prj); - $module_by_hash{$projects_deps_hash{$Prj}} = $Prj; - }; - if (!$Prj || !defined $projects_deps_hash{$Prj}) { - cancel_build() if (!scalar @build_queue && !children_number()); - handle_dead_children(1); - } - build_actual_queue(\@build_queue); - } while (scalar (keys %global_deps_hash)); + my $got_module = 0; + $finisched_children = 0; + while ($Prj = pick_prj_to_build(\%global_deps_hash)) { + if (!defined $projects_deps_hash{$Prj}) { + $projects_deps_hash{$Prj} = {}; + get_module_dep_hash($Prj, $projects_deps_hash{$Prj}); + my $info_hash = $html_info{$Prj}; + $$info_hash{DIRS} = check_deps_hash($projects_deps_hash{$Prj}, $Prj); + $module_by_hash{$projects_deps_hash{$Prj}} = $Prj; + } + $module_build_queue{$Prj}++; + $got_module++; + }; + if (!$got_module) { + cancel_build() if ((!scalar keys %module_build_queue) && !children_number()); + if (!$finisched_children) { +# print "#### 1979: Starting waiting for dead child\n"; + handle_dead_children(1); + }; + }; + build_actual_queue(\%module_build_queue); + } while (scalar keys %global_deps_hash); # Let the last module be built till the end - while (scalar @build_queue) { - build_actual_queue(\@build_queue); + while (scalar keys %module_build_queue) { + build_actual_queue(\%module_build_queue); +# print "#### 1988: Starting waiting for dead child\n"; handle_dead_children(1); }; # Let all children finish their work @@ -1716,33 +2014,50 @@ sub mp_success_exit { # sub build_actual_queue { my $build_queue = shift; - my $i = 0; + my $finished_projects = 0; do { - while ($i <= (scalar(@$build_queue) - 1)) { - $Prj = $$build_queue[$i]; - if (defined $broken_modules_hashes{$projects_deps_hash{$Prj}} && !$ignore) { + my @sorted_queue = sort {(scalar keys %{$projects_deps_hash{$a}}) <=> (scalar keys %{$projects_deps_hash{$b}})} keys %$build_queue; + my $started_children = 0; +# foreach $Prj (@sorted_queue) { + foreach $Prj (keys %$build_queue) { + get_html_orders(); + if ($reschedule_queue) { + $reschedule_queue = 0; + foreach (keys %$build_queue) { + # Remove the module from the build queue if there is a dependency emerged + if ((defined $global_deps_hash{$_}) && (scalar keys %{$global_deps_hash{$_}})) { + delete $$build_queue{$_}; + }; + delete $$build_queue{$_} if (!defined $global_deps_hash_backup{$_}) + }; + return; + }; + if (defined $modules_with_errors{$projects_deps_hash{$Prj}} && !$ignore) { push (@broken_modules_names, $Prj); - splice (@$build_queue, $i, 1); + delete $$build_queue{$Prj}; next; }; - $only_dependent = 0; - $no_projects = 0; - BuildDependent($projects_deps_hash{$Prj}); - handle_dead_children(0); - if ($no_projects && + $started_children =+ BuildDependent($projects_deps_hash{$Prj}); + if ((!scalar keys %{$projects_deps_hash{$Prj}}) && !$running_children{$projects_deps_hash{$Prj}}) { - if (!defined $broken_modules_hashes{$projects_deps_hash{$Prj}} || $ignore) + if (!defined $modules_with_errors{$projects_deps_hash{$Prj}} || $ignore) { RemoveFromDependencies($Prj, \%global_deps_hash); $build_is_finished{$Prj}++; - splice (@$build_queue, $i, 1); - next; + delete $$build_queue{$Prj}; + $finished_projects++; }; }; - $i++; }; - $i = 0; - } while (!are_all_dependent($build_queue)); + # trigger wait + if (!$started_children) { + if ($finished_projects) { + return; + } else { + handle_dead_children(1); + }; + }; + } while (scalar keys %$build_queue); }; sub run_job { @@ -1793,7 +2108,7 @@ sub do_custom_job { }; }; if ($error_code) { - $broken_modules_hashes{$dependencies_hash}++; + $modules_with_errors{$dependencies_hash}++; $broken_build{$module} = $error_code; } else { RemoveFromDependencies($module_job, $dependencies_hash); @@ -1814,6 +2129,7 @@ sub announce_module { sub print_announce { my $Prj = shift; + return if (defined $module_announced{$Prj}); my $prj_type = ''; $prj_type = $modules_types{$Prj} if (defined $modules_types{$Prj}); my $text; @@ -1825,7 +2141,6 @@ sub print_announce { }; $build_is_finished{$Prj}++; } elsif ($prj_type eq 'img') { -# return if (defined $module_announced{$`}); $text = "Skipping incomplete $Prj\n"; $build_is_finished{$Prj}++; } elsif ($custom_job) { @@ -1833,17 +2148,24 @@ sub print_announce { } else { $text = "Building module $Prj\n"; }; - print $echo . "=============\n"; - print $echo . $text; + my $announce_string = $new_line; + $announce_string .= $echo . "=============\n"; + $announce_string .= $echo . $text; + $announce_string .= $echo . "=============\n"; + print $announce_string; + $module_announced{$Prj}++; }; sub are_all_dependent { my $build_queue = shift; my $folder = ''; - foreach my $prj (@$build_queue) { - $folder = FindIndepPrj($projects_deps_hash{$prj}); - return '' if ($folder); + my $first_candidate = undef; + foreach my $prj (keys %$build_queue) { + $folder = find_indep_prj($projects_deps_hash{$prj}); + $first_candidate = $folder if (!defined $first_candidate); }; + $folder = $first_candidate; + return '' if ($first_candidate); return '1'; }; @@ -1878,10 +2200,10 @@ sub modules_classify { # sub provide_consistency { check_dir(); - foreach my $module_ref (\$build_from, \$build_all_cont, \$build_since) { - if ($$module_ref) { - return if (defined $module_paths{$$module_ref}); - print_error("Cannot find module '$$module_ref'", 9); + foreach $var_ref (\$build_from_with_branches, \$build_all_cont, \$build_since) { + if ($$var_ref) { + return if (defined $module_paths{$$var_ref}); + print_error("Cannot find module '$$var_ref'", 9); return; }; }; @@ -1988,14 +2310,11 @@ sub get_tmp_dir { } else { $tmp_dir = '/tmp/'; } - - return File::Temp::tempdir(DIR =>$tmp_dir); - -# $tmp_dir .= $$ while (-e $tmp_dir); -# $tmp_dir = CorrectPath($tmp_dir); -# eval {mkpath($tmp_dir)}; -# print_error("Cannot create temporary directory in $tmp_dir") if ($@); -# return $tmp_dir; + $tmp_dir = tempdir ( DIR => $tmp_dir ); + if (!-d $tmp_dir) { + print_error("Cannot create temporary directory for checkout in $tmp_dir") if ($@); + }; + return $tmp_dir; }; @@ -2052,7 +2371,7 @@ sub prepare_incompatible_build { $incompatibles{$incomp_prj} = $$deps_hash{$incomp_prj}; delete $$deps_hash{$incomp_prj}; } - while ($prj = PickPrjToBuild($deps_hash)) { + while ($prj = pick_prj_to_build($deps_hash)) { RemoveFromDependencies($prj, $deps_hash); RemoveFromDependencies($prj, \%incompatibles); }; @@ -2112,7 +2431,7 @@ sub prepare_build_from { my ($prj, $deps_hash); $deps_hash = shift; my %from_deps_hash = (); # hash of dependencies of the -from project - GetParentDeps($build_from, \%from_deps_hash); + GetParentDeps($build_from_with_branches, \%from_deps_hash); foreach $prj (keys %from_deps_hash) { delete $$deps_hash{$prj}; RemoveFromDependencies($prj, $deps_hash); @@ -2128,7 +2447,7 @@ sub prepare_build_all_cont { $deps_hash = shift; $border_prj = $build_all_cont if ($build_all_cont); $border_prj = $build_since if ($build_since); - while ($prj = PickPrjToBuild($deps_hash)) { + while ($prj = pick_prj_to_build($deps_hash)) { $orig_prj = ''; $orig_prj = $` if ($prj =~ /\.lnk$/o); $orig_prj = $` if ($prj =~ /\.link$/o); @@ -2195,7 +2514,7 @@ sub get_incomp_projects { } else { if ($option =~ /(:)/) { $option = $`; - print_error("-from switch collision") if ($build_all_cont); + print_error("\'--from\' switch collision") if ($build_all_cont); $build_all_cont = $'; }; $incompatibles{$option}++; @@ -2255,7 +2574,7 @@ sub clear_delivered { print "$message\n"; foreach my $platform (keys %platforms) { - print "\nRemoving delivered for $platform\n"; + print "\nRemoving files delivered for $platform\n"; my %solar_vars = (); read_ssolar_vars($platform, \%solar_vars); if (scalar keys %solar_vars) { @@ -2269,7 +2588,7 @@ sub clear_delivered { my $undeliver = "$deliver_command $deliver_delete_switches $nul"; # my $current_dir = getcwd(); foreach my $module (sort @modules_built) { - if (chdir($module_paths{$module})) { + if (!chdir($module_paths{$module})) { push(@warnings, "Could not remove delivered files from the module $module. Your build can become inconsistent.\n"); } else { print "Removing delivered from module $module\n"; @@ -2442,7 +2761,8 @@ sub do_exit { # perl 5.10 returns 'resource busy' for rmtree rmdir(CorrectPath($tmp_dir)) if ($tmp_dir); } - rmtree(CorrectPath($tmp_dir), 1, 0) if ($tmp_dir); + rmtree(CorrectPath($tmp_dir), 0, 0) if ($tmp_dir); + print STDERR "Cannot delete $tmp_dir. Please remove it manually\n" if (-d $tmp_dir); exit($exit_code); }; @@ -2465,7 +2785,7 @@ sub sort_modules_appearance { delete $build_in_progress_shown{$_} if (defined $build_in_progress_shown{$_}); }; $build_in_progress_shown{$_}++ foreach (keys %build_in_progress); - push(@modules_order, $_) foreach (sort keys %build_in_progress_shown); + push(@modules_order, $_) foreach (sort { $build_in_progress_shown{$b} <=> $build_in_progress_shown{$a} } keys %build_in_progress_shown); push(@modules_order, $_) foreach (sort keys %build_is_finished); foreach(sort keys %html_info) { next if (defined $build_is_finished{$_} || defined $build_in_progress{$_} || defined $modules_with_errors{$_}); @@ -2477,6 +2797,7 @@ sub sort_modules_appearance { sub generate_html_file { return if (!$html); my $force_update = shift; + $force_update++ if ($debug); $html_last_updated = time; my @modules_order = sort_modules_appearance(); my ($successes_percent, $errors_percent) = get_progress_percentage(scalar keys %html_info, scalar keys %build_is_finished, scalar keys %modules_with_errors); @@ -2492,13 +2813,20 @@ sub generate_html_file { print HTML 'initFrames();' . "\n"; print HTML 'var IntervalID;' . "\n"; print HTML 'function loadFrame_0() {' . "\n"; - print HTML 'document.write("<html>");' . "\n"; - print HTML 'document.write("<head>");' . "\n"; - print HTML 'document.write("</head>");' . "\n"; - print HTML 'document.write("<body>");' . "\n"; + print HTML ' document.write("<html>");' . "\n"; + print HTML ' document.write("<head>");' . "\n"; + print HTML ' document.write("</head>");' . "\n"; + print HTML ' document.write("<body>");' . "\n"; if ($build_finished) { print HTML 'document.write("<h3 align=center style=\"color:red\">Build process is finished</h3>");' . "\n"; print HTML ' top.frames[0].clearInterval(top.frames[0].IntervalID);' . "\n"; + } elsif ($interactive) { + print HTML 'document.write(" <div id=divContext style=\"border: 1px solid; display: none; position: absolute\">");' . "\n"; + print HTML 'document.write(" <ul style=\"margin: 0; padding: 0.3em; list-style-type: none; background-color: lightgrey;\" :li:hover {} :hr {border: 0; border-bottom: 1px solid grey; margin: 3px 0px 3px 0px; width: 10em;} :a {border: 0 !important;} >");' . "\n"; + print HTML 'document.write(" <li><a onmouseover=\"this.style.color=\'red\'\" onmouseout=\"this.style.color=\'black\'\" id=aRebuild href=\"#\">Rebuild module</a></li>");' . "\n"; + print HTML 'document.write(" <li><a onmouseover=\"this.style.color=\'red\'\" onmouseout=\"this.style.color=\'black\'\" id=aDelete href=\"#\" >Remove module</a></li>");' . "\n"; + print HTML 'document.write(" </ul>");' . "\n"; + print HTML 'document.write(" </div>");' . "\n"; }; if ($BuildAllParents) { print HTML 'document.write("<table valign=top cellpadding=0 hspace=0 vspace=0 cellspacing=0 border=0>");' . "\n"; @@ -2556,7 +2884,12 @@ sub generate_html_file { print HTML $errors_number; print HTML ' error(s)\">', $_, '</a>");' . "\n"; } else { - print HTML 'document.write("<em style=color:gray>' . $_ . '</em>");'; +# print HTML 'document.write("<em style=color:gray>' . $_ . '</em>");'; +#### print HTML 'document.write("<em style=color:gray>' . $_ ."href=\'http://$local_host_ip:$html_port/delete=\'$_". '</em>");'; + + print HTML 'document.write(" <a target=\'infoframe\' id='; + print HTML $_; + print HTML ' href=\"javascript:void(0)\"; title=\"Remove module\">' . $_ . '</a>");' . "\n"; }; @@ -2583,13 +2916,64 @@ sub generate_html_file { print HTML 'document.write(" </tr>");' . "\n"; # </one module> } - print HTML 'document.write("</table>");' . "\n"; - print HTML 'document.write("</body>");' . "\n"; + print HTML 'document.write(" </table>");' . "\n"; + print HTML 'document.write(" </body>");' . "\n"; print HTML 'document.write("</html>");' . "\n"; print HTML 'document.close();' . "\n"; print HTML 'refreshInfoFrames();' . "\n"; print HTML '}' . "\n"; + + if (!$build_finished && $interactive ) { + print HTML 'var _replaceContext = false;' . "\n"; + print HTML 'var _mouseOverContext = false;' . "\n"; + print HTML 'var _noContext = false;' . "\n"; + print HTML 'var _divContext = $(\'divContext\');' . "\n"; + print HTML 'var activeElement = 0;' . "\n"; + print HTML 'function $(id) {return document.getElementById(id);}' . "\n"; + print HTML 'InitContext();' . "\n"; + print HTML 'function InitContext()' . "\n"; + print HTML '{' . "\n"; + print HTML ' $(\'aRebuild\').target = \'infoframe\';' . "\n"; + print HTML ' $(\'aDelete\').target = \'infoframe\';' . "\n"; + print HTML ' $(\'aRebuild\').style.color = \'black\';' . "\n"; + print HTML ' $(\'aDelete\').style.color = \'black\';' . "\n"; + print HTML ' _divContext.onmouseover = function() { _mouseOverContext = true; };' . "\n"; + print HTML ' _divContext.onmouseout = function() { _mouseOverContext = false; };' . "\n"; + print HTML ' _divContext.onclick = function() { _divContext.style.display = \'none\'; };' . "\n"; + print HTML ' document.body.onmousedown = ContextMouseDown;' . "\n"; + print HTML ' document.body.oncontextmenu = ContextShow;' . "\n"; + print HTML '}' . "\n"; + print HTML 'function ContextMouseDown(event) {' . "\n"; + print HTML ' if (_noContext || _mouseOverContext) return;' . "\n"; + print HTML ' if (event == null) event = window.event;' . "\n"; + print HTML ' var target = event.target != null ? event.target : event.srcElement;' . "\n"; + print HTML ' if (event.button == 2 && target.tagName.toLowerCase() == \'a\')' . "\n"; + print HTML ' _replaceContext = true;' . "\n"; + print HTML ' else if (!_mouseOverContext)' . "\n"; + print HTML ' _divContext.style.display = \'none\';' . "\n"; + print HTML '}' . "\n"; + print HTML 'function ContextShow(event) {' . "\n"; + print HTML ' if (_noContext || _mouseOverContext) return;' . "\n"; + print HTML ' if (event == null) event = window.event;' . "\n"; + print HTML ' var target = event.target != null ? event.target : event.srcElement;' . "\n"; + print HTML ' if (_replaceContext) {' . "\n"; + print HTML ' $(\'aRebuild\').href = \'http://'. $local_host_ip .':' . $html_port . '/rebuild=\' + target.id;' . "\n"; + print HTML ' $(\'aDelete\').href = \'http://'. $local_host_ip .':' . $html_port . '/delete=\' + target.id' . "\n"; + print HTML ' var scrollTop = document.body.scrollTop ? document.body.scrollTop : '; + print HTML 'document.documentElement.scrollTop;' . "\n"; + print HTML ' var scrollLeft = document.body.scrollLeft ? document.body.scrollLeft : '; + print HTML 'document.documentElement.scrollLeft;' . "\n"; + print HTML ' _divContext.style.display = \'none\';' . "\n"; + print HTML ' _divContext.style.left = event.clientX + scrollLeft + \'px\';' . "\n"; + print HTML ' _divContext.style.top = event.clientY + scrollTop + \'px\';' . "\n"; + print HTML ' _divContext.style.display = \'block\';' . "\n"; + print HTML ' _replaceContext = false;' . "\n"; + print HTML ' return false;' . "\n"; + print HTML ' }' . "\n"; + print HTML '}' . "\n"; + }; + print HTML 'function refreshInfoFrames() { ' . "\n"; print HTML ' var ModuleNameObj = top.innerFrame.frames[2].document.getElementById("ModuleErrors");' . "\n"; print HTML ' if (ModuleNameObj != null) {' . "\n"; @@ -2634,12 +3018,13 @@ sub generate_html_file { print HTML ' StatusInnerHtml += Status + "</em>";' . "\n"; print HTML ' return StatusInnerHtml;' . "\n"; print HTML '} ' . "\n"; - print HTML 'function ShowLog(LogFilePath) {' . "\n"; + print HTML 'function ShowLog(LogFilePath, ModuleJob) {' . "\n"; + print HTML ' top.innerFrame.frames[2].document.write("<h3 id=ModuleErrors name=\"" + null + "\">Log for " + ModuleJob + "</h3>");' . "\n"; + print HTML ' top.innerFrame.frames[2].document.write("<iframe id=LogFile name=Log src="'; if (defined $html_path) { - print HTML ' top.innerFrame.frames[2].document.location.replace("file://"+LogFilePath);' . "\n"; - } else { - print HTML ' top.innerFrame.frames[2].document.location.replace(LogFilePath);' . "\n"; + print HTML 'file://'; } + print HTML '+ LogFilePath + " width=100%></iframe>");' . "\n"; print HTML ' top.innerFrame.frames[2].document.close();' . "\n"; print HTML '};' . "\n"; print HTML 'function FillFrame_1(Module, Message1, Message2) {' . "\n"; @@ -2668,7 +3053,7 @@ sub generate_html_file { print HTML ' if (dir_info_array[4] == "@") {' . "\n"; print HTML ' top.innerFrame.frames[1].document.write(" <td style=white-space:nowrap>" + dir_info_array[1] + "</td>");' . "\n"; print HTML ' } else {' . "\n"; - print HTML ' top.innerFrame.frames[1].document.write(" <td><a href=\"javascript:top.ShowLog(\'" + dir_info_array[4] + "\')\"); title=\"Show Log\">" + dir_info_array[1] + "</a></td>");' . "\n"; + print HTML ' top.innerFrame.frames[1].document.write(" <td><a href=\"javascript:top.ShowLog(\'" + dir_info_array[4] + "\', \'" + dir_info_array[1] + "\')\"); title=\"Show Log\">" + dir_info_array[1] + "</a></td>");' . "\n"; print HTML ' };' . "\n"; print HTML ' top.innerFrame.frames[1].document.write(" <td align=center>" + dir_info_array[2] + "</td>");' . "\n"; print HTML ' top.innerFrame.frames[1].document.write(" <td align=center>" + dir_info_array[3] + "</td>");' . "\n"; @@ -2686,7 +3071,7 @@ sub generate_html_file { print HTML ' var DirectoryInfos = ModuleRows[i + 1].cells;' . "\n"; print HTML ' DirectoryInfos[0].innerHTML = getStatusInnerHTML(dir_info_array[0]) + " ";' . "\n"; print HTML ' if (dir_info_array[4] != "@") {' . "\n"; - print HTML ' DirectoryInfos[1].innerHTML = "<a href=\"javascript:top.ShowLog(\'" + dir_info_array[4] + "\')\"); title=\"Show Log\">" + dir_info_array[1] + "</a>";' . "\n"; + print HTML ' DirectoryInfos[1].innerHTML = "<a href=\"javascript:top.ShowLog(\'" + dir_info_array[4] + "\', \'" + dir_info_array[1] + "\')\"); title=\"Show Log\">" + dir_info_array[1] + "</a>";' . "\n"; print HTML ' };' . "\n"; print HTML ' DirectoryInfos[2].innerHTML = dir_info_array[2];' . "\n"; print HTML ' DirectoryInfos[3].innerHTML = dir_info_array[3];' . "\n"; @@ -2789,7 +3174,7 @@ sub generate_html_file { print HTML ' document.write(\' </frameset>\');' . "\n"; print HTML ' document.write(\' <frame src="\');' . "\n"; print HTML ' document.write(urlquery[0]);' . "\n"; - print HTML ' document.write(\'?initFrame2"/>\');' . "\n"; + print HTML ' document.write(\'?initFrame2" name="infoframe"/>\');' . "\n"; print HTML ' document.write(\' </frameset>\');' . "\n"; print HTML ' document.write("</head></html>");' . "\n"; print HTML ' } else {' . "\n"; @@ -2877,7 +3262,7 @@ sub get_html_info { $errors_info_line .= '\''; # if (defined $full_info) { my $time_line = get_time_line($$module_info_hash{BUILD_TIME}); - my ($successes_percent, $errors_percent) = get_progress_percentage($dirs_number, $successful_number, $errorful_number); + my ($successes_percent, $errors_percent) = get_progress_percentage($dirs_number - 1, $successful_number - 1, $errorful_number); return($errors_info_line, $dirs_info_line, $errorful_number, $successes_percent, $errors_percent, $time_line); # } else { # return($errors_info_line, $dirs_info_line, $errorful_number); @@ -2929,7 +3314,11 @@ sub html_store_job_info { $build_dir =~ s/\\/\//g; $modules_with_errors{$module}++; } else { - $jobs_hash{$build_dir}->{STATUS} = 'success'; + if ($build_dir =~ /(\s)announce/o) { + $jobs_hash{$build_dir}->{STATUS} = '-'; + } else { + $jobs_hash{$build_dir}->{STATUS} = 'success'; + }; $dmake_array = $$module_info_hash{SUCCESSFUL}; }; push (@$dmake_array, $build_dir); @@ -2938,29 +3327,41 @@ sub html_store_job_info { sub start_server_on_port { my $port = shift; + my $socket_obj = shift; + $client_timeout = 1 if (!$parent_process); if ($ENV{GUI} eq 'WNT') { - $socket_obj = new IO::Socket::INET (#LocalAddr => hostname(), + $$socket_obj = new IO::Socket::INET (#LocalAddr => hostname(), LocalPort => $port, Proto => 'tcp', Listen => 100); # 100 clients can be on queue, I think it is enough } else { - $socket_obj = new IO::Socket::INET (#LocalAddr => hostname(), + $$socket_obj = new IO::Socket::INET (#LocalAddr => hostname(), LocalPort => $port, Proto => 'tcp', ReuseAddr => 1, Listen => 100); # 100 clients can be on queue, I think it is enough }; - return('Cannot create socket object') if (!defined $socket_obj); - my $timeout = $socket_obj->timeout($client_timeout); - $socket_obj->autoflush(1); - print "SERVER started on port $port\n"; + return('Cannot create socket object') if (!defined $$socket_obj); + my $timeout = $$socket_obj->timeout($client_timeout); + $$socket_obj->autoflush(1); + if ($parent_process && $debug) { + print "SERVER started on port $port\n"; + } else { + print "html_port:$html_port html_socket_obj: $html_socket_obj\n"; + }; return 0; }; +sub accept_html_connection { + my $new_socket_obj = undef; + $new_socket_obj = $html_socket_obj->accept(); + return $new_socket_obj; +}; + sub accept_connection { my $new_socket_obj = undef; do { - $new_socket_obj = $socket_obj->accept(); + $new_socket_obj = $server_socket_obj->accept(); if (!$new_socket_obj) { print "Timeout on incoming connection\n"; check_client_jobs(); @@ -2985,9 +3386,7 @@ sub check_client_jobs { }; }; -sub run_server { - my @build_queue = (); # array, containing queue of projects - # to build +sub get_server_ports { # use port 7890 as default my $default_port = 7890; if ($ports_string) { @@ -2995,10 +3394,15 @@ sub run_server { } else { @server_ports = ($default_port .. $default_port + 4); }; +}; + +sub run_server { + my @build_queue = (); # array, containing queue of projects + # to build my $error = 0; if (scalar @server_ports) { foreach (@server_ports) { - $error = start_server_on_port($_); + $error = start_server_on_port($_, \$server_socket_obj); if ($error) { print STDERR "port $_: $error\n"; } else { @@ -3009,8 +3413,10 @@ sub run_server { last; }; }; + print_error('Unable to start server on port(s): ' . "@server_ports\n") if ($error); + } else { + print_error('No ports for server to start'); }; - print_error('It is impossible to start server on port(s): ' . "@server_ports\n") if ($error); my $client_addr; my $job_string_base = get_job_string_base(); @@ -3118,7 +3524,7 @@ sub get_job_string { } else { $dependencies_hash = \%LocalDepsHash; do { - $job_dir = PickPrjToBuild(\%LocalDepsHash); + $job_dir = pick_prj_to_build(\%LocalDepsHash); if (!$job_dir && !children_number()) { cancel_build() if (scalar keys %broken_build); mp_success_exit(); @@ -3160,20 +3566,18 @@ sub pick_jobdir { foreach (@$build_queue) { $Prj = $$build_queue[$i]; my $prj_deps_hash = $projects_deps_hash{$Prj}; - if (defined $broken_modules_hashes{$prj_deps_hash} && !$ignore) { + if (defined $modules_with_errors{$prj_deps_hash} && !$ignore) { push (@broken_modules_names, $Prj); splice (@$build_queue, $i, 1); next; }; - $only_dependent = 0; - $no_projects = 0; $running_children{$prj_deps_hash} = 0 if (!defined $running_children{$prj_deps_hash}); - $child_nick = PickPrjToBuild($prj_deps_hash); + $child_nick = pick_prj_to_build($prj_deps_hash); if ($child_nick) { return ($child_nick, $prj_deps_hash); } - if ($no_projects && !$running_children{$prj_deps_hash}) { - if (!defined $broken_modules_hashes{$prj_deps_hash} || $ignore) + if ((!scalar keys %$prj_deps_hash) && !$running_children{$prj_deps_hash}) { + if (!defined $modules_with_errors{$prj_deps_hash} || $ignore) { RemoveFromDependencies($Prj, \%global_deps_hash); $build_is_finished{$Prj}++; @@ -3188,10 +3592,10 @@ sub pick_jobdir { sub fill_modules_queue { my $build_queue = shift; my $Prj; - while ($Prj = PickPrjToBuild(\%global_deps_hash)) { + while ($Prj = pick_prj_to_build(\%global_deps_hash)) { push @$build_queue, $Prj; $projects_deps_hash{$Prj} = {}; - get_deps_hash($Prj, $projects_deps_hash{$Prj}); + get_module_dep_hash($Prj, $projects_deps_hash{$Prj}); my $info_hash = $html_info{$Prj}; $$info_hash{DIRS} = check_deps_hash($projects_deps_hash{$Prj}, $Prj); $module_by_hash{$projects_deps_hash{$Prj}} = $Prj; diff --git a/solenv/bin/cws.pl b/solenv/bin/cws.pl index ce6eaa015a91..1268f78ec186 100644 --- a/solenv/bin/cws.pl +++ b/solenv/bin/cws.pl @@ -39,6 +39,7 @@ use Getopt::Long; use File::Basename; use File::Path; use Cwd; +use Benchmark; #### module lookup my @lib_dirs; @@ -58,6 +59,10 @@ use Cws; #### globals #### +# TODO: replace dummy vales with actual SVN->hg migration milestones +my $dev300_migration_milestone = 'm999'; +my $ooo320_migration_milestone = 'm999'; + # valid command with possible abbreviations my @valid_commands = ( 'help', 'h', '?', @@ -360,7 +365,13 @@ sub get_cws_by_name # Update masterws part of Cws object. my $masterws = $cws->get_mws(); - $cws->master($masterws); + if ( $cws->master() ne $masterws ) { + # can this still happen? + if ( $debug ) { + print STDERR "CWS-DEBUG: get_cws_by_name(): fixup of masterws in cws object detected\n"; + } + $cws->master($masterws); + } return ($cws); } @@ -426,6 +437,191 @@ sub register_child_workspace return 0; } +sub print_time_elapsed +{ + my $t_start = shift; + my $t_stop = shift; + + my $time_diff = timediff($t_stop, $t_start); + print_message("... finished in " . timestr($time_diff)); +} + +sub hgrc_append_default_push_path +{ + my $target = shift; + my $cws_source = shift; + + $cws_source =~ s/http:\/\//ssh:\/\/hg@/; + if ( $debug ) { + print STDERR "CWS-DEBUG: default-push path: '$cws_source'\n"; + } + if ( !open(HGRC, ">>$target/.hg/hgrc") ) { + print_error("Can't append default-push path to hgrc file of repository '$target'.\n", 88); + } + print HGRC "default-push = " . "$cws_source\n"; + close(HGRC); +} + +sub hg_clone_repository +{ + my $rep_type = shift; + my $cws = shift; + my $target = shift; + my $clone_milestone_only = shift; + + my ($hg_local_source, $hg_lan_source, $hg_remote_source); + my $config = CwsConfig->new(); + if ( $rep_type eq 'ooo') { + $hg_local_source = $config->get_ooo_hg_local_source(); + $hg_lan_source = $config->get_ooo_hg_lan_source(); + $hg_remote_source = $config->get_ooo_hg_remote_source(); + } + else { + $hg_local_source = $config->get_so_hg_local_source(); + $hg_lan_source = $config->get_so_hg_lan_source(); + $hg_remote_source = $config->get_so_hg_remote_source(); + } + + my $masterws = $cws->master(); + my $master_local_source = "$hg_local_source/" . $masterws; + my $master_lan_source = "$hg_lan_source/" . $masterws; + + my $milestone_tag; + if ( $clone_milestone_only ) { + $milestone_tag = uc($masterws) . '_' . $clone_milestone_only; + } + else { + my @tags = $cws->get_tags(); + $milestone_tag = $tags[3]; + } + + if ( $debug ) { + print STDERR "CWS-DEBUG: master_local_source: '$master_local_source'\n"; + print STDERR "CWS-DEBUG: master_lan_source: '$master_lan_source'\n"; + if ( !-d $master_local_source ) { + print STDERR "CWS-DEBUG: not a directory '$master_local_source'\n"; + } + } + + # clone from local source if possible, otherwise from LAN source + if ( -d $master_local_source && can_use_hardlinks($master_local_source, dirname($target)) ) { + hg_local_clone_repository($master_local_source, $target, $milestone_tag); + } + else { + hg_lan_clone_repository($master_lan_source, $target, $milestone_tag); + } + + # now pull from the remote cws outgoing repository if it already contains something + if ( !$clone_milestone_only ) { + my $cws_remote_source = "$hg_remote_source/cws/" . $cws->child(); + + # The outgoing repository might not yet be available. Which is not + # an error. Since pulling from the cws outgoing URL results in an ugly + # and hardly understandable error message, we check for the availaility + # first. TODO: incorporate configured proxy instead of env_proxy. Use + # a dedicated request and content-type to find out if the repo is there + # instead of parsing the content of the page + require LWP::Simple; + my $content = LWP::Simple::get($cws_remote_source); + my $pattern = "<title>cws/". $cws->child(); + if ( $content =~ /$pattern/ ) { + hg_remote_pull_repository($cws_remote_source, $target); + hgrc_append_default_push_path($target, $cws_remote_source); + } + else { + print_message("The 'outgoing' repository '$cws_remote_source' is not accessible/available"); + } + } + + # update the result + hg_update_repository($target); + +} + +sub hg_local_clone_repository +{ + my $local_source = shift; + my $dest = shift; + my $milestone_tag = shift; + + # fastest way to clone a repository up to a certain milestone + # 1) clone w/o -r options (hard links!) + # 2) find (local) revision which corresponds to milestone + # 3) strip revision+1 + + my $t1 = Benchmark->new(); + print_message("... clone LOCAL repository '$local_source' to '$dest'"); + hg_clone($local_source, $dest, '-U'); + my $id_option = "-n -r $milestone_tag"; + my $revision = hg_ident($dest, $milestone_tag); + if ( defined($revision) ) { + my $strip_revision = $revision+1; + hg_strip($dest, $revision); + } + my $t2 = Benchmark->new(); + print_time_elapsed($t1, $t2); +} + +sub hg_lan_clone_repository +{ + my $lan_source = shift; + my $dest = shift; + my $milestone_tag = shift; + + my $t1 = Benchmark->new(); + print_message("... clone LAN repository '$lan_source' to '$dest'"); + hg_clone($lan_source, $dest, "-U -r $milestone_tag"); + my $t2 = Benchmark->new(); + print_time_elapsed($t1, $t2); +} + +sub hg_remote_pull_repository +{ + my $remote_source = shift; + my $dest = shift; + + my $t1 = Benchmark->new(); + print_message("... pull from REMOTE repository '$remote_source' to '$dest'"); + hg_pull($dest, $remote_source); + my $t2 = Benchmark->new(); + print_time_elapsed($t1, $t2); +} + +sub hg_update_repository +{ + my $dest = shift; + + my $t1 = Benchmark->new(); + print_message("... update repository '$dest'"); + hg_update($dest); + my $t2 = Benchmark->new(); + print_time_elapsed($t1, $t2); +} + +# Check if clone source and destination are on the same filesystem, +# in that case hg clone can employ hard links. +sub can_use_hardlinks +{ + my $source = shift; + my $dest = shift; + + if ( $^O eq 'cygwin' ) { + # no hard links on windows + return 0; + } + # st_dev is the first field return by stat() + my @stat_source = stat($source); + my @stat_dest = stat($dest); + + if ( $debug ) { + print STDERR "can_use_hardlinks(): source device: '$stat_source[0]', destination device: '$stat_dest[0]'\n"; + } + if ( $stat_source[0] == $stat_dest[0] ) { + return 1; + } + return 0; +} + sub query_cws { my $query_mode = shift; @@ -530,7 +726,6 @@ sub query_scm print_message("Child workspace uses '$scm'."); } } - return; } @@ -1217,6 +1412,49 @@ sub diff_print_files } } +# TODO: special provisions for SVN->HG migrations, remove this +# some time after migration +sub get_scm_for_milestone +{ + my $masterws = shift; + my $milestone = shift; + + my $milestone_sequence_number = extract_milestone_sequence_number($milestone); + my $dev300_migration_sequence_number = extract_milestone_sequence_number($dev300_migration_milestone); + my $ooo320_migration_sequence_number = extract_milestone_sequence_number($ooo320_migration_milestone); + + my $scm = 'SVN'; + + if ( $masterws eq 'DEV300' ) { + if ( $milestone_sequence_number >= $dev300_migration_sequence_number ) { + $scm = 'HG'; + } + } + elsif ( $masterws eq 'OOO320' ) { + if ( $milestone_sequence_number >= $ooo320_migration_sequence_number ) { + $scm = 'HG'; + } + } + else { + $scm = 'SVN' + } + return $scm; +} + +sub extract_milestone_sequence_number +{ + my $milestone = shift; + + my $milestone_sequence_number; + if ( $milestone =~ /m(\d+)/ ) { + $milestone_sequence_number = $1; + } + else { + print_error("can't extract milestone sequence number from milestone '$milestone'", 99); + } + return $milestone_sequence_number; +} + # Executes the help command. sub do_help { @@ -1772,6 +2010,7 @@ sub do_fetch my $args_ref = shift; my $options_ref = shift; + my $time_fetch_start = Benchmark->new(); if ( exists $options_ref->{'help'} || @{$args_ref} != 1) { do_help(['fetch']); } @@ -1794,7 +2033,7 @@ sub do_fetch } if ( defined($platforms) && $switch ) { - print_error("Option '-p' is not yet usuable with Option '-s'. Will be fixed RSN.", 0); + print_error("Option '-p' is not usuable with Option '-s'.", 0); do_help(['fetch']); } @@ -1810,6 +2049,7 @@ sub do_fetch } $cws->master($masterws); my $milestone; + my $scm; if( defined($milestone_opt) ) { if ( $milestone_opt eq 'latest' ) { $cws->master($masterws); @@ -1823,16 +2063,26 @@ sub do_fetch else { ($masterws, $milestone) = verify_milestone($cws, $milestone_opt); } + $scm = get_scm_for_milestone($masterws, $milestone); } elsif ( defined($child) ) { $cws = get_cws_by_name($child); $masterws = $cws->master(); # CWS can have another master than specified in ENV $milestone = $cws->milestone(); + $scm = $cws->get_scm(); } else { do_help(['fetch']); } + if ( $switch && $scm eq 'HG' ) { + print_error("Option '-s' is not supported on a hg based CWS.", 0); + do_help(['fetch']); + } + + if ( $debug ) { + print STDERR "CWS-DEBUG: SCM: $scm\n"; + } my $config = CwsConfig->new(); my $ooo_svn_server = $config->get_ooo_svn_server(); my $so_svn_server = $config->get_so_svn_server(); @@ -1886,11 +2136,12 @@ sub do_fetch } my $cwsname = $cws->child(); - my $url_suffix = $milestone_opt ? ("/tags/$masterws" . "_$milestone") : ('/cws/' . $cwsname); my $linkdir = $milestone_opt ? "src.$milestone" : "src." . $cws->milestone; my $workspace = $args_ref->[0]; + if ( !$onlysolver ) { + my $url_suffix = $milestone_opt ? ("/tags/$masterws" . "_$milestone") : ('/cws/' . $cwsname); if ( $switch ) { # check if to be switched working copy exist or bail out if ( ! -d $workspace ) { @@ -1942,8 +2193,11 @@ sub do_fetch print_error("File or directory '$workspace' already exists.", 8); } - # Check if working directory already exists + if ( !(($scm eq 'SVN') || ($scm eq 'HG')) ) { + print_error("Unsupported SCM '$scm'.", 8); + } + my $clone_milestone_only = $milestone_opt ? $milestone : 0; if ( defined($so_svn_server) ) { if ( !mkdir($workspace) ) { print_error("Can't create directory '$workspace': $!.", 8); @@ -1952,11 +2206,17 @@ sub do_fetch if ( !mkdir($work_master) ) { print_error("Can't create directory '$work_master': $!.", 8); } - print_message("... checkout '$ooo_url' to '$work_master/ooo'"); - svn_checkout($ooo_url, "$work_master/ooo", $quiet); - my $so_url = $so_svn_server . $url_suffix; - print_message("... checkout '$so_url' to '$work_master/sun'"); - svn_checkout($so_url, "$work_master/sun", $quiet); + if ( $scm eq 'SVN' ) { + print_message("... checkout '$ooo_url' to '$work_master/ooo'"); + svn_checkout($ooo_url, "$work_master/ooo", $quiet); + my $so_url = $so_svn_server . $url_suffix; + print_message("... checkout '$so_url' to '$work_master/sun'"); + svn_checkout($so_url, "$work_master/sun", $quiet); + } + else{ + hg_clone_repository('ooo', $cws, "$work_master/ooo", $clone_milestone_only); + hg_clone_repository('so', $cws, "$work_master/sun", $clone_milestone_only); + } my $linkdir = "$work_master/src.$milestone"; if ( !mkdir($linkdir) ) { print_error("Can't create directory '$linkdir': $!.", 8); @@ -1964,8 +2224,13 @@ sub do_fetch relink_workspace($linkdir); } else { - print_message("... checkout '$ooo_url' to '$workspace'"); - svn_checkout($ooo_url, $workspace, $quiet); + if ( $scm eq 'SVN' ) { + print_message("... checkout '$ooo_url' to '$workspace'"); + svn_checkout($ooo_url, $workspace, $quiet); + } + else { + hg_clone_repository('ooo', $cws, $workspace, $clone_milestone_only); + } } } } @@ -1983,10 +2248,16 @@ sub do_fetch } } foreach(@platforms) { + my $time_solver_start = Benchmark->new(); print_message("... copying platform solver '$_'."); update_solver($_, $prebuild_dir, $solver, $milestone); + my $time_solver_stop = Benchmark->new(); + print_time_elapsed($time_solver_start, $time_solver_stop); } } + my $time_fetch_stop = Benchmark->new(); + my $time_fetch = timediff($time_fetch_stop, $time_fetch_start); + print_message("cws fetch: total time required " . timestr($time_fetch)); } sub do_query @@ -2608,4 +2879,116 @@ sub execute_svnversion_command return $result; } + +### HG glue ### + +sub hg_clone +{ + my $source = shift; + my $dest = shift; + my $options = shift; + + if ( $debug ) { + print STDERR "CWS-DEBUG: ... hg clone: '$source -> $dest', options: '$options'\n"; + } + + my @result = execute_hg_command(1, 'clone', $options, $source, $dest); + return @result; +} + +sub hg_ident +{ + my $repository = shift; + my $rev_id = shift; + + if ( $debug ) { + print STDERR "CWS-DEBUG: ... hg ident: 'repository', revision: '$rev_id'\n"; + } + + my @result = execute_hg_command(0, 'ident', "--cwd $repository", "-n -r $rev_id"); + my $line = $result[0]; + if ($line =~ /abort: unknown revision/) { + return undef; + } + else { + chomp($line); + return $line; + } +} + +sub hg_strip +{ + my $repository = shift; + my $rev_id = shift; + + if ( $debug ) { + print STDERR "CWS-DEBUG: ... hg strip: 'repository', revision: '$rev_id'\n"; + } + + my @result = execute_hg_command(1, 'strip', "--cwd $repository", '-n', $rev_id); + my $line = $result[0]; + if ($line =~ /abort: unknown revision/) { + return undef; + } + else { + chomp($line); + return $line; + } +} + +sub hg_pull +{ + my $repository = shift; + my $remote = shift; + + if ( $debug ) { + print STDERR "CWS-DEBUG: ... hg pull: 'repository', remote: '$remote'\n"; + } + + my @result = execute_hg_command(0, 'pull', "--cwd $repository", $remote); + my $line = $result[0]; + if ($line =~ /abort: /) { + return undef; + } +} + +sub hg_update +{ + my $repository = shift; + + if ( $debug ) { + print STDERR "CWS-DEBUG: ... hg update: 'repository'\n"; + } + + my @result = execute_hg_command(1, 'update', "--cwd $repository"); + return @result; +} + +sub execute_hg_command +{ + my $terminate_on_rc = shift; + my $command = shift; + my $options = shift; + my @args = @_; + + my $args_str = join(" ", @args); + + # we can only parse english strings, hopefully a C locale is available everywhere + $ENV{LC_ALL}='C'; + $command = "hg $command $options $args_str"; + + if ( $debug ) { + print STDERR "CWS-DEBUG: ... execute command line: '$command'\n"; + } + + my $result = `$command`; + my $rc = $? >> 8; + if ($rc > 0 && $terminate_on_rc) { + print_error("The mercurial command line tool 'hg' failed with exit status '$rc'", 99); + } + + return $result; +} + + # vim: set ts=4 shiftwidth=4 expandtab syntax=perl: diff --git a/solenv/bin/modules/Cws.pm b/solenv/bin/modules/Cws.pm index d5516bd79e66..2ec5d13ff88c 100755 --- a/solenv/bin/modules/Cws.pm +++ b/solenv/bin/modules/Cws.pm @@ -1219,7 +1219,7 @@ sub register_child_with_eis }; if ( $@ ) { - carp("ERROR: create_child_wortkspace(): EIS database transaction failed. Reason:\n$@\n"); + carp("ERROR: create_child_workspace(): EIS database transaction failed. Reason:\n$@\n"); return undef; } # set EIS_ID directly, since $self->eis_id() is not @@ -1828,6 +1828,7 @@ sub set_scm_in_eis my $self = shift; my $scm_name = shift; + $scm_name = Eis::to_string($scm_name); # check if child workspace is valid my $id = $self->eis_id(); if ( !$id ) { diff --git a/solenv/bin/modules/CwsConfig.pm b/solenv/bin/modules/CwsConfig.pm index a346ba7d4d50..3574bc89e7a8 100644 --- a/solenv/bin/modules/CwsConfig.pm +++ b/solenv/bin/modules/CwsConfig.pm @@ -345,6 +345,98 @@ sub get_so_svn_server return $self->{SO_SVN_SERVER} ? $self->{SO_SVN_SERVER} : undef; } +#### HG methods #### + +sub get_ooo_hg_local_source +{ + my $self = shift; + + if ( !defined($self->{HG_LOCAL_SOURCE}) ) { + my $config_file = $self->get_config_file(); + my $source = $config_file->{CWS_CONFIG}->{'HG_LOCAL_SOURCE'}; + if ( !defined($source) ) { + $source = ""; + } + $self->{HG_LOCAL_SOURCE} = $source; + } + return $self->{HG_LOCAL_SOURCE} ? $self->{HG_LOCAL_SOURCE} : undef; +} + +sub get_ooo_hg_lan_source +{ + my $self = shift; + + if ( !defined($self->{HG_LAN_SOURCE}) ) { + my $config_file = $self->get_config_file(); + my $source = $config_file->{CWS_CONFIG}->{'HG_LAN_SOURCE'}; + if ( !defined($source) ) { + $source = ""; + } + $self->{HG_LAN_SOURCE} = $source; + } + return $self->{HG_LAN_SOURCE} ? $self->{HG_LAN_SOURCE} : undef; +} + +sub get_ooo_hg_remote_source +{ + my $self = shift; + + if ( !defined($self->{HG_REMOTE_SOURCE}) ) { + my $config_file = $self->get_config_file(); + my $source = $config_file->{CWS_CONFIG}->{'HG_REMOTE_SOURCE'}; + if ( !defined($source) ) { + $source = ""; + } + $self->{HG_REMOTE_SOURCE} = $source; + } + return $self->{HG_REMOTE_SOURCE} ? $self->{HG_REMOTE_SOURCE} : undef; +} + +sub get_so_hg_local_source +{ + my $self = shift; + + if ( !defined($self->{SO_HG_LOCAL_SOURCE}) ) { + my $config_file = $self->get_config_file(); + my $source = $config_file->{CWS_CONFIG}->{'SO_HG_LOCAL_SOURCE'}; + if ( !defined($source) ) { + $source = ""; + } + $self->{SO_HG_LOCAL_SOURCE} = $source; + } + return $self->{SO_HG_LOCAL_SOURCE} ? $self->{SO_HG_LOCAL_SOURCE} : undef; +} + +sub get_so_hg_lan_source +{ + my $self = shift; + + if ( !defined($self->{SO_HG_LAN_SOURCE}) ) { + my $config_file = $self->get_config_file(); + my $source = $config_file->{CWS_CONFIG}->{'SO_HG_LAN_SOURCE'}; + if ( !defined($source) ) { + $source = ""; + } + $self->{SO_HG_LAN_SOURCE} = $source; + } + return $self->{SO_HG_LAN_SOURCE} ? $self->{SO_HG_LAN_SOURCE} : undef; +} + +sub get_so_hg_remote_source +{ + my $self = shift; + + if ( !defined($self->{SO_HG_REMOTE_SOURCE}) ) { + my $config_file = $self->get_config_file(); + my $source = $config_file->{CWS_CONFIG}->{'SO_HG_REMOTE_SOURCE'}; + if ( !defined($source) ) { + $source = ""; + } + $self->{SO_HG_REMOTE_SOURCE} = $source; + } + return $self->{SO_HG_REMOTE_SOURCE} ? $self->{SO_HG_REMOTE_SOURCE} : undef; +} + #### Prebuild binaries configuration #### sub get_prebuild_binaries_location diff --git a/solenv/bin/rpm-wrapper b/solenv/bin/rpm-wrapper index 1b523bb9b130..1c94bc0a9f10 100755 --- a/solenv/bin/rpm-wrapper +++ b/solenv/bin/rpm-wrapper @@ -40,6 +40,12 @@ then LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${LIBRARY_PATH?} \ ${BUILD_TOOLS?}/rpmbuild "$@" else +if [ "$OUTPATH" = "unxlngx6" ] +then +LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${LIBRARY_PATH?} \ + ${BUILD_TOOLS?}/rpmbuild "$@" +else LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${COMPATH?}/lib \ ${BUILD_TOOLS?}/rpm "$@" fi +fi diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index f5aec06e9ed2..7e0b39359290 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -404,7 +404,6 @@ unxfbsdi CPUNAME INTEL CVER C300 ENV_TOOLS %SOLARROOT%/et_unxfbsdi/bin - GLIBC GLIBC GUI UNX GUIBASE unx GVER VCL @@ -711,7 +710,6 @@ unxlngi6 ENABLE_KDE TRUE ENABLE_EVOAB2 TRUE ENV_TOOLS %SOLARROOT%/et_linux_libc2.32/%WORK_STAMP%/bin - GLIBC 2SUSE90 GUI UNX GUIBASE unx GVER VCL @@ -942,7 +940,7 @@ unxlngx6 COPYALL TRUE DEVROOT %SOL_TMP%$/r PCLEAN_PATH %SOLARROOT%/etools - PERL %SOL_TMP%$/r$/bt_linux_libc2.11$/%WORK_STAMP%$/bin$/perl + PERL %SOL_TMP%$/r$/bt_linux_libc2.32$/%WORK_STAMP%$/bin$/perl SOLARENV %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SOLARROOT %SOL_TMP%$/r SOLARVER %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%/%WORK_STAMP% @@ -954,7 +952,7 @@ unxlngx6 COPY_PACKED TRUE DEVROOT %SOL_TMP%$/r PCLEAN_PATH %SOLARROOT%/etools - PERL %SOL_TMP%$/r$/bt_linux_libc2.11$/%WORK_STAMP%$/bin$/perl + PERL %SOL_TMP%$/r$/bt_linux_libc2.32$/%WORK_STAMP%$/bin$/perl SOLARENV %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SOLARROOT %SOL_TMP%$/r SOLARVER %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%/%WORK_STAMP% @@ -966,7 +964,7 @@ unxlngx6 COPYALL FALSE DEVROOT %SOL_TMP%$/r PCLEAN_PATH %SOL_TMP%$/r/etools - PERL %SOL_TMP%$/r$/bt_linux_libc2.11$/%WORK_STAMP%$/bin$/perl + PERL %SOL_TMP%$/r$/bt_linux_libc2.32$/%WORK_STAMP%$/bin$/perl SOLARENV %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SOLARROOT %SOL_TMP%$/r SOLARVER %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%/%WORK_STAMP% @@ -1007,7 +1005,7 @@ unxlngx6 { COMPATH %SOLAR_ENV_ROOT%$/gcc_4.2.3_linux64_libc3.4.6/ DEVROOT %SOLAR_ENV_ROOT% - PERL %SOLAR_ENV_ROOT%/bt_linux_libc2.11/%WORK_STAMP%/bin/perl + PERL %SOLAR_ENV_ROOT%/bt_linux_libc2.32/%WORK_STAMP%/bin/perl PKGFORMAT rpm PTHREAD_CFLAGS -DNPTL SHARED_SOLARENV %SOLAR_SOURCE_ROOT%/%WORK_STAMP%/ooo%UPDMINOREXT%/solenv @@ -1027,7 +1025,7 @@ unxlngx6 common2 { ENABLE_GRAPHITE TRUE - BUILD_TOOLS %SOLARROOT%/bt_linux_libc2.11/%WORK_STAMP%/bin + BUILD_TOOLS %SOLARROOT%/bt_linux_libc2.32/%WORK_STAMP%/bin COM GCC COMMON_BUILD_TOOLS %SOLARROOT%$/btools COMMON_ENV_TOOLS %SOLARROOT%$/etools @@ -1036,8 +1034,7 @@ unxlngx6 CVER C341 ENABLE_KAB TRUE ENABLE_KDE TRUE - ENV_TOOLS %SOLARROOT%/et_linux_libc2.11/%WORK_STAMP%/bin - GLIBC 2REDHAT60 + ENV_TOOLS %SOLARROOT%/et_linux_libc2.32/%WORK_STAMP%/bin GUI UNX GUIBASE unx GUIENV sal @@ -1367,7 +1364,6 @@ unxmacxi CPUNAME INTEL CVER C341 ENV_TOOLS %SOLARROOT%/et_macosx_intel/%WORK_STAMP%/bin - GLIBC unknown GUI UNX GUIBASE aqua GVER VCL @@ -2567,7 +2563,6 @@ unxubti8 CPU I CPUNAME INTEL CVER C341 - GLIBC 2REDHAT60 GUI UNX GUIBASE unx GVER VCL diff --git a/solenv/config/ssolar.cmn b/solenv/config/ssolar.cmn index 6bee41aada14..877d82e566a5 100644 --- a/solenv/config/ssolar.cmn +++ b/solenv/config/ssolar.cmn @@ -117,7 +117,6 @@ common GCRINC GCRLIB GCRPATH - GLIBC GNUCOPY GXX_INCLUDE_PATH HBTOOLKIT diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk index 0d46f3ff9102..cce1aac0ea6e 100644 --- a/solenv/inc/libs.mk +++ b/solenv/inc/libs.mk @@ -172,7 +172,7 @@ NSPR4LIB=-lnspr4 PLC4LIB=-lplc4 NSSCRYPTOLIBS=$(LIBXML2LIB) $(XMLSECLIB) $(XMLSECLIB-NSS) $(NSS3LIB) $(NSPR4LIB) $(PLC4LIB) .IF "$(GUI)$(COM)"=="WNTGCC" -XMLSECLIB-MS=-lxmlsec1-mscrypto-1 +XMLSECLIB-MS=-lxmlsec1-mscrypto MSCRYPTOLIBS=$(LIBXML2LIB) $(XMLSECLIB) $(XMLSECLIB-MS) $(CRYPT32LIB) $(ADVAPI32LIB) .ENDIF # "$(GUI)$(COM)"=="WNTGCC" BROOKERLIB=-lbrooker$(DLLPOSTFIX) @@ -262,7 +262,6 @@ ISCLIB=-lsc$(DLLPOSTFIX) ISDLIB=-lsd$(DLLPOSTFIX) PKGCHKLIB=-lpkgchk$(DLLPOSTFIX) HELPLINKERLIB=-lhelplinker$(DLLPOSTFIX) -SYSSHELLLIB=-lsysshell .IF "$(GUI)$(COM)"=="WNTGCC" JVMACCESSLIB = -ljvmaccess$(UDK_MAJOR)$(COMID) .ELSE # "$(GUI)$(COM)"=="WNTGCC" @@ -472,7 +471,6 @@ SVXLLIB=svxl.lib FREETYPELIB=freetype.lib PKGCHKLIB=ipkgchk.lib HELPLINKERLIB=ihelplinker.lib -SYSSHELLLIB=sysshell.lib JVMACCESSLIB = ijvmaccess.lib CPPUNITLIB = cppunit.lib XSLTLIB = libxslt.lib $(ZLIB3RDLIB) $(LIBXML2LIB) diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk index 9fa07643c387..dbebc6253ed3 100644 --- a/solenv/inc/minor.mk +++ b/solenv/inc/minor.mk @@ -1,5 +1,5 @@ RSCVERSION=300 -RSCREVISION=300m60(Build:9425) -BUILD=9425 -LAST_MINOR=m60 +RSCREVISION=300m62(Build:9433) +BUILD=9433 +LAST_MINOR=m62 SOURCEVERSION=DEV300 diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index 7c762c7e1eaa..59bcdad6627b 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -238,7 +238,6 @@ STDSLO= STDLIB= STDSHL= -LIBMGR= LIBFLAGS= IMPLIBMGR= @@ -296,6 +295,7 @@ cap= #CC= #CXX= #LINK= +#LIBMGR= # avoid confusion with CUE PROFILE variable... @@ -914,10 +914,6 @@ CDEFS+=$(CDEFS_PRESET) CDEFS+=-DTIMELOG .ENDIF -.IF "$(GUI)"=="UNX" -CDEFS+=-DCVER=$(CVER) -.ENDIF - CDEFSCXX= CDEFSOBJ= CDEFSSLO=-DSHAREDLIB -D_DLL_ diff --git a/solenv/inc/tg_wntx64.mk b/solenv/inc/tg_wntx64.mk index 6e1d789d8845..607e1076a28c 100644 --- a/solenv/inc/tg_wntx64.mk +++ b/solenv/inc/tg_wntx64.mk @@ -515,6 +515,4 @@ $(SLO_X64)/%.obj : %.c .ENDIF # "$(BUILD_X64)"!="" - - - +BUILD64=1 diff --git a/solenv/inc/unx.mk b/solenv/inc/unx.mk index ff5349f62496..718e23c01b4e 100644 --- a/solenv/inc/unx.mk +++ b/solenv/inc/unx.mk @@ -83,67 +83,39 @@ .INCLUDE : unxscoi.mk .ENDIF -.IF "$(COM)$(OS)$(CPU)$(GLIBC)" == "GCCLINUXI" -.INCLUDE : unxlnxi.mk -.ENDIF - -.IF "$(COM)$(OS)$(CPU)$(GLIBC)" == "GCCLINUXP2" -.INCLUDE : unxlngp.mk -.ENDIF - .IF "$(COM)$(OS)$(CPU)" == "GCCLINUXS" .INCLUDE : unxlngs.mk .ENDIF -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)" == "GCCC295LINUXI2REDHAT60" -.INCLUDE : unxlngi3.mk -.ENDIF - -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)" == "GCCC300LINUXI2REDHAT60" -.INCLUDE : unxlngi4.mk -.ENDIF - -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)" == "GCCC322LINUXI2REDHAT60" -.INCLUDE : unxlngi5.mk -.ENDIF - -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)" == "GCCC341LINUXI2REDHAT60" -.INCLUDE : unxlngi6.mk +.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXI" +.INCLUDE : unxlngi.mk .ENDIF -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)" == "GCCC432LINUXI2SUSE90" -.INCLUDE : unxlngi6.mk +.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXX" +.INCLUDE : unxlngx.mk .ENDIF -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)" == "GCCC341LINUXX2REDHAT60" -.INCLUDE : unxlngx6.mk -.ENDIF - -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)" == "GCCC295LINUXP2REDHAT60" +.IF "$(COM)$(OS)$(CPU)$(CPUNAME)" == "GCCLINUXPPOWERPC" .INCLUDE : unxlngppc.mk .ENDIF -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)$(CPUNAME)" == "GCCC300LINUXP2REDHAT60POWERPC" -.INCLUDE : unxlngppc4.mk -.ENDIF - -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)$(CPUNAME)" == "GCCC300LINUXP2REDHAT60POWERPC64" +.IF "$(COM)$(OS)$(CPU)$(CPUNAME)" == "GCCLINUXPPOWERPC64" .INCLUDE : unxlngppc64.mk .ENDIF -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)$(CPUNAME)" == "GCCC300LINUX32REDHAT60S390" -.INCLUDE : unxlngs3904.mk +.IF "$(COM)$(OS)$(CPU)$(CPUNAME)" == "GCCLINUX3S390" +.INCLUDE : unxlngs390.mk .ENDIF -.IF "$(COM)$(CVER)$(OS)$(CPU)$(GLIBC)$(CPUNAME)" == "GCCC300LINUX32REDHAT60S390X" +.IF "$(COM)$(OS)$(CPU)$(CPUNAME)" == "GCCLINUX3S390X" .INCLUDE : unxlngs390x.mk .ENDIF -.IF "$(COM)$(OS)$(CPU)$(GLIBC)" == "GCCLINUXR2REDHAT60" +.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXR" .INCLUDE : unxlngr.mk .ENDIF -.IF "$(COM)$(OS)$(CPU)$(GLIBC)" == "GCCLINUXA2REDHAT60" +.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXA" .INCLUDE : unxlnga.mk .ENDIF diff --git a/solenv/inc/unxlngi6.mk b/solenv/inc/unxlng.mk index be55ef608a33..a79d3e47c6cf 100644 --- a/solenv/inc/unxlngi6.mk +++ b/solenv/inc/unxlng.mk @@ -29,11 +29,17 @@ # #************************************************************************* -# mk file for unxlngi6 -ASM= -AFLAGS= - +# generic mk file for unxlng (unix linux glibc) +ASM*= +AFLAGS*= SOLAR_JAVA*= +# default optimization level for product code +CDEFAULTOPT*=-O2 +# architecture dependent flags for the C and C++ compiler that can be changed by +# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build +ARCH_FLAGS*= +# position independent code switch +PICSWITCH*:=-fpic JAVAFLAGSDEBUG=-g # filter for supressing verbose messages from linker @@ -41,7 +47,7 @@ JAVAFLAGSDEBUG=-g #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" # _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) +CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) # enable visibility define in "sal/types.h" .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" @@ -58,16 +64,12 @@ JAVA_RUNTIME=-ljava_g .ENDIF .ENDIF -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*=-mtune=pentiumpro - # name of C++ Compiler CXX*=g++ # name of C Compiler CC*=gcc .IF "$(SYSBASE)"!="" -CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include +CFLAGS_SYSBASE:=-isystem $(SYSBASE)$/usr$/include CXX+:=$(CFLAGS_SYSBASE) CC+:=$(CFLAGS_SYSBASE) .ENDIF # "$(SYSBASE)"!="" @@ -90,14 +92,13 @@ CFLAGS_NO_EXCEPTIONS=-fno-exceptions # -fpermissive should be removed as soon as possible CFLAGSCXX= -pipe $(ARCH_FLAGS) -PICSWITCH:=-fpic .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" CFLAGSCXX += -fvisibility-inlines-hidden .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" CFLAGS_CREATE_PCH=-x c++-header -I$(INCPCH) -DPRECOMPILED_HEADERS -CFLAGS_USE_PCH=-I$(SLO)/pch -DPRECOMPILED_HEADERS -Winvalid-pch -CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch +CFLAGS_USE_PCH=-I$(SLO)$/pch -DPRECOMPILED_HEADERS -Winvalid-pch +CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)$/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch # Compiler flags for compiling static object in multi threaded environment with graphical user interface CFLAGSOBJGUIMT= @@ -114,7 +115,7 @@ CFLAGSDEBUG=-g CFLAGSDBGUTIL= # Compiler flags for enabling optimizations .IF "$(PRODUCT)"!="" -CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products +CFLAGSOPT=$(CDEFAULTOPT) -fno-strict-aliasing # optimizing for products .ELSE # "$(PRODUCT)"!="" CFLAGSOPT= # no optimizing for non products .ENDIF # "$(PRODUCT)"!="" @@ -188,7 +189,7 @@ SONAME_SWITCH=-Wl,-h STDLIBCPP=-lstdc++ # default objectfilenames to link -STDOBJVCL=$(L)/salmain.o +STDOBJVCL=$(L)$/salmain.o STDOBJGUI= STDSLOGUI= STDOBJCUI= @@ -207,14 +208,12 @@ LINKFLAGS += -Wl,-zdynsort .ENDIF # libraries for linking applications -STDLIBGUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed +STDLIBGUIMT+=-Wl,--as-needed -lX11 -ldl -lpthread -lm -Wl,--no-as-needed STDLIBCUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed # libraries for linking shared libraries -STDSHLGUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed +STDSHLGUIMT+=-Wl,--as-needed -lX11 -lXext -ldl -lpthread -lm -Wl,--no-as-needed STDSHLCUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed -X11LINK_DYNAMIC = -lX11 -lXext - LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive .IF "$(USE_STLP_DEBUG)" != "" @@ -238,7 +237,7 @@ LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) # name of library manager -LIBMGR=ar +LIBMGR*=ar LIBFLAGS=-r # tool for generating import libraries @@ -255,8 +254,6 @@ RCLINKFLAGS= RCSETVERSION= # platform specific identifier for shared libs -DLLPOSTFIX=li DLLPRE=lib DLLPOST=.so PCHPOST=.gch - diff --git a/solenv/inc/unxlnga.mk b/solenv/inc/unxlnga.mk index a777c2a1bd67..6baf600fee35 100644 --- a/solenv/inc/unxlnga.mk +++ b/solenv/inc/unxlnga.mk @@ -29,202 +29,9 @@ # #************************************************************************* -# mk file for unxlnga -ASM= -AFLAGS= +# mk file for Unix Linux Itanium using gcc, please make generic modifications to unxlng.mk -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DIA64 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc -.IF "$(SYSBASE)"!="" -CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include -CXX+:=$(CFLAGS_SYSBASE) -CC+:=$(CFLAGS_SYSBASE) -.ENDIF # "$(SYSBASE)"!="" -CFLAGS+=-Wreturn-type -fmessage-length=0 -c -# flags to enable build with symbols; required for crashdump feature -.IF "$(ENABLE_SYMBOLS)"=="SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta - -.ENDIF -.IF "$(HAVE_LD_HASH_STYLE)" == "TRUE" -LINKFLAGS += -Wl,--hash-style=both -.ELSE -LINKFLAGS += -Wl,-zdynsort -.ENDIF - -# flags for the C++ Compiler -CFLAGSCC= -pipe $(ARCH_FLAGS) -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -# -fpermissive should be removed as soon as possible -CFLAGSCXX= -pipe $(ARCH_FLAGS) -CFLAGSCXX+= -Wno-ctor-dtor-privacy -CFLAGSCXX+= -fno-use-cxa-atexit -PICSWITCH:=-fpic -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CFLAGSCXX += -fvisibility-inlines-hidden -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -.IF "$(PRODUCT)"!="" -CFLAGSOPT=-O2 -fno-strict-aliasing # optimizing for products -CFLAGSOPT+=-Wuninitialized # not supported without optimization -.ELSE # "$(PRODUCT)"!="" -CFLAGSOPT= # no optimizing for non products -.ENDIF # "$(PRODUCT)"!="" -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWARNCC=-Wall -Wextra -Wendif-labels -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \ - -Wno-non-virtual-dtor -CFLAGSWALLCC=$(CFLAGSWARNCC) -CFLAGSWALLCXX=$(CFLAGSWARNCXX) -CFLAGSWERRCC=-Werror - -# Once all modules on this platform compile without warnings, set -# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see -# settings.mk): - -MODULES_WITH_WARNINGS := \ - extensions \ - soldep \ - slideshow \ - svtools \ - svx - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) - -# default linker flags -LINKFLAGSDEFS*=-Wl,-z,defs -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGSRUNPATH_NONE= -LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec - -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -# linker flags for optimization (symbol hashtable) -# for now, applied to symbol scoped libraries, only -LINKFLAGSOPTIMIZE*=-Wl,-O1 -LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -# libraries for linking applications -STDLIBGUIMT+=-lX11 -ldl -lpthread -lm -STDLIBCUIMT+=-ldl -lpthread -lm -# libraries for linking shared libraries -STDSHLGUIMT+=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT+=-ldl -lpthread -lm - -LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs +.INCLUDE : unxlng.mk +CFLAGS+=-DIA64 +CFLAGSCXX+=-fno-use-cxa-atexit DLLPOSTFIX=la -DLLPRE=lib -DLLPOST=.so -PCHPOST=.gch - diff --git a/solenv/inc/unxlngi.mk b/solenv/inc/unxlngi.mk new file mode 100644 index 000000000000..dcc2addcd46c --- /dev/null +++ b/solenv/inc/unxlngi.mk @@ -0,0 +1,38 @@ +#************************************************************************* +# +# 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: unxlngi6.mk,v $ +# +# $Revision: 1.48 $ +# +# 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. +# +#************************************************************************* + +# mk file for Unix Linux Intel (X86) using GCC, please make generic modifications to unxlng.mk +CDEFAULTOPT=-Os +ARCH_FLAGS*=-mtune=pentiumpro +.INCLUDE : unxlng.mk +CDEFS+=-DX86 +DLLPOST=.so +DLLPOSTFIX=li diff --git a/solenv/inc/unxlngi4.mk b/solenv/inc/unxlngi4.mk deleted file mode 100644 index 6b192b84fb74..000000000000 --- a/solenv/inc/unxlngi4.mk +++ /dev/null @@ -1,223 +0,0 @@ -#************************************************************************* -# -# 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: unxlngi4.mk,v $ -# -# $Revision: 1.49 $ -# -# 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. -# -#************************************************************************* -# mk file for unxlngi4 -ASM= -AFLAGS= - -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*=-mcpu=pentiumpro - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc -# flags for C and C++ Compiler -CFLAGS+=-fmessage-length=0 -c - -# flags to enable build with symbols; required for crashdump feature -.IF "$(ENABLE_SYMBOLS)"=="SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g -.ENDIF - -# flags for the C++ Compiler -CFLAGSCC= -pipe $(ARCH_FLAGS) -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -CFLAGSCXX= -pipe $(ARCH_FLAGS) - -# HACK: enable Hamburg developers to build on glibc-2.2 machines but compile vs. glibc-2.1 headers -.IF "$(BUILD_SPECIAL)"=="" -CFLAGSCXX+=-include preinclude.h -.ENDIF -PICSWITCH:=-fpic - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -# CFLAGSOPT=-O2 -# reduce to -O1 to avoid optimization problems -CFLAGSOPT=-O1 -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -CFLAGSWARNCC= -.IF "$(PRODUCT)"!="" -CFLAGSWARNCC+=-Wuninitialized # not supported without optimization -.ENDIF -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWALLCC=-Wall -Wextra -Wendif-labels -CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy -CFLAGSWERRCC=-Werror - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) - -# default linker flags -LINKFLAGSDEFS*=-Wl,-z,defs -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGSRUNPATH_NONE= -LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec - -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -# linker flags for optimization (symbol hashtable) -# for now, applied to symbol scoped libraries, only -LINKFLAGSOPTIMIZE*=-Wl,-O1 -LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -.IF "$(ALLOC)" == "TCMALLOC" -STDLIBGUIMT+=-ltcmalloc -STDLIBCUIMT+=-ltcmalloc -STDSHLGUIMT+=-ltcmalloc -STDSHLCUIMT+=-ltcmalloc -.ENDIF - -# libraries for linking applications -STDLIBGUIMT+=-lX11 -ldl -lpthread -lm -STDLIBCUIMT+=-ldl -lpthread -lm -# libraries for linking shared libraries -STDSHLGUIMT+=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT+=-ldl -lpthread -lm - -LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive - -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++ -LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++ -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF - -#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs -DLLPOSTFIX=li -DLLPRE=lib -DLLPOST=.so - diff --git a/solenv/inc/unxlngm68k.mk b/solenv/inc/unxlngm68k.mk index 91c0a24c2304..a206d61543b2 100644 --- a/solenv/inc/unxlngm68k.mk +++ b/solenv/inc/unxlngm68k.mk @@ -29,194 +29,13 @@ # #************************************************************************* -# mk file for unxlngm68k -ASM= -AFLAGS= +# mk file for Unix Linux m68k using GCC, please make generic modifications to unxlng.mk -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DM68K -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc -.IF "$(SYSBASE)"!="" -CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include -CXX+:=$(CFLAGS_SYSBASE) -CC+:=$(CFLAGS_SYSBASE) -.ENDIF # "$(SYSBASE)"!="" -CFLAGS+=-Wreturn-type -fmessage-length=0 -c -# flags to enable build with symbols; required for crashdump feature -.IF "$(ENABLE_SYMBOLS)"=="SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta - -.ENDIF - -CFLAGS+=-fsigned-char -fno-omit-frame-pointer -# flags for the C++ Compiler -CFLAGSCC= -fsigned-char -pipe $(ARCH_FLAGS) -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -CFLAGSCXX= -fsigned-char -pipe $(ARCH_FLAGS) -CFLAGSCXX+= -Wno-ctor-dtor-privacy -CFLAGSCXX+= -fno-use-cxa-atexit +CDEFAULTOPT=-Os PICSWITCH:=-fPIC -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CFLAGSCXX += -fvisibility-inlines-hidden -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -.IF "$(PRODUCT)"!="" -CFLAGSOPT=-O2 -fno-strict-aliasing # optimizing for products -CFLAGSOPT+=-Wuninitialized # not supported without optimization -.ELSE # "$(PRODUCT)"!="" -CFLAGSOPT= # no optimizing for non products -.ENDIF # "$(PRODUCT)"!="" -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o -# Enable all warnings -CFLAGSWALL=-Wall -# Set default warn level -CFLAGSDFLTWARN= - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) - -# default linker flags -#LINKFLAGSDEFS*=-Wl,-z,defs -#but got some undefined unwind problem with defs -LINKFLAGSDEFS!= -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -# linker flags for optimization (symbol hashtable) -# for now, applied to symbol scoped libraries, only -LINKFLAGSOPTIMIZE*=-Wl,-O1 -LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -# libraries for linking applications -STDLIBGUIMT=-lX11 -ldl -lpthread -lm -STDLIBCUIMT=-ldl -lpthread -lm -# libraries for linking shared libraries -STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT=-ldl -lpthread -lm - -LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive - -.IF "$(USE_STLP_DEBUG)" != "" -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug -LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC) -.ELSE # "$(USE_STLP_DEBUG)" != "" -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport -LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF -.ENDIF # "$(USE_STLP_DEBUG)" != "" - -#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs +.INCLUDE : unxlng.mk +CDEFS+=-DM68K +CFLAGS+=-fsigned-char -fno-omit-frame-pointer +CFLAGSCC+=-fsigned-char +CFLAGSCXX+=-fsigned-char -fno-use-cxa-atexit DLLPOSTFIX=lm -DLLPRE=lib -DLLPOST=.so diff --git a/solenv/inc/unxlngmips.mk b/solenv/inc/unxlngmips.mk index 258d0677267c..c4510ecb5738 100644 --- a/solenv/inc/unxlngmips.mk +++ b/solenv/inc/unxlngmips.mk @@ -29,237 +29,9 @@ # #************************************************************************* -# mk file for unxlngmips -ASM= -AFLAGS= +# mk file for Unix Linux Mips using GCC, please make generic modifications to unxlng.mk -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DMIPS -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -#ARCH_FLAGS*=-mtune=pentiumpro - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc -.IF "$(SYSBASE)"!="" -CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include -CXX+:=$(CFLAGS_SYSBASE) -CC+:=$(CFLAGS_SYSBASE) -.ENDIF # "$(SYSBASE)"!="" -CFLAGS+=-fmessage-length=0 -c - -# flags to enable build with symbols; required for crashdump feature -.IF "$(ENABLE_SYMBOLS)"=="SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta - -.ENDIF - -# flags for the C++ Compiler -CFLAGSCC= -pipe $(ARCH_FLAGS) -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -# -fpermissive should be removed as soon as possible -CFLAGSCXX= -pipe $(ARCH_FLAGS) -PICSWITCH:=-fpic -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CFLAGSCXX += -fvisibility-inlines-hidden -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# Compiler flags for compiling static object in single threaded environment with graphical user interface -CFLAGSOBJGUIST= -# Compiler flags for compiling static object in single threaded environment with character user interface -CFLAGSOBJCUIST= -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -.IF "$(PRODUCT)"!="" -CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products -.ELSE # "$(PRODUCT)"!="" -CFLAGSOPT= # no optimizing for non products -.ENDIF # "$(PRODUCT)"!="" -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWARNCC=-Wall -Wextra -Wendif-labels -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \ - -Wno-non-virtual-dtor -CFLAGSWALLCC=$(CFLAGSWARNCC) -CFLAGSWALLCXX=$(CFLAGSWARNCXX) -CFLAGSWERRCC=-Werror - -# Once all modules on this platform compile without warnings, set -# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see -# settings.mk): -MODULES_WITH_WARNINGS := \ - b_server \ - basctl \ - basebmp \ - chart2 \ - cppcanvas \ - desktop \ - devtools \ - dxcanvas \ - extensions \ - filter \ - glcanvas \ - lingu \ - r_tools \ - sc \ - sd \ - slideshow \ - starmath \ - svx \ - sw \ - writerperfect \ - xmlsecurity - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) - -# default linker flags -LINKFLAGSDEFS*=-Wl,-z,defs -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGSRUNPATH_NONE= -LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec - -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -# linker flags for optimization (symbol hashtable) -# for now, applied to symbol scoped libraries, only -LINKFLAGSOPTIMIZE*=-Wl,-O1 -LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -.IF "$(ALLOC)" == "TCMALLOC" -STDLIBCUIST+=-ltcmalloc -STDLIBGUIMT+=-ltcmalloc -STDLIBCUIMT+=-ltcmalloc -STDLIBGUIST+=-ltcmalloc -STDSHLGUIMT+=-ltcmalloc -STDSHLCUIMT+=-ltcmalloc -STDSHLGUIST+=-ltcmalloc -STDSHLCUIST+=-ltcmalloc -.ENDIF - -# libraries for linking applications -STDLIBCUIST+=-ldl -lm -STDLIBGUIMT+=-lX11 -lXau -ldl -lpthread -lm -STDLIBCUIMT+=-ldl -lpthread -lm -STDLIBGUIST+=-lX11 -lXau -ldl -lm -# libraries for linking shared libraries -STDSHLGUIMT+=-lX11 -lXau -lXext -ldl -lpthread -lm -STDSHLCUIMT+=-ldl -lpthread -lm -STDSHLGUIST+=-lX11 -lXau -lXext -ldl -lm -STDSHLCUIST+=-ldl -lm - -LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive - -.IF "$(USE_STLP_DEBUG)" != "" -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug -LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC) -.ELSE # "$(USE_STLP_DEBUG)" != "" -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF # "$(USE_STLP_DEBUG)" != "" - -#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs +CDEFAULTOPT=-Os +.INCLUDE : unxlng.mk +CDEFS+=-DMIPS DLLPOSTFIX=lm -DLLPRE=lib -DLLPOST=.so - diff --git a/solenv/inc/unxlngp.mk b/solenv/inc/unxlngp.mk deleted file mode 100644 index 9ab0dbab9944..000000000000 --- a/solenv/inc/unxlngp.mk +++ /dev/null @@ -1,157 +0,0 @@ -#************************************************************************* -# -# 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: unxlngp.mk,v $ -# -# $Revision: 1.13 $ -# -# 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. -# -#************************************************************************* - -# mak file for unxlngp -ASM= -AFLAGS= - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DGLIBC=2 -CDEFS+=-D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE -CDEFS+=-DNO_INET_ON_DEMAND -DX86 -DNEW_SOLAR - -# kann c++ was c braucht?? - -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -CXX*=g++ -CC*=gcc -CFLAGS=-nostdinc -c -CFLAGSCC= -pipe $(ARCH_FLAGS) -CFLAGSCXX= -pipe -fguiding-decls -fno-rtti -fno-exceptions $(ARCH_FLAGS) - -# Exceptions increase the size of shared libraries by 50% !! -.IF "$(PRJNAME)"=="usr" || "$(PRJNAME)"=="uno" || "$(PRJNAME)"=="starone" || "$(PRJNAME)"=="schedule" || "$(PRJNAME)"=="one" || "$(SET_EXEPTIONS)"!="" -CFLAGSCXX += -fexceptions -.ENDIF -PICSWITCH:=-fPIC -#STDOBJVCL=$(L)/salmain.o -CFLAGSOBJGUIMT= -CFLAGSOBJCUIMT= -CFLAGSSLOGUIMT=$(PICSWITCH) -CFLAGSSLOCUIMT=$(PICSWITCH) -CFLAGSPROF= -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -CFLAGSOPT=-O2 -CFLAGSNOOPT= -CFLAGSOUTOBJ=-o - -CFLAGSWARNCC= -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWALLCC=-Wall -Wextra -Wendif-labels -CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy -CFLAGSWERRCC=-Werror - -STATIC = -Bstatic -DYNAMIC = -Bdynamic - -LINK=ld -LINKFLAGS=-melf_i386 -z nodefs -dynamic-linker /lib/ld-linux.so.2 /nw386/dev/s/solenv/unxlngp/usr/lib/crti.o /nw386/dev/s/solenv/unxlngp/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.90.29/crtbegin.o -LINKFLAGSAPPGUI=/usr/lib/crt1.o -LINKFLAGSSHLGUI=-noinhibit-exec -warn-once -G -LINKFLAGSAPPCUI=/usr/lib/crt1.o -LINKFLAGSSHLCUI=-noinhibit-exec -warn-once -G -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -.IF "$(NO_BSYMBOLIC)"=="" -.IF "$(PRJNAME)" != "envtest" -LINKFLAGSSHLGUI+=-Bsymbolic -LINKFLAGSSHLCUI+=-Bsymbolic -.ENDIF -.ENDIF # "$(NO_BSYMBOLIC)"=="" - -SONAME_SWITCH=-Wl,-h - -# reihenfolge der libs NICHT egal! - -# standard C++ Library -# -# das statische dazulinken der libstdc++ macht jede shared library um 50k -# (ungestrippt) oder so groesser, auch wenn sie ueberhaupt nicht gebraucht -# wird. Da muessen wir uns was besseres ueberlegen. -# -# Da mit der neuen libc.so.6 (libc-2.0.5.so) sowieso eine System-Library -# ausgeliefert werden muss, linken wir auch die libstdc++.so dynamisch. - -STDLIBCPP=-lstdc++ - -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -STDLIBGUIMT=-Bdynamic -lcrypt -ldl -lpthread -lm -lgcc -lc /nw386/dev/s/solenv/unxlngp/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.90.29/crtend.o /nw386/dev/s/solenv/unxlngp/usr/lib/crtn.o -STDLIBCUIMT=-Bdynamic -lcrypt -ldl -lpthread -lm -lgcc -lc /nw386/dev/s/solenv/unxlngp/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.90.29/crtend.o /nw386/dev/s/solenv/unxlngp/usr/lib/crtn.o -STDSHLGUIMT=-Bdynamic -lX11 -lXext -lcrypt -ldl -lpthread -lm -lgcc -lc /nw386/dev/s/solenv/unxlngp/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.90.29/crtend.o /nw386/dev/s/solenv/unxlngp/usr/lib/crtn.o -STDSHLCUIMT=-Bdynamic -lcrypt -ldl -lpthread -lm -lgcc -lc /nw386/dev/s/solenv/unxlngp/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.90.29/crtend.o /nw386/dev/s/solenv/unxlngp/usr/lib/crtn.o - -LIBMGR=ar -LIBFLAGS=-r -# LIBEXT=.so - -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -.IF "$(WORK_STAMP)"!="LVM364" -.IF "$(WORK_STAMP)"!="MIX364" -DLLPOSTFIX=li -.ENDIF -.ENDIF -DLLPRE=lib -DLLPOST=.so - -LDUMP=cppfilt /b /n /o /p - diff --git a/solenv/inc/unxlngppc.mk b/solenv/inc/unxlngppc.mk index b1ec2b7ae33a..3a7a8058498c 100644 --- a/solenv/inc/unxlngppc.mk +++ b/solenv/inc/unxlngppc.mk @@ -6,9 +6,9 @@ # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: unxlngppc.mk,v $ +# $RCSfile: unxlngppc4.mk,v $ # -# $Revision: 1.30 $ +# $Revision: 1.34 $ # # This file is part of OpenOffice.org. # @@ -29,181 +29,13 @@ # #************************************************************************* -# Makefile for linux-ppc -# Christer Gustavsson <cg@nocrew.org> -ASM= -AFLAGS= +# mk file for Unix Linux PowerPC using GCC, please make generic modifications to unxlng.mk -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) -DPOWERPC -DPPC - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc - -.IF "$(ENABLE_SYMBOLS)" == "SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g -.ENDIF -.IF "$(HAVE_LD_HASH_STYLE)" == "TRUE" -LINKFLAGS += -Wl,--hash-style=both -.ELSE -LINKFLAGS += -Wl,-zdynsort -.ENDIF - -# source code is still not signed versus unsigned char clean -CFLAGS=-fsigned-char -nostdinc -c -CFLAGSCC=-fsigned-char $(ARCH_FLAGS) - -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -CFLAGSCXX= -pipe -frtti $(ARCH_FLAGS) +DEFAULTOPT=-Os PICSWITCH:=-fPIC - -#Note: the build is not consistent in that it links static librtaries -# libraries into dynamic libraries in places, so use -fPIC throughout -# until fixed. - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT=$(PICSWITCH) -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) - -# Compiler flags for profiling -CFLAGSPROF= - -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= - -# Compiler flags for enabling optimizations -CFLAGSOPT=-O2 -fno-schedule-insns -fno-strict-aliasing -fno-schedule-insns2 - -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 - -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -CFLAGSWARNCC= -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWALLCC=-Wall -Wextra -Wendif-labels -CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy -CFLAGSWERRCC=-Werror - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) -# default linker flags -LINKFLAGS=-Wl,-rpath,\''$$ORIGIN'\' - - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -LINKFLAGSAPPCUI= -Wl,-export-dynamic -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -.IF "$(NO_BSYMBOLIC)"=="" -.IF "$(PRJNAME)" != "envtest" -LINKFLAGSSHLGUI+=-Wl,-Bsymbolic -LINKFLAGSSHLCUI+=-Wl,-Bsymbolic -.ENDIF -.ENDIF # "$(NO_BSYMBOLIC)"=="" - -LINKVERSIONMAPFLAG=-Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -# libraries for linking applications -STDLIBGUIMT=-lX11 -ldl -lpthread -lm -STDLIBCUIMT=-ldl -lpthread -lm -# libraries for linking shared libraries -STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT=-ldl -lpthread -lm - -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport -LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs +.INCLUDE : unxlng.mk +CDEFS+=-DPOWERPC -DPPC +CFLAGS+=-fsigned-char +CFLAGSCC+=-fsigned-char +CFLAGSCXX+=-fsigned-char DLLPOSTFIX=lp -DLLPRE=lib -DLLPOST=.so diff --git a/solenv/inc/unxlngppc4.mk b/solenv/inc/unxlngppc4.mk deleted file mode 100644 index a9788c75aba5..000000000000 --- a/solenv/inc/unxlngppc4.mk +++ /dev/null @@ -1,214 +0,0 @@ -#************************************************************************* -# -# 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: unxlngppc4.mk,v $ -# -# $Revision: 1.34 $ -# -# 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. -# -#************************************************************************* -# mk file for linux ppc using gcc 3.X -ASM= -AFLAGS= - -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) -DPOWERPC -DPPC - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc - -CFLAGS+=-fsigned-char -fmessage-length=0 -c - -# flags for the C++ Compiler -CFLAGSCC= -fsigned-char -pipe $(ARCH_FLAGS) - -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs - -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -CFLAGSCXX= -fsigned-char -pipe -frtti $(ARCH_FLAGS) -PICSWITCH:=-fPIC - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT=$(PICSWITCH) -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) - -# Compiler flags for profiling -CFLAGSPROF= - -# Compiler flags for debugging -CFLAGSDEBUG=-g -.IF "$(ENABLE_SYMBOLS)" == "SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g -.ENDIF -CFLAGSDBGUTIL= - -# Compiler flags for enabling optimizations -CFLAGSOPT=-Os -fno-strict-aliasing - -# Compiler flags for disabling optimizations -# don't change - required to work around optimization bugs -CFLAGSNOOPT=-O0 - -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -CFLAGSWARNCC= -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWALLCC=-Wall -Wextra -Wendif-labels -CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy -CFLAGSWERRCC=-Werror - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) - -# default linker flags - -LINKFLAGSDEFS*= -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGSRUNPATH_NONE= -LINKFLAGS= $(LINKFLAGSDEFS) - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec - -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -.IF "$(NO_BSYMBOLIC)"=="" -.IF "$(PRJNAME)" != "envtest" -LINKFLAGSSHLGUI+=-Wl,-Bsymbolic -LINKFLAGSSHLCUI+=-Wl,-Bsymbolic -.ENDIF -.ENDIF # "$(NO_BSYMBOLIC)"=="" - -LINKVERSIONMAPFLAG=-Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -# libraries for linking applications -STDLIBGUIMT=-lX11 -ldl -lpthread -lm -STDLIBCUIMT=-ldl -lpthread -lm -# libraries for linking shared libraries -STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT=-ldl -lpthread -lm - -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++ -LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++ -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF - -#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs -DLLPOSTFIX=lp -DLLPRE=lib -DLLPOST=.so diff --git a/solenv/inc/unxlngppc64.mk b/solenv/inc/unxlngppc64.mk index 08d99211a360..1fa6b8f30e90 100644 --- a/solenv/inc/unxlngppc64.mk +++ b/solenv/inc/unxlngppc64.mk @@ -28,9 +28,11 @@ # for a copy of the LGPLv3 License. # #************************************************************************* -# mk file for linux ppc64, inherit from ppc and add some flags -.INCLUDE : unxlngppc4.mk +# mk file for Unix Linux 64Bit PowerPC using GCC, inherit from ppc and add some flags + +.INCLUDE : unxlngppc.mk CDEFS+=-DPOWERPC64 CFLAGSCXX+=-mminimal-toc +BUILD64=1 diff --git a/solenv/inc/unxlngr.mk b/solenv/inc/unxlngr.mk index 0022f36f3027..8a82cefb0b14 100644 --- a/solenv/inc/unxlngr.mk +++ b/solenv/inc/unxlngr.mk @@ -29,196 +29,11 @@ # #************************************************************************* -# unxlngr.mk for armv4l - -# mk file for unxlngr -ASM= -AFLAGS= - -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DARM32 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc -.IF "$(SYSBASE)"!="" -CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include -CXX+:=$(CFLAGS_SYSBASE) -CC+:=$(CFLAGS_SYSBASE) -.ENDIF # "$(SYSBASE)"!="" -CFLAGS+=-Wreturn-type -fmessage-length=0 -c -# flags to enable build with symbols; required for crashdump feature -.IF "$(ENABLE_SYMBOLS)"=="SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta - -.ENDIF +# mk file for Unix Linux ARM using GCC, please make generic modifications to unxlng.mk +CDEFAULTOPT=-Os +.INCLUDE : unxlng.mk +CDEFS+=-DARM32 CFLAGS+=-fno-omit-frame-pointer -# flags for the C++ Compiler -CFLAGSCC= -pipe $(ARCH_FLAGS) -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -CFLAGSCXX= -pipe $(ARCH_FLAGS) -CFLAGSCXX+= -Wno-ctor-dtor-privacy -CFLAGSCXX+= -fno-use-cxa-atexit -PICSWITCH:=-fpic -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CFLAGSCXX += -fvisibility-inlines-hidden -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -.IF "$(PRODUCT)"!="" -CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products -CFLAGSOPT+=-Wuninitialized # not supported without optimization -.ELSE # "$(PRODUCT)"!="" -CFLAGSOPT= # no optimizing for non products -.ENDIF # "$(PRODUCT)"!="" -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o -# Enable all warnings -CFLAGSWALL=-Wall -# Set default warn level -CFLAGSDFLTWARN= - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) - -# default linker flags -LINKFLAGSDEFS*=-Wl,-z,defs -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGSRUNPATH_NONE= -LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -# linker flags for optimization (symbol hashtable) -# for now, applied to symbol scoped libraries, only -LINKFLAGSOPTIMIZE*=-Wl,-O1 -LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -# libraries for linking applications -STDLIBGUIMT=-lX11 -ldl -lpthread -lm -STDLIBCUIMT=-ldl -lpthread -lm -# libraries for linking shared libraries -STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT=-ldl -lpthread -lm - -LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive - -.IF "$(USE_STLP_DEBUG)" != "" -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug -LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC) -.ELSE # "$(USE_STLP_DEBUG)" != "" -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport -LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF -.ENDIF # "$(USE_STLP_DEBUG)" != "" - -#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs +CFLAGSCXX+=-fno-use-cxa-atexit DLLPOSTFIX=lr -DLLPRE=lib -DLLPOST=.so - diff --git a/solenv/inc/unxlngs.mk b/solenv/inc/unxlngs.mk index 96c64b20632b..1286179659ae 100644 --- a/solenv/inc/unxlngs.mk +++ b/solenv/inc/unxlngs.mk @@ -29,190 +29,12 @@ # #************************************************************************* -# mk file for unxlngs +# mk file for Unix Linux Sparc using GCC, please make generic modifications to unxlng.mk + ASM=$(CC) AFLAGS=-Wa,-K,PIC -c $(CDEFS) - -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DSPARC -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# name of C++ Compiler -#CXX*=g++ -#name of C Compiler -#CC*=gcc - -CFLAGS+=-fmessage-length=0 -c - -# flags to enable build with symbols; required for crashdump feature -.IF "$(ENABLE_SYMBOLS)"=="SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g -.ENDIF -.IF "$(HAVE_LD_HASH_STYLE)" == "TRUE" -LINKFLAGS += -Wl,--hash-style=both -.ELSE -LINKFLAGS += -Wl,-zdynsort -.ENDIF - -# flags for the C++ Compiler -CFLAGSCC= -pipe $(ARCH_FLAGS) -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -CFLAGSCXX= -pipe $(ARCH_FLAGS) - +CDEFAULTOPT=-Os PICSWITCH:=-fPIC - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -.IF "$(PRODUCT)"!="" -CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products -.ELSE # "$(PRODUCT)"!="" -CFLAGSOPT= # no optimizing for non products -.ENDIF # "$(PRODUCT)"!="" -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -CFLAGSWARNCC=-Wreturn-type -.IF "$(PRODUCT)"!="" -CFLAGWARNCC+=-Wuninitialized # not supported without optimization -.ENDIF -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWALLCC=-Wall -Wextra -Wendif-labels -CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy -CFLAGSWERRCC=-Werror - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) - -# default linker flags -LINKFLAGSDEFS*=-Wl,-z,defs -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGSRUNPATH_NONE= -LINKFLAGS=-z combreloc $(LINKFLAGSDEFS) - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec - -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -# linker flags for optimization (symbol hashtable) -# for now, applied to symbol scoped libraries, only -LINKFLAGSOPTIMIZE*=-Wl,-O1 -LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -# libraries for linking applications -STDLIBGUIMT=-lX11 -ldl -lpthread -lm -STDLIBCUIMT=-ldl -lpthread -lm -# libraries for linking shared libraries -STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT=-ldl -lpthread -lm - -LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive - -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport $(STDLIBCPP) -LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc $(STDLIBCPP) -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF - -#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs +.INCLUDE : unxlng.mk +CDEFS+=-DSPARC DLLPOSTFIX=ls -DLLPRE=lib -DLLPOST=.so diff --git a/solenv/inc/unxlngs390.mk b/solenv/inc/unxlngs390.mk new file mode 100644 index 000000000000..303542dc7619 --- /dev/null +++ b/solenv/inc/unxlngs390.mk @@ -0,0 +1,40 @@ +#************************************************************************* +# +# 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: unxlngs3904.mk,v $ +# +# $Revision: 1.22 $ +# +# 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. +# +#************************************************************************* + +# mk file for Unix Linux s390 using GCC, please make generic modifications to unxlng.mk + +PICSWITCH:=-fPIC +.INCLUDE : unxlng.mk +CDEFS+=-DS390 +CFLAGS+=-fsigned-char -fno-omit-frame-pointer +CFLAGSCC+=-fsigned-char +CFLAGSCXX+=-fsigned-char +DLLPOSTFIX=l3 diff --git a/solenv/inc/unxlngs3904.mk b/solenv/inc/unxlngs3904.mk deleted file mode 100644 index d23b23c4a546..000000000000 --- a/solenv/inc/unxlngs3904.mk +++ /dev/null @@ -1,221 +0,0 @@ -#************************************************************************* -# -# 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: unxlngs3904.mk,v $ -# -# $Revision: 1.22 $ -# -# 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. -# -#************************************************************************* - -# mk file for linux s390 -ASM= -AFLAGS= - -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DS390 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc -.IF "$(SYSBASE)"!="" -CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include -CXX+:=$(CFLAGS_SYSBASE) -CC+:=$(CFLAGS_SYSBASE) -.ENDIF # "$(SYSBASE)"!="" -CFLAGS+=-Wreturn-type -fmessage-length=0 -c -# flags to enable build with symbols; required for crashdump feature -.IF "$(ENABLE_SYMBOLS)"=="SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta - -.ENDIF - -CFLAGS+=-fsigned-char -fno-omit-frame-pointer -# flags for the C++ Compiler -CFLAGSCC= -fsigned-char -pipe $(ARCH_FLAGS) -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -CFLAGSCXX= -fsigned-char -pipe $(ARCH_FLAGS) -CFLAGSCXX+= -Wno-ctor-dtor-privacy -CFLAGSCXX+= -fno-use-cxa-atexit -PICSWITCH:=-fPIC -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CFLAGSCXX += -fvisibility-inlines-hidden -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -.IF "$(PRODUCT)"!="" -CFLAGSOPT=-O2 -fno-strict-aliasing # optimizing for products -CFLAGSOPT+=-Wuninitialized # not supported without optimization -.ELSE # "$(PRODUCT)"!="" -CFLAGSOPT= # no optimizing for non products -.ENDIF # "$(PRODUCT)"!="" -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o -# Enable all warnings -CFLAGSWALL=-Wall -# Set default warn level -CFLAGSDFLTWARN= - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) - -# default linker flags -LINKFLAGSDEFS*=-Wl,-z,defs -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGSRUNPATH_NONE= -LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -# linker flags for optimization (symbol hashtable) -# for now, applied to symbol scoped libraries, only -LINKFLAGSOPTIMIZE*=-Wl,-O1 -LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -# libraries for linking applications -STDLIBGUIMT=-lX11 -ldl -lpthread -lm -STDLIBCUIMT=-ldl -lpthread -lm -# libraries for linking shared libraries -STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT=-ldl -lpthread -lm - -LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive - -.IF "$(USE_STLP_DEBUG)" != "" -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug -LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC) -.ELSE # "$(USE_STLP_DEBUG)" != "" -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport -LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF -.ENDIF # "$(USE_STLP_DEBUG)" != "" - -#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs -DLLPOSTFIX=l3 -DLLPRE=lib -DLLPOST=.so diff --git a/solenv/inc/unxlngs390x.mk b/solenv/inc/unxlngs390x.mk index 00556d2aa68e..6a0dfab905c7 100644 --- a/solenv/inc/unxlngs390x.mk +++ b/solenv/inc/unxlngs390x.mk @@ -28,8 +28,10 @@ # for a copy of the LGPLv3 License. # #************************************************************************* -# mk file for linux s390x, inherit from s390 and add some flags -.INCLUDE : unxlngs3904.mk +# mk file for Unix Linux 64bit s390x using GCC, inherit from s390 and add some flags + +.INCLUDE : unxlngs390.mk CDEFS+=-DS390X +BUILD64=1 diff --git a/solenv/inc/unxlngx.mk b/solenv/inc/unxlngx.mk new file mode 100644 index 000000000000..5bb9f5b198b2 --- /dev/null +++ b/solenv/inc/unxlngx.mk @@ -0,0 +1,40 @@ +#************************************************************************* +# +# 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: unxlngx6.mk,v $ +# +# $Revision: 1.19.12.1 $ +# +# 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. +# +#************************************************************************* + +# mk file for Linux Unix X86-64 using GCC, please make generic modifications to unxlng.mk + +.INCLUDE : unxlng.mk +CDEFS+=-DX86_64 +CFLAGSCXX+=-fno-use-cxa-atexit +MODULES_WITH_WARNINGS+=\ + svx +DLLPOSTFIX=lx +BUILD64=1 diff --git a/solenv/inc/unxlngx6.mk b/solenv/inc/unxlngx6.mk deleted file mode 100644 index c49e1c4526c5..000000000000 --- a/solenv/inc/unxlngx6.mk +++ /dev/null @@ -1,254 +0,0 @@ -#************************************************************************* -# -# 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: unxlngx6.mk,v $ -# -# $Revision: 1.19.12.1 $ -# -# 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. -# -#************************************************************************* - -# mk file for unxlngx6 -ASM= -AFLAGS= - -SOLAR_JAVA*= -JAVAFLAGSDEBUG=-g - -# filter for supressing verbose messages from linker -#not needed at the moment -#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DX86_64 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) - -# enable visibility define in "sal/types.h" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# this is a platform with JAVA support -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# name of C++ Compiler -CXX*=g++ -# name of C Compiler -CC*=gcc -.IF "$(SYSBASE)"!="" -CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include -CXX+:=$(CFLAGS_SYSBASE) -CC+:=$(CFLAGS_SYSBASE) -.ENDIF # "$(SYSBASE)"!="" -CFLAGS+=-Wreturn-type -fmessage-length=0 -c -# flags to enable build with symbols; required for crashdump feature -.IF "$(ENABLE_SYMBOLS)"=="SMALL" -CFLAGSENABLESYMBOLS=-g1 -.ELSE -CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta -.ENDIF - -# flags for the C++ Compiler -CFLAGSCC= -pipe $(ARCH_FLAGS) -# Flags for enabling exception handling -CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs -# Flags for disabling exception handling -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -# -fpermissive should be removed as soon as possible -CFLAGSCXX= -pipe $(ARCH_FLAGS) -CFLAGSCXX+= -Wno-ctor-dtor-privacy -CFLAGSCXX+= -fno-use-cxa-atexit -PICSWITCH:=-fpic -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -CFLAGSCXX += -fvisibility-inlines-hidden -.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -.IF "$(PRODUCT)"!="" -CFLAGSOPT=-O2 -fno-strict-aliasing # optimizing for products -CFLAGSOPT+=-Wuninitialized # not supported without optimization -.ELSE # "$(PRODUCT)"!="" -CFLAGSOPT= # no optimizing for non products -.ENDIF # "$(PRODUCT)"!="" -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWARNCC=-Wall -Wextra -Wendif-labels -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \ - -Wno-non-virtual-dtor -CFLAGSWALLCC=$(CFLAGSWARNCC) -CFLAGSWALLCXX=$(CFLAGSWARNCXX) -CFLAGSWERRCC=-Werror - -# Once all modules on this platform compile without warnings, set -# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see -# settings.mk): - -MODULES_WITH_WARNINGS := \ - soldep \ - svx - -# switches for dynamic and static linking -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic - -# name of linker -LINK*=$(CXX) -LINKC*=$(CC) - -# default linker flags -LINKFLAGSDEFS*=-Wl,-z,defs -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' - #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' -LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\' -LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' -LINKFLAGSRUNPATH_OXT= -LINKFLAGSRUNPATH_NONE= -LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) -.IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE" -LINKFLAGS += -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -.ENDIF - -.IF "$(HAVE_LD_HASH_STYLE)" == "TRUE" -LINKFLAGS += -Wl,--hash-style=both -.ELSE -LINKFLAGS += -Wl,-zdynsort -.ENDIF - -# linker flags for linking applications -LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec \ - -Wl,-rpath-link,$(LB):$(SOLARLIBDIR) -LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec \ - -Wl,-rpath-link,$(LB):$(SOLARLIBDIR) - -# linker flags for linking shared libraries -LINKFLAGSSHLGUI= -shared -LINKFLAGSSHLCUI= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -# linker flags for optimization (symbol hashtable) -# for now, applied to symbol scoped libraries, only -LINKFLAGSOPTIMIZE*=-Wl,-O1 -LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script - -SONAME_SWITCH=-Wl,-h - -# Sequence of libs does matter ! - -STDLIBCPP=-lstdc++ - -# default objectfilenames to link -STDOBJVCL=$(L)/salmain.o -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -# libraries for linking applications -STDLIBGUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed -STDLIBCUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed -# libraries for linking shared libraries -STDSHLGUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed -STDSHLCUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed - -X11LINK_DYNAMIC = -lX11 - -LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive - -.IF "$(USE_STLP_DEBUG)" != "" -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlportstlg -LIBSTLPORTST=$(STATIC) -lstlportstlg $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug -LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC) -.ENDIF -.ELSE # "$(USE_STLP_DEBUG)" != "" -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport -LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -.ENDIF -.ENDIF # "$(USE_STLP_DEBUG)" != "" - -#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) - -# name of library manager -LIBMGR=ar -LIBFLAGS=-r - -# tool for generating import libraries -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -# platform specific identifier for shared libs -DLLPOSTFIX=lx -DLLPRE=lib -DLLPOST=.so -PCHPOST=.gch - diff --git a/solenv/inc/unxlnxi.mk b/solenv/inc/unxlnxi.mk deleted file mode 100644 index 07b136fde663..000000000000 --- a/solenv/inc/unxlnxi.mk +++ /dev/null @@ -1,177 +0,0 @@ -#************************************************************************* -# -# 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: unxlnxi.mk,v $ -# -# $Revision: 1.13 $ -# -# 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. -# -#************************************************************************* -# mak file fuer unxlnxi -ASM= -AFLAGS= - -# _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -CDEFS+=-D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE -CDEFS+=-DNO_INET_ON_DEMAND -DX86 -DNEW_SOLAR - -# kann c++ was c braucht?? - -.IF "$(SOLAR_JAVA)"!="" -JAVADEF=-DSOLAR_JAVA -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*=-mpentium - -CXX*=g++ -CC*=gcc -.IF "$(GLIBC)"=="2" -CFLAGS=-c -I. -I$(INC) -I$(INCLOCAL) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) -.ELSE -CFLAGS=-c -I. -I/usr/solar/inc/pthread_provenzano -I$(INC) -I$(INCLOCAL) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) -.ENDIF -CFLAGSCC=-pipe -fguiding-decls $(ARCH_FLAGS) -CFLAGSCXX=-pipe -fguiding-decls $(ARCH_FLAGS) -PICSWITCH:=-fpic -#STDOBJVCL=$(L)/salmain.o -CFLAGSOBJGUIMT= -CFLAGSOBJCUIMT= -CFLAGSSLOGUIMT=$(PICSWITCH) -CFLAGSSLOCUIMT=$(PICSWITCH) -CFLAGSPROF= -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -CFLAGSOPT=-O2 -CFLAGSNOOPT=-O2 -CFLAGSOUTOBJ=-o - -CFLAGSWARNCC= -CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -# -Wshadow does not work for C with nested uses of pthread_cleanup_push: -CFLAGSWALLCC=-Wall -Wextra -Wendif-labels -CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy -CFLAGSWERRCC=-Werror - -STATIC = -Bstatic -DYNAMIC = -Bdynamic - -LINK=ld -.IF "$(GLIBC)"=="2" -LINKFLAGS=-melf_i386 -z nodefs -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crti.o /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtbegin.o -.ELSE -LINKFLAGS=-melf_i386 -z nodefs -dynamic-linker /lib/ld-linux.so.1 /usr/lib/crti.o /usr/lib/crtbegin.o -lpthread_init -.ENDIF -LINKFLAGSAPPGUI=/usr/lib/crt1.o -LINKFLAGSSHLGUI=-noinhibit-exec -warn-once -Bsymbolic -G -LINKFLAGSAPPCUI=/usr/lib/crt1.o -LINKFLAGSSHLCUI=/usr/lib/crt1.o -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG=-g -LINKFLAGSOPT= - -SONAME_SWITCH=-Wl,-h - -# reihenfolge der libs NICHT egal! - -# standard C++ Library -# -# das statische dazulinken der libstdc++ macht jede shared library um 50k -# (ungestrippt) oder so groesser, auch wenn sie ueberhaupt nicht gebraucht -# wird. Da muessen wir uns was besseres ueberlegen. -# -# Da mit der neuen libc.so.6 (libc-2.0.5.so) sowieso eine System-Library -# ausgeliefert werden muss, linken wir auch die libstdc++.so dynamisch. - -.IF "$(GLIBC)"=="2" -STDLIBCPP=-lstdc++ -.ELSE -STDLIBCPP=-Bstatic -lstdc++ -Bdynamic -.ENDIF - -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= - -.IF "$(WORK_STAMP)=="MIX364" -.IF "$(GLIBC)"=="2" -STDLIBGUIMT=-Bdynamic -lgcc -lm -lc -ldl /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o -STDLIBCUIMT=-Bdynamic -lgcc -lm -lc -ldl /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o -STDSHLGUIMT=-Bdynamic -lX11 -lgcc -lm -lc -ldl /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o -STDSHLCUIMT=-Bdynamic -lgcc -lm -lc -ldl /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o -.ELSE -STDLIBGUIMT=-Bdynamic -lpthread -lgcc -lm -lc -ldl /usr/lib/crtend.o /usr/lib/crtn.o -STDLIBCUIMT=-Bdynamic -lpthread -lgcc -lm -lc -ldl /usr/lib/crtend.o /usr/lib/crtn.o -STDSHLGUIMT=-Bdynamic -lX11 -lpthread -lgcc -lm -lc -ldl /usr/lib/crtend.o /usr/lib/crtn.o -STDSHLCUIMT=-Bdynamic -lpthread -lgcc -lm -lc -ldl /usr/lib/crtend.o /usr/lib/crtn.o -.ENDIF -.ELSE -.IF "$(GLIBC)"=="2" -STDLIBGUIMT=-Bdynamic -lgcc -lm -lc -ldl /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o -STDLIBCUIMT=-Bdynamic -lgcc -lm -lc -ldl /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o -STDSHLGUIMT=-Bdynamic -lX11 -lm -lc -ldl /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o -STDSHLCUIMT=-Bdynamic -lm -lc -ldl /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o -.ELSE -STDLIBGUIMT=-Bdynamic -lpthread -lgcc -lm -lc -ldl /usr/lib/crtend.o /usr/lib/crtn.o -STDLIBCUIMT=-Bdynamic -lpthread -lgcc -lm -lc -ldl /usr/lib/crtend.o /usr/lib/crtn.o -STDSHLGUIMT=-Bdynamic -lX11 -lpthread -lgcc -lm -lc -ldl /usr/lib/crtend.o /usr/lib/crtn.o -STDSHLCUIMT=-Bdynamic -lpthread -lgcc -lm -lc -ldl /usr/lib/crtend.o /usr/lib/crtn.o -.ENDIF -.ENDIF - -LIBMGR=ar -LIBFLAGS=-r -# LIBEXT=.so - -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC=irc -RCFLAGS=-fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -.IF "$(WORK_STAMP)"!="LVM364" -.IF "$(WORK_STAMP)"!="MIX364" -DLLPOSTFIX=li -.ENDIF -.ENDIF -DLLPRE=lib -DLLPOST=.so - -LDUMP=cppfilt /b /n /o /p - diff --git a/solenv/inc/unxmacxi.mk b/solenv/inc/unxmacxi.mk index c843d24e7c82..6d27121366e5 100644 --- a/solenv/inc/unxmacxi.mk +++ b/solenv/inc/unxmacxi.mk @@ -52,5 +52,12 @@ CFLAGSENABLESYMBOLS=-g1 .ELSE CFLAGSENABLESYMBOLS=-g .ENDIF + +.IF "$(SNOW_LEOPARD_10_4)"!="" +JAVACOMPILER+=-target 1.5 +DYLD_INSERT_LIBRARIES=/usr/lib/libsqlite3.dylib +.EXPORT: DYLD_INSERT_LIBRARIES +.ENDIF # "$(SNOW_LEOPARD_10_4)"!="" + # Include generic Mac OS X makefile .INCLUDE : unxmacx.mk diff --git a/solenv/inc/unxsolu4.mk b/solenv/inc/unxsolu4.mk index af4b7d41c393..02459ad91d5d 100644 --- a/solenv/inc/unxsolu4.mk +++ b/solenv/inc/unxsolu4.mk @@ -240,3 +240,5 @@ LINKFLAGSAPPGUI+= LINKFLAGSSHLGUI+= LINKFLAGSAPPCUI+= LINKFLAGSSHLCUI+= + +BUILD64=1 diff --git a/solenv/inc/wnt.mk b/solenv/inc/wnt.mk index b56cfc7c2f8a..6acab30cc80d 100644 --- a/solenv/inc/wnt.mk +++ b/solenv/inc/wnt.mk @@ -43,8 +43,8 @@ .ENDIF # "$(COMEX)" == "10" .ENDIF # "$(OS)$(COM)$(CPU)" == "WNTMSCI" -.IF "$(COM)$(CVER)$(OS)$(CPU)" == "GCCC341WNTI" -.INCLUDE : wntgcci6.mk +.IF "$(COM)$(OS)$(CPU)" == "GCCWNTI" +.INCLUDE : wntgcci.mk .ENDIF # --- changes for W32-tcsh - should move into settings.mk --- diff --git a/solenv/inc/wntgcci6.mk b/solenv/inc/wntgcci.mk index a46c9a0a3916..b45b659d5f84 100644 --- a/solenv/inc/wntgcci6.mk +++ b/solenv/inc/wntgcci.mk @@ -29,7 +29,7 @@ # #************************************************************************* -# mk file for wntgcci6 +# mk file for Window Intel using GCC SOLAR_JAVA*=TRUE FULL_DESK=TRUE @@ -59,8 +59,8 @@ CFLAGS_NO_EXCEPTIONS=-fno-exceptions PICSWITCH:= CFLAGS_CREATE_PCH=-x c++-header -I$(INCPCH) -DPRECOMPILED_HEADERS -CFLAGS_USE_PCH=-I$(SLO)/pch -DPRECOMPILED_HEADERS -Winvalid-pch -CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch +CFLAGS_USE_PCH=-I$(SLO)$/pch -DPRECOMPILED_HEADERS -Winvalid-pch +CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)$/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch CFLAGSOBJGUIST= CFLAGSOBJCUIST= @@ -116,16 +116,16 @@ LINKC*=$(CC) CYGLIB=$(LIB:s/;/ -L/) LINKFLAGS=-nostdlib -Wl,--enable-stdcall-fixup,--enable-runtime-pseudo-reloc -L$(CYGLIB) .IF "$(USE_MINGW)"=="cygwin" -MINGWLIBDIR=$(COMPATH)/lib/mingw +MINGWLIBDIR=$(COMPATH)$/lib$/mingw .ELSE -MINGWLIBDIR=$(COMPATH)/lib +MINGWLIBDIR=$(COMPATH)$/lib .ENDIF -MINGWSSTDOBJ=$(MINGW_CLIB_DIR)/crtbegin.o -MINGWSSTDENDOBJ=$(MINGW_CLIB_DIR)/crtend.o -LINKFLAGSAPPGUI=-mwindows $(MINGWLIBDIR)/crt2.o -LINKFLAGSSHLGUI=--warn-once -mwindows -shared $(MINGWLIBDIR)/dllcrt2.o -LINKFLAGSAPPCUI=-mconsole $(MINGWLIBDIR)/crt2.o -LINKFLAGSSHLCUI=--warn-once -mconsole -shared $(MINGWLIBDIR)/dllcrt2.o +MINGWSSTDOBJ=$(MINGW_CLIB_DIR)$/crtbegin.o +MINGWSSTDENDOBJ=$(MINGW_CLIB_DIR)$/crtend.o +LINKFLAGSAPPGUI=-mwindows $(MINGWLIBDIR)$/crt2.o +LINKFLAGSSHLGUI=--warn-once -mwindows -shared $(MINGWLIBDIR)$/dllcrt2.o +LINKFLAGSAPPCUI=-mconsole $(MINGWLIBDIR)$/crt2.o +LINKFLAGSSHLCUI=--warn-once -mconsole -shared $(MINGWLIBDIR)$/dllcrt2.o LINKFLAGSTACK= LINKFLAGSPROF= LINKFLAGSDEBUG=-g @@ -148,7 +148,7 @@ MINGW_LIBGCC=-lgcc_eh -lgcc MINGW_LIBGCC=-lgcc .ENDIF .ENDIF -STDOBJVCL=$(L)/salmain.obj +STDOBJVCL=$(L)$/salmain.obj STDOBJGUI= STDSLOGUI= STDOBJCUI= @@ -194,7 +194,7 @@ SHELL32LIB=-lshell32 GDI32LIB=-lgdi32 OLE32LIB=-lole32 OLEAUT32LIB=-loleaut32 -UUIDLIB=$(PSDK_HOME)/lib/uuid.lib +UUIDLIB=$(PSDK_HOME)$/lib$/uuid.lib WINSPOOLLIB=-lwinspool IMM32LIB=-limm32 VERSIONLIB=-lversion @@ -207,14 +207,14 @@ USER32LIB=-luser32 LIBCMT=-lmsvcrt COMDLG32LIB=-lcomdlg32 COMCTL32LIB=-lcomctl32 -CRYPT32LIB=$(PSDK_HOME)/lib/crypt32.lib -GDIPLUSLIB=$(PSDK_HOME)/lib/gdiplus.lib -DBGHELPLIB=$(PSDK_HOME)/lib/dbghelp.lib -MSILIB=$(PSDK_HOME)/lib/msi.lib +CRYPT32LIB=$(PSDK_HOME)$/lib$/crypt32.lib +GDIPLUSLIB=$(PSDK_HOME)$/lib$/gdiplus.lib +DBGHELPLIB=$(PSDK_HOME)$/lib$/dbghelp.lib +MSILIB=$(PSDK_HOME)$/lib$/msi.lib DDRAWLIB=$(DIRECTXSDK_LIB)/ddraw.lib -SHLWAPILIB=$(PSDK_HOME)/lib/shlwapi.lib -URLMONLIB=$(PSDK_HOME)/lib/urlmon.lib -UNICOWSLIB=$(PSDK_HOME)/lib/unicows.lib +SHLWAPILIB=$(PSDK_HOME)$/lib$/shlwapi.lib +URLMONLIB=$(PSDK_HOME)$/lib$/urlmon.lib +UNICOWSLIB=$(PSDK_HOME)$/lib$/unicows.lib WININETLIB=-lwininet OLDNAMESLIB=-lmoldname -MSIMG32LIB=$(PSDK_HOME)/lib/msimg32.lib +MSIMG32LIB=$(PSDK_HOME)$/lib$/msimg32.lib diff --git a/stlport/systemstl/functional b/stlport/systemstl/functional index 6fb7e66330f6..232cddbef5ad 100644 --- a/stlport/systemstl/functional +++ b/stlport/systemstl/functional @@ -32,30 +32,33 @@ #define SYSTEM_STL_FUNCTIONAL #ifdef GCC -#ifdef __MINGW32__ +# ifdef __MINGW32__ # define _SYSTEM_STL_MAKE_HEADER(path,header) <path/header> # include _SYSTEM_STL_MAKE_HEADER(GXX_INCLUDE_PATH,functional) -#else +# else # include <ext/../functional> -#endif -#include <ext/functional> +# endif +# include <ext/functional> namespace std { - using __gnu_cxx::select1st; - using __gnu_cxx::select2nd; using __gnu_cxx::project1st; using __gnu_cxx::project2nd; - using __gnu_cxx::unary_compose; - using __gnu_cxx::binary_compose; + using __gnu_cxx::select1st; + using __gnu_cxx::select2nd; using __gnu_cxx::compose1; using __gnu_cxx::compose2; + using __gnu_cxx::unary_compose; + using __gnu_cxx::binary_compose; +# ifndef __GXX_EXPERIMENTAL_CXX0X__ using __gnu_cxx::identity; using __gnu_cxx::mem_fun1; using __gnu_cxx::mem_fun1_ref; +# endif } + #else -#error UNSUPPORTED COMPILER +# error UNSUPPORTED COMPILER #endif #endif diff --git a/stlport/systemstl/hash_map b/stlport/systemstl/hash_map index e855427f2c67..b969b11b211b 100644 --- a/stlport/systemstl/hash_map +++ b/stlport/systemstl/hash_map @@ -31,11 +31,14 @@ #ifndef SYSTEM_STL_HASHMAP #define SYSTEM_STL_HASHMAP -#define _BACKWARD_BACKWARD_WARNING_H 1 -#include <ext/hash_map> -#undef _BACKWARD_BACKWARD_WARNING_H - #ifdef GCC + +# include <functional> + +# define _BACKWARD_BACKWARD_WARNING_H 1 +# include <ext/hash_map> +# undef _BACKWARD_BACKWARD_WARNING_H + namespace __gnu_cxx { template<> struct hash < std::string > @@ -62,14 +65,18 @@ namespace __gnu_cxx } }; } + namespace std { +# ifndef __GXX_EXPERIMENTAL_CXX0X__ using __gnu_cxx::hash; +# endif using __gnu_cxx::hash_map; using __gnu_cxx::hash_multimap; } + #else -#error UNSUPPORTED COMPILER +# error UNSUPPORTED COMPILER #endif diff --git a/stlport/systemstl/hash_set b/stlport/systemstl/hash_set index 35ceccad40d1..89c4b51853dd 100644 --- a/stlport/systemstl/hash_set +++ b/stlport/systemstl/hash_set @@ -31,21 +31,25 @@ #ifndef SYSTEM_STL_HASHSET #define SYSTEM_STL_HASHSET -#define _BACKWARD_BACKWARD_WARNING_H 1 -#include <ext/hash_set> -#undef _BACKWARD_BACKWARD_WARNING_H - #ifdef GCC + +# include <functional> + +# define _BACKWARD_BACKWARD_WARNING_H 1 +# include <ext/hash_set> +# undef _BACKWARD_BACKWARD_WARNING_H + namespace std { +# ifndef __GXX_EXPERIMENTAL_CXX0X__ using __gnu_cxx::hash; +# endif using __gnu_cxx::hash_set; using __gnu_cxx::hash_multiset; } #else -#error UNSUPPORTED COMPILER +# error UNSUPPORTED COMPILER #endif - #endif /* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/stlport/systemstl/numeric b/stlport/systemstl/numeric index d18328bc5363..5ea17ad0758a 100644 --- a/stlport/systemstl/numeric +++ b/stlport/systemstl/numeric @@ -32,22 +32,24 @@ #define SYSTEM_STL_NUMERIC #ifdef GCC -#include <functional> -#ifdef __MINGW32__ +# include <functional> +# ifdef __MINGW32__ # define _SYSTEM_STL_MAKE_HEADER(path,header) <path/header> # include _SYSTEM_STL_MAKE_HEADER(GXX_INCLUDE_PATH,numeric) -#else +# else # include <ext/../numeric> -#endif -#include <ext/numeric> +# endif +# include <ext/numeric> +# ifndef __GXX_EXPERIMENTAL_CXX0X__ namespace std { using __gnu_cxx::iota; } +# endif #else -#error UNSUPPORTED COMPILER +# error UNSUPPORTED COMPILER #endif #endif diff --git a/stlport/systemstl/rope b/stlport/systemstl/rope index 6441d9549988..c6349947ca7b 100644 --- a/stlport/systemstl/rope +++ b/stlport/systemstl/rope @@ -33,9 +33,11 @@ #include <functional> #include <numeric> -#include <ext/rope> #ifdef GCC + +#include <ext/rope> + namespace std { using __gnu_cxx::rope; diff --git a/stlport/systemstl/slist b/stlport/systemstl/slist index 27a46f9b23c1..48a37c2fd512 100644 --- a/stlport/systemstl/slist +++ b/stlport/systemstl/slist @@ -31,9 +31,10 @@ #ifndef SYSTEM_STL_SLIST #define SYSTEM_STL_SLIST +#ifdef GCC + #include <ext/slist> -#ifdef GCC namespace std { using __gnu_cxx::slist; |