Skip to content
Snippets Groups Projects
  • Alexandru Ardelean's avatar
    7c8c3226
    build: copy contents of 'src' folder to build dirs (if present) · 7c8c3226
    Alexandru Ardelean authored
    
    The normal Prepare step for a build is unpack, apply patches.
    But for certain packages, patches contain whole files, which
    would be nice to have separately and copied over as a last step
    in the Prepare phase.
    
    We need it for some other packages + patches, but I think
    the 'hostapd' package can be used as a test for this.
    
    As a quick note:
    the reason the condition is being evaluated as
    `[ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR)`
    and not with
    `[ -d ./src/ ] && $(CP) ./src/* $(HOST_BUILD_DIR)`
    is that the latter would translate in a build failure if the `src`
    folder is not present (the exit code would be 1).
    The first one, succeeds for both cases (if `src` present or not).
    
    Signed-off-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
    7c8c3226
    History
    build: copy contents of 'src' folder to build dirs (if present)
    Alexandru Ardelean authored
    
    The normal Prepare step for a build is unpack, apply patches.
    But for certain packages, patches contain whole files, which
    would be nice to have separately and copied over as a last step
    in the Prepare phase.
    
    We need it for some other packages + patches, but I think
    the 'hostapd' package can be used as a test for this.
    
    As a quick note:
    the reason the condition is being evaluated as
    `[ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR)`
    and not with
    `[ -d ./src/ ] && $(CP) ./src/* $(HOST_BUILD_DIR)`
    is that the latter would translate in a build failure if the `src`
    folder is not present (the exit code would be 1).
    The first one, succeeds for both cases (if `src` present or not).
    
    Signed-off-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>