From a91e051e123524bf728d0813e57e733cbf690f3d Mon Sep 17 00:00:00 2001 From: cas Date: Thu, 10 Feb 2000 18:01:08 +0000 Subject: [PATCH] No comments --- src/WOKStep/WOKStep_Include.cxx | 42 +++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/src/WOKStep/WOKStep_Include.cxx b/src/WOKStep/WOKStep_Include.cxx index a161bd9..d481452 100755 --- a/src/WOKStep/WOKStep_Include.cxx +++ b/src/WOKStep/WOKStep_Include.cxx @@ -4,10 +4,10 @@ // #ifdef WNT -#include +# include #else -#include -#endif +# include +#endif // WNT #include @@ -34,9 +34,14 @@ # include # include -extern "C" int __declspec( dllimport ) wokCP ( int, char** ); -extern "C" int __declspec( dllimport ) wokCMP ( int, char** ); +extern "C" __declspec( dllimport ) int wokCP ( int, char** ); +extern "C" __declspec( dllimport ) int wokCMP ( int, char** ); +#else +# define WOKStep_Include_SYMLINK 0 +# if !WOKStep_Include_SYMLINK +# include +# endif // !WOKStep_Include_SYMLINK #endif // WNT //======================================================================= @@ -143,7 +148,34 @@ void WOKStep_Include::Execute(const Handle(WOKMake_HSequenceOfInputFile)& tobuil } #ifndef WNT +# if WOKStep_Include_SYMLINK symlink(infile->File()->Path()->Name()->ToCString(), pubincfile->Path()->Name()->ToCString()); +# else + if ( !pubincfile -> Path () -> Exists () || + !pubincfile -> Path () -> IsSameFile ( infile -> File () -> Path () ) + ) { + + OSD_Path pSrc ( infile -> File () -> Path () -> Name () -> String () ); + OSD_File fSrc ( pSrc ); + OSD_Path pDst ( pubincfile -> Path () -> Name () -> String () ); + + fSrc.Copy ( pDst ); + + if ( fSrc.Failed () ) { + + ErrorMsg << "WOKStep_Include :: Execute" + << "failed to copy '" << infile -> File () -> Path () -> Name () + << "' to '" << pubincfile -> Path () -> Name () + << "'" << endm; + + SetFailed (); + + return; + + } // end if + + } // end if +# endif // WOKStep_Incluse_SYMLINK #else Standard_CString CmpArgs[4]; -- 2.39.5