Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix config.gypi target #9053

Closed
wants to merge 3 commits into from

Commits on Oct 12, 2016

  1. build: fix config.gypi target

    The config.gypi target has a recipe that uses the control function error
    to report if the config.gypi file is missing or if it is stale (the
    configure file was updated which is a prerequisite of this rule).
    
    GNU make has two phases, immediate and deferred. During the first phase
     it will expand any variables or functions as the makefile is parsed.
    The recipe in this case is a shell if statement, which is a deferred
    construct. But the control function $(error) is an immediate construct
    which will cause the makefile processing to stop during the first phase
    of the Make process.
    
    If I understand this correctly the only possible outcome of this rule is
    the "Stale config.gypi, please re-run ./configure"  message which will
    be done in the first phase and then exit. The shell condition will not
    be considered. So it will never report that the config.gypi is missing.
    
    I've updated the recipe to use the echo command and an exit status. The
    downside of this is that the error message is not as nice.
    
    Current error message:
    Makefile:81: *** Stale config.gypi, please re-run ./configure.  Stop.
    
    "New error message":
    $ make config.gypi
    Stale config.gypi, please re-run ./configure
    make: *** [config.gypi] Error 1
    
    To verify the stale config.gypi:
    $ touch configure
    $ make
    
    To verfify that config.gypi is missing:
    $ rm config.gypi
    $ make
    danbev committed Oct 12, 2016
    Configuration menu
    Copy the full SHA
    23914d0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75ec3fb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a093fd View commit details
    Browse the repository at this point in the history