• raphael.kubo.da.costa's avatar
    gn: Generalize process_version() and move it to build/util (take #2) · dc683d2a
    raphael.kubo.da.costa authored
    (Compared to https://codereview.chromium.org/2308313003/, this version
    fixes chrome/installer/linux/BUILD.gn by including all required files)
    
    There is nothing really chrome-specific in the process_version()
    template, and if we stop always passing some files in chrome/ on every
    invocation it is possible to generalize it and move it to build/util
    instead (and fix some layering violation comments along the way).
    
    Compared to its previous incarnation, process_version() no longer passes
    LASTCHANGE, BRANDING and VERSION automatically to version.py. This makes
    it easier for callers to specify their own |sources| with values that
    may override those set in those 3 files.
    
    A new wrapper, process_version_rc_template(), was introduced to cater
    for callers (generally Windows ones) who need to process a .rc.version
    file that requires the values from LASTCHANGE, BRANDING and VERSION. It
    always passes those 3 files to process_version() before any optional
    additional |sources|, and |template_file| defaults to
    chrome_version.rc.version.
    Since this template depends on files from //chrome, it lives in the
    newly-added //chrome/process_version_rc_template.gni.
    
    R=dpranke@chromium.org,brettw@chromium.org,phajdan.jr@chromium.org,ddorwin@chromium.org
    CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng
    
    Review-Url: https://codereview.chromium.org/2341673003
    Cr-Commit-Position: refs/heads/master@{#419377}
    dc683d2a
process_version_rc_template.gni 2.12 KB