VirtualBox

Changeset 1792 in kBuild


Ignore:
Timestamp:
Sep 19, 2008 11:30:17 PM (17 years ago)
Author:
bird
Message:

kmk: Altered the behavior of $(kb-src-one ) when given an argument which is 2 or higher, it will then not include the depenceny file but add it to _DEPFILES for later inclusion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kbuild.c

    r1725 r1792  
    16981698    size_t cch;
    16991699    struct kbuild_sdks Sdks;
     1700    int iVer;
     1701
     1702    /*
     1703     * argv[0] is the function version. Prior to r1792 (early 0.1.5) this
     1704     * was undefined and footer.kmk always passed an empty string.
     1705     *
     1706     * Version 2, implemented in r1792, will delay the inclusion of the the
     1707     * dependency file till the end of footer.kmk using _DEPFILES.
     1708     */
     1709    if (!argv[0][0])
     1710        iVer = 0;
     1711    else
     1712        switch (argv[0][0] | (argv[0][1] << 8))
     1713        {
     1714            case '2': iVer = 2; break;
     1715            case '3': iVer = 3; break;
     1716            case '4': iVer = 4; break;
     1717            case '5': iVer = 5; break;
     1718            case '6': iVer = 6; break;
     1719            case '7': iVer = 7; break;
     1720            case '8': iVer = 8; break;
     1721            case '9': iVer = 9; break;
     1722            case '0': iVer = 0; break;
     1723            case '1': iVer = 1; break;
     1724            default:
     1725                iVer = 0;
     1726                psz = argv[0];
     1727                while (isblank((unsigned char)*psz))
     1728                    psz++;
     1729                if (*psz)
     1730                    iVer = atoi(psz);
     1731                break;
     1732        }
    17001733
    17011734    /*
     
    17361769    if (!s_fNoCompileCmdsDepsDefined)
    17371770    {
    1738         do_variable_definition(NILF, "_DEPFILES_INCLUDED", pDep->value, o_file, f_append, 0 /* !target_var */);
    1739         eval_include_dep(pDep->value, NILF);
     1771
     1772        if (iVer >= 2)
     1773            do_variable_definition(NILF, "_DEPFILES", pDep->value, o_file, f_append, 0 /* !target_var */);
     1774        else
     1775        {
     1776            do_variable_definition(NILF, "_DEPFILES_INCLUDED", pDep->value, o_file, f_append, 0 /* !target_var */);
     1777            eval_include_dep(pDep->value, NILF);
     1778        }
    17401779    }
    17411780
     
    18351874    kbuild_put_sdks(&Sdks);
    18361875    (void)pszFuncName;
    1837     (void)argv;
    18381876    return variable_buffer_output(o, "", 1);
    18391877}
Note: See TracChangeset for help on using the changeset viewer.

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