summaryrefslogtreecommitdiff
path: root/soldep/bootstrp
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-04 15:28:09 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-04 15:28:09 +0000
commit556700afe502d4ed08af820d451d8d0a0fbfe022 (patch)
tree976d62c2446c871bac8f74b06a9953c60afb6525 /soldep/bootstrp
parent3e9f07d28403a7b5cce8b831b57e757be1947aa7 (diff)
CWS-TOOLING: integrate CWS bserver46
2009-05-19 18:25:49 +0200 kz r272093 : #159768# fixes 2009-05-18 16:17:53 +0200 kz r272031 : #i10000# define mac specials 2009-05-18 16:14:03 +0200 kz r272030 : #159768# allow a seperate directory for each module 2009-05-08 19:44:40 +0200 kz r271730 : #159767# handle .link projects
Diffstat (limited to 'soldep/bootstrp')
-rw-r--r--soldep/bootstrp/XmlBuildList.cxx4
-rw-r--r--soldep/bootstrp/prj.cxx59
2 files changed, 47 insertions, 16 deletions
diff --git a/soldep/bootstrp/XmlBuildList.cxx b/soldep/bootstrp/XmlBuildList.cxx
index f15b94a54536..670a3eb7f771 100644
--- a/soldep/bootstrp/XmlBuildList.cxx
+++ b/soldep/bootstrp/XmlBuildList.cxx
@@ -75,8 +75,10 @@ static void dl_init(pTHX)
targ=sv_newmortal();
FREETMPS;
/* end Dynamic bootstrapping code */
- *file=0;
+#ifdef MACOSX
+ *file=0; // how does this works???
sp=0;
+#endif
}
FullByteStringList::FullByteStringList()
diff --git a/soldep/bootstrp/prj.cxx b/soldep/bootstrp/prj.cxx
index af03557704c2..c6a0fedd12b4 100644
--- a/soldep/bootstrp/prj.cxx
+++ b/soldep/bootstrp/prj.cxx
@@ -1233,14 +1233,25 @@ void Star::UpdateFileList( GenericInformationList *pStandLst, ByteString &rVersi
sSourceRoot = aEntry.GetFull();
GenericInformationList *pProjects = pProjectsKey->GetSubList();
if ( pProjects ) {
- for ( ULONG k = 0; k < pProjects->Count(); k++ ) {
- ByteString sProject( *pProjects->GetObject( k ));
+ GenericInformation * pProject = pProjects->First();
+ while (pProject) {
+ String sLocalSourceRoot = sSourceRoot;
+ ByteString sProject( *pProject );
String ssProject( sProject, RTL_TEXTENCODING_ASCII_US );
- String aBuildListPath = CreateFileName(ssProject);
+ ByteString aDirStr ("Directory");
+ GenericInformation * pDir = pProject->GetSubInfo (aDirStr);
+ if (pDir) {
+ ByteString aDir = pDir->GetValue();
+ DirEntry aRootEntry = aEntry.GetPath() + DirEntry(aDir);
+ sLocalSourceRoot = aRootEntry.GetFull();
+ }
+
+ String aBuildListPath = CreateFileName(ssProject, sLocalSourceRoot);
pFileList->Insert( new String( aBuildListPath ), LIST_APPEND );
ByteString sFile( aBuildListPath, RTL_TEXTENCODING_ASCII_US );
+ pProject = pProjects->Next();
}
}
}
@@ -1483,7 +1494,7 @@ void Star::Read( SolarFileList *pSolarFiles )
}
/*****************************************************************************/
-String Star::CreateFileName( String sProject )
+String Star::CreateFileName( String& rProject, String& rSourceRoot )
/*****************************************************************************/
{
// this method is used to find solarlist parts of nabours (other projects)
@@ -1491,14 +1502,20 @@ String Star::CreateFileName( String sProject )
String sBuildList( String::CreateFromAscii( "build.lst" ));
String sXmlBuildList( String::CreateFromAscii( "build.xlist" ));
- DirEntry aEntry( sSourceRoot );
- aEntry += DirEntry( sProject );
+ DirEntry aEntry( rSourceRoot );
+ aEntry += DirEntry( rProject );
// if this project not exists, maybe it's a not added project of a CWS
- aEntry.SetExtension(String::CreateFromAscii( "lnk" ));
- if ( !aEntry.Exists() )
- aEntry.CutExtension();
+ if ( !aEntry.Exists() ) {
+ aEntry.SetExtension(String::CreateFromAscii( "lnk" ));
+ if ( !aEntry.Exists() )
+ aEntry.CutExtension();
+
+ aEntry.SetExtension(String::CreateFromAscii( "link" ));
+ if ( !aEntry.Exists() )
+ aEntry.CutExtension();
+ }
aEntry += DirEntry( sPrjDir );
@@ -1511,7 +1528,7 @@ String Star::CreateFileName( String sProject )
if (aPossibleEntry.Exists()) {
aActualEntry = aPossibleEntry;
} else if ( !aActualEntry.Exists() && aDBNotFoundHdl.IsSet())
- aDBNotFoundHdl.Call( &sProject );
+ aDBNotFoundHdl.Call( &rProject );
return aActualEntry.GetFull();
}
@@ -1520,7 +1537,7 @@ void Star::InsertSolarList( String sProject )
/*****************************************************************************/
{
// inserts a new solarlist part of another project
- String sFileName_l( CreateFileName( sProject ));
+ String sFileName_l( CreateFileName( sProject, sSourceRoot ));
for ( ULONG i = 0; i < aFileList.Count(); i++ ) {
if (( *aFileList.GetObject( i )) == sFileName_l )
@@ -1733,10 +1750,12 @@ void Star::InsertToken ( char *yytext )
pPrj->HasHardDependencies( bHardDep );
pPrj->HasFixedDependencies( bFixedDep );
+/*
if ( nStarMode == STAR_MODE_RECURSIVE_PARSE ) {
String sItem( aItem, RTL_TEXTENCODING_ASCII_US );
InsertSolarList( sItem );
}
+ */
}
}
break;
@@ -1782,6 +1801,7 @@ void Star::InsertToken ( char *yytext )
i++;
// und wer raeumt die depLst wieder ab ?
+ // CommandData macht das
}
/*****************************************************************************/
@@ -2363,12 +2383,20 @@ StarWriter::StarWriter( XmlBuildList* pXmlBuildListObj, GenericInformationList *
String sPrjDir( String::CreateFromAscii( "prj" ));
String sSolarFile( String::CreateFromAscii( "build.lst" ));
- for ( ULONG k = 0; k < pProjects->Count(); k++ ) {
- ByteString sProject( *pProjects->GetObject( k ));
+ GenericInformation * pProject = pProjects->First();
+ while (pProject) {
+ ByteString sProject( *pProject);
String ssProject( sProject, RTL_TEXTENCODING_ASCII_US );
DirEntry aPrjEntry( aEntry );
+ ByteString aDirStr ("Directory");
+ GenericInformation * pDir = pProject->GetSubInfo (aDirStr);
+ if (pDir) {
+ ByteString aDir = pDir->GetValue();
+ aPrjEntry = aEntry.GetPath() + DirEntry(aDir);
+ }
+
aPrjEntry += DirEntry( ssProject );
aPrjEntry += DirEntry( sPrjDir );
aPrjEntry += DirEntry( sSolarFile );
@@ -2377,6 +2405,7 @@ StarWriter::StarWriter( XmlBuildList* pXmlBuildListObj, GenericInformationList *
ByteString sFile( aPrjEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
fprintf( stdout, "%s\n", sFile.GetBuffer());
+ pProject = pProjects->Next();
}
}
}
@@ -2737,7 +2766,6 @@ void StarWriter::InsertTokenLine ( ByteString& rString )
sClientRestriction = aWhatOS.Copy( aWhatOS.GetToken( 0, ',' ).Len() + 1 );
aWhatOS = aWhatOS.GetToken( 0, ',' );
}
- aWhatOS = aWhatOS.GetToken( 0, ',' );
nOSType = GetOSType (aWhatOS);
}
break;
@@ -2801,14 +2829,15 @@ void StarWriter::InsertTokenLine ( ByteString& rString )
pPrj->AddDependencies( aItem, sMode );
else
pPrj->AddDependencies( aItem );
- pPrj->AddDependencies( aItem );
pPrj->HasHardDependencies( bHardDep );
pPrj->HasFixedDependencies( bFixedDep );
+ /*
if ( nStarMode == STAR_MODE_RECURSIVE_PARSE ) {
String sItem( aItem, RTL_TEXTENCODING_ASCII_US );
InsertSolarList( sItem );
}
+ */
}
}