• Arkadiusz Hiler's avatar
    man/build: Fix dependency handling · fdad47c9
    Arkadiusz Hiler authored
    build_man is a 'feature' option, which means that we get an opaque
    object, so comparing it to 'yes' is always false.
    
    It should have been 'if build_man.enabled()'.
    
    But going even further we can prune the whole check, as rst2man is
    defined as follows:
    
    rst2man = find_program('rst2man-3', 'rst2man', required : build_man)
    
    >From the patch overhauling those options:
    
        get_option() on a feature returns opaque object that can be passed as
        a 'required' argument of a dependency. Auto is equivalent to 'required
        : false', enabled is equivalent to 'required : true' and disabled
        introduces new behavior forcing the dependency to be considered not
        found.
    
    This would cause the build to fail if build_man is enabled (aka
    'required') and rst2man is not found. So...
    
    if rst2man.found()
      # rst2man found
      # buildu buildu
    else
      # rst2man not found, but considered optional because
      # we haven't erred out on find_program
      if build_man.enabled() # cannot be, it's optional!
        error('...')
      endif
    endif
    
    We can get rid of the whole else block here.
    
    Cc: Antonio Argenziano <antonio.argenziano@intel.com>
    Cc: Petri Latvala <petri.latvala@intel.com>
    Signed-off-by: 's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
    Reviewed-by: 's avatarSimon Ser <simon.ser@intel.com>
    fdad47c9
Name
Last commit
Last update
..
.gitignore Loading commit data...
defs.rst.in Loading commit data...
intel_aubdump.rst Loading commit data...
intel_audio_dump.rst Loading commit data...
intel_bios_dumper.rst Loading commit data...
intel_error_decode.rst Loading commit data...
intel_gpu_frequency.rst Loading commit data...
intel_gpu_top.rst Loading commit data...
intel_gtt.rst Loading commit data...
intel_infoframes.rst Loading commit data...
intel_lid.rst Loading commit data...
intel_panel_fitter.rst Loading commit data...
intel_reg.rst Loading commit data...
intel_stepping.rst Loading commit data...
intel_upload_blit_large.rst Loading commit data...
intel_upload_blit_large_gtt.rst Loading commit data...
intel_upload_blit_large_map.rst Loading commit data...
intel_upload_blit_small.rst Loading commit data...
intel_vbt_decode.rst Loading commit data...
meson.build Loading commit data...
rst2man.sh Loading commit data...