VirtualBox

Changeset 2104 in kBuild


Ignore:
Timestamp:
Nov 26, 2008 1:52:53 AM (16 years ago)
Author:
bird
Message:
kDepIDB: Added a -qquiet switch for disabling harmless warnings about stale files that cannot be found.
Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kDepPre/kDepPre.c

    r2019 r2104  
    465465    if (!i)
    466466    {
    467         depOptimize(fFixCase);
     467        depOptimize(fFixCase, 0 /* fQuiet */);
    468468        fprintf(pOutput, "%s:", pszTarget);
    469469        depPrint(pOutput);
  • trunk/src/kmk/kmkbuiltin/kDepIDB.c

    r2019 r2104  
    780780static void usage(const char *argv0)
    781781{
    782     printf("usage: %s -o <output> -t <target> [-f] [-s] <vc idb-file>\n"
     782    printf("usage: %s -o <output> -t <target> [-fqs] <vc idb-file>\n"
    783783           "   or: %s --help\n"
    784784           "   or: %s --version\n",
     
    800800    /* Argument parsing. */
    801801    int         fInput = 0;             /* set when we've found input argument. */
     802    int         fQuiet = 0;
    802803
    803804    argv0 = argv[0];
     
    818819            if (*psz == '-')
    819820            {
    820                 if (!strcmp(psz, "-help"))
     821                if (!strcmp(psz, "-quiet"))
     822                    psz = "q";
     823                else if (!strcmp(psz, "-help"))
    821824                    psz = "?";
    822825                else if (!strcmp(psz, "-version"))
    823                     psz = "v";
     826                    psz = "V";
    824827            }
    825828
     
    891894
    892895                /*
     896                 * Quiet.
     897                 */
     898                case 'q':
     899                {
     900                    fQuiet = 1;
     901                    break;
     902                }
     903
     904                /*
    893905                 * Generate stubs.
    894906                 */
     
    905917                    usage(argv[0]);
    906918                    return 0;
     919                case 'V':
    907920                case 'v':
    908921                    return kbuild_version(argv[0]);
     
    972985    if (!i)
    973986    {
    974         depOptimize(fFixCase);
     987        depOptimize(fFixCase, fQuiet);
    975988        fprintf(pOutput, "%s:", pszTarget);
    976989        depPrint(pOutput);
  • trunk/src/lib/kDep.c

    r2019 r2104  
    170170 * 'Optimizes' and corrects the dependencies.
    171171 */
    172 void depOptimize(int fFixCase)
     172void depOptimize(int fFixCase, int fQuiet)
    173173{
    174174    /*
     
    226226        if (stat(pszFilename, &s))
    227227        {
    228             fprintf(stderr, "kDep: Skipping '%s' - %s!\n", pszFilename, strerror(errno));
     228            if (   !fQuiet
     229                || errno != ENOENT
     230                || (   pszFilename[0] != '/'
     231                    && pszFilename[0] != '\\'
     232                    && (   !isalpha(pszFilename[0])
     233                        || pszFilename[1] != ':'
     234                        || (    pszFilename[2] != '/'
     235                            &&  pszFilename[2] != '\\')))
     236               )
     237                fprintf(stderr, "kDep: Skipping '%s' - %s!\n", pszFilename, strerror(errno));
    229238            continue;
    230239        }
  • trunk/src/lib/kDep.h

    r2019 r2104  
    4242
    4343extern PDEP depAdd(const char *pszFilename, size_t cchFilename);
    44 extern void depOptimize(int fFixCase);
     44extern void depOptimize(int fFixCase, int fQuiet);
    4545extern void depPrint(FILE *pOutput);
    4646extern void depPrintStubs(FILE *pOutput);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette