VirtualBox

Changeset 26345 in vbox for trunk/src/bldprogs


Ignore:
Timestamp:
Feb 9, 2010 3:40:02 AM (15 years ago)
Author:
vboxsync
Message:

scm: config and build fix.

Location:
trunk/src/bldprogs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/Makefile.kmk

    r26340 r26345  
    3232
    3333PROGRAMS += scm
    34 scm_TEMPLATE = VBoxR3Static
     34scm_TEMPLATE = VBOXR3EXE
    3535scm_SOURCES = scm.cpp
    3636scm_LIBS = \
  • trunk/src/bldprogs/scm.cpp

    r26342 r26345  
    204204static int          g_iVerbosity            = 2;//99; //0;
    205205static const char  *g_pszFileFilter         = "*";
    206 static const char  *g_pszFileFilterOut      = "*.exe|*.com|20*-*-*.log";
     206static const char  *g_pszFileFilterOut      =
     207    "*.exe|"
     208    "*.com|"
     209    "20*-*-*.log|"
     210    "*/src/VBox/Runtime/testcase/soundcard.h|"
     211    "*/src/VBox/Runtime/include/internal/ldrELF*.h|"
     212    "*/src/VBox/Runtime/common/math/x86/fenv-x86.c|"
     213    "*/src/VBox/Runtime/common/checksum/md5.cpp|"
     214    "/dummy/."
     215;
    207216static const char  *g_pszDirFilter          = NULL;
    208 static const char  *g_pszDirFilterOut       = \
     217static const char  *g_pszDirFilterOut       =
    209218    // generic
    210219    ".svn|"
     
    228237    "*/src/VBox/Devices/PC/Etherboot-src/*/.|"
    229238    "*/src/VBox/Devices/Network/lwip/.|"
    230     "*/src/VBox/Devices/Storage/VBoxHDDFormats/StorageCraft/*/."
     239    "*/src/VBox/Devices/Storage/VBoxHDDFormats/StorageCraft/*/.|"
     240    "*/src/VBox/Runtime/r0drv/solaris/vbi/*/.|"
     241    "*/src/VBox/Runtime/common/math/gcc/.|"
     242    "/dummy"
    231243;
    232244
     
    18631875    }
    18641876    if (   g_pszFileFilterOut
    1865         && RTStrSimplePatternMultiMatch(g_pszFileFilterOut, RTSTR_MAX, pszBasename, cchBasename, NULL))
     1877        && (   RTStrSimplePatternMultiMatch(g_pszFileFilterOut, RTSTR_MAX, pszBasename, cchBasename, NULL)
     1878            || RTStrSimplePatternMultiMatch(g_pszFileFilterOut, RTSTR_MAX, pszFilename, RTSTR_MAX, NULL)) )
    18661879    {
    18671880        ScmVerbose(4, "file filter out: \"%s\"\n", pszFilename);
     
    20952108 *
    20962109 * @returns IPRT status code.
    2097  * @param   pszDir              The directory to start with.
    2098  */
    2099 static int scmProcessDirTree(const char *pszDir)
     2110 * @param   pszDir              The directory to start with.  This is pointer to
     2111 *                              a RTPATH_MAX sized buffer.
     2112 */
     2113static int scmProcessDirTree(char *pszDir)
    21002114{
    21012115    /*
    21022116     * Setup the recursion.
    21032117     */
    2104     char szBuf[RTPATH_MAX];
    2105     int rc = RTPathAbs(pszDir, szBuf, sizeof(szBuf));
     2118    int rc = RTPathAppend(pszDir, RTPATH_MAX, ".");
    21062119    if (RT_SUCCESS(rc))
    2107         rc = RTPathAppend(szBuf, sizeof(szBuf), ".");
    2108     if (RT_FAILURE(rc))
    2109     {
    2110         RTMsgError("RTPathAbs/Append: %Rrc\n", rc);
    2111         return rc;
    2112     }
    2113 
    2114     /*
    2115      * Get going.
    2116      */
    2117     RTDIRENTRY Entry;
    2118     return scmProcessDirTreeRecursion(szBuf, strlen(szBuf), &Entry, 0);
     2120    {
     2121        RTDIRENTRY Entry;
     2122        rc = scmProcessDirTreeRecursion(pszDir, strlen(pszDir), &Entry, 0);
     2123    }
     2124    else
     2125        RTMsgError("RTPathAppend: %Rrc\n", rc);
     2126    return rc;
    21192127}
    21202128
     
    21282136static int scmProcessSomething(const char *pszSomething)
    21292137{
    2130     if (RTFileExists(pszSomething))
    2131     {
    2132         const char *pszBasename = RTPathFilename(pszSomething);
    2133         if (!pszBasename)
    2134             return VERR_IS_A_DIRECTORY;
    2135 
    2136         size_t cchBasename = strlen(pszBasename);
    2137         if (    (   g_pszFileFilter
    2138                 || RTStrSimplePatternMultiMatch(g_pszFileFilter, RTSTR_MAX,
    2139                                                 pszBasename, cchBasename, NULL))
    2140             &&  (   g_pszFileFilterOut == NULL
    2141                 || !RTStrSimplePatternMultiMatch(g_pszFileFilterOut, RTSTR_MAX,
    2142                                                  pszBasename, cchBasename, NULL))
    2143             )
    2144             return scmProcessFile(pszSomething, pszBasename, cchBasename);
    2145         return VINF_SUCCESS;
    2146     }
    2147 
    2148     /*
    2149      * If it's not a file, try treat it as a directory tree.
    2150      */
    2151     return scmProcessDirTree(pszSomething);
     2138    char szBuf[RTPATH_MAX];
     2139    int rc = RTPathAbs(pszSomething, szBuf, sizeof(szBuf));
     2140    if (RT_SUCCESS(rc))
     2141    {
     2142        if (RTFileExists(szBuf))
     2143        {
     2144            const char *pszBasename = RTPathFilename(szBuf);
     2145            if (pszBasename)
     2146            {
     2147                size_t cchBasename = strlen(pszBasename);
     2148                rc = scmProcessFile(szBuf, pszBasename, cchBasename);
     2149            }
     2150            else
     2151            {
     2152                RTMsgError("RTPathFilename: NULL\n");
     2153                rc = VERR_IS_A_DIRECTORY;
     2154            }
     2155        }
     2156        else
     2157            rc = scmProcessDirTree(szBuf);
     2158    }
     2159    else
     2160        RTMsgError("RTPathAbs: %Rrc\n", rc);
     2161    return rc;
    21522162}
    21532163
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