コード例 #1
0
ファイル: mupdate.c プロジェクト: Azarien/open-watcom-v2
STATIC RET_T isOutOfDate( TARGET *targ, TARGET *deptarg, bool *outofdate )
/*************************************************************************
 * Checks if the current target is out of date
 */
{
    getDate( targ );
    if( targ->existing && targ->attr.existsonly ) {
        return( RET_SUCCESS );
    }
    getDate( deptarg );
    if( targ->existing && deptarg->existing && deptarg->attr.existsonly ) {
        return( RET_SUCCESS );
    }
    if( dateCmp( targ->date, deptarg->date ) < 0 ) {
        *outofdate = true;
        if( Glob.show_offenders ) {
            PrtMsg( INF | WILL_BE_BUILT_BECAUSE_OF,
                targ->node.name, deptarg->node.name);
        }
    }
    if( deptarg->error ) {
       /* one of the targets had an error while being updated
        * abort now
        */
        return( RET_ERROR );
    }
    if( (!deptarg->attr.recheck && deptarg->cmds_done) || deptarg->backdated ) {
        *outofdate = true;
    }
    return( RET_SUCCESS );
}
コード例 #2
0
ファイル: mupdate.c プロジェクト: Azarien/open-watcom-v2
STATIC bool autoDepCompare( time_t targ_time, time_t auto_time )
/**************************************************************/
{
    if( dateCmp( targ_time, auto_time ) < 0 ) {
        return( true );
    }
    return( false );
}
コード例 #3
0
STATIC BOOLEAN autoDepCompare( time_t targ_time, time_t auto_time )
/*****************************************************************/
{
    if( dateCmp( targ_time, auto_time ) < 0 ) {
        return( TRUE );
    }
    return( FALSE );
}
コード例 #4
0
char *GetCurDeps( BOOLEAN younger, BOOLEAN isMacInf )
/**********************************************************/
{
    TLIST           *walk;
    VECSTR          vec;
    BOOLEAN         written;
    TARGET          *targ;
    struct exStack  cur;
    const char      *formattedString;
    char            *ret;

    cur = exGetCurVars();

    // This is for Glob.microsoft and Glob.posix
    // $< and $** are different
    if( isMacInf ) {
        cur.dep = cur.impDep;
    } else {
        if( cur.dep == NULL ) {
            cur.dep = cur.impDep;
        }
    }

    if( (younger && cur.targ == NULL) ||
        cur.dep == NULL || cur.dep->targs == NULL ) {
        return( StrDupSafe( "" ) );
    }

    vec = StartVec();
    written = FALSE;

    walk = cur.dep->targs;
    while( walk != NULL ) {
        targ = walk->target;
        if( !younger || dateCmp( cur.targ->date, targ->date ) < 0 ) {
            if( written ) {
                WriteVec( vec, " " );
            }
            formattedString = procPath( targ->node.name );
            WriteVec( vec, formattedString );
            written = TRUE;
        }
        walk = walk->next;
    }
    ret = FinishVec( vec );

    return( ret );
}
コード例 #5
0
ファイル: mupdate.c プロジェクト: Azarien/open-watcom-v2
char *GetCurDeps( bool younger, bool isMacInf )
/*********************************************/
{
    TLIST           *tlist;
    VECSTR          vec;
    bool            written;
    TARGET          *targ;
    struct exStack  cur;
    const char      *formattedString;
    char            *ret;

    cur = exGetCurVars();

    // This is for Glob.compat_nmake and Glob.compat_posix
    // $< and $** are different
    if( isMacInf ) {
        cur.dep = cur.impDep;
    } else {
        if( cur.dep == NULL ) {
            cur.dep = cur.impDep;
        }
    }

    if( (younger && cur.targ == NULL) ||
        cur.dep == NULL || cur.dep->targs == NULL ) {
        return( StrDupSafe( "" ) );
    }

    vec = StartVec();
    written = false;

    for( tlist = cur.dep->targs; tlist != NULL; tlist = tlist->next ) {
        targ = tlist->target;
        if( !younger || dateCmp( cur.targ->date, targ->date ) < 0 ) {
            if( written ) {
                WriteVec( vec, " " );
            }
            formattedString = procPath( targ->node.name );
            WriteVec( vec, formattedString );
            written = true;
        }
    }
    ret = FinishVec( vec );

    return( ret );
}