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,tools: fix cmd_regen_makefile #34255

Closed
wants to merge 2 commits into from

Commits on Jul 8, 2020

  1. build,tools: fix cmd_regen_makefile

    Currently, after having configured and built node and then updating a
    dependent target the following error is produced when trying to rebuild
    the project:
    
    $ ./configure && make -j8
    $ touch node.gypi
    $ make -j8
    configure: error: no such option: -f
    make[1]: *** [Makefile:685: Makefile] Error 2
    
    The reason for this is that the target 'cmd_regen_makefile' is using the
    command 'configure' instead of 'gyp_node.py' in out/Makefile:
    cmd_regen_makefile = cd $(srcdir); /work/nodejs/node/configure -fmake
    
    As far as I can tell gyp is using sys.argv[0] as the 'gyp_binary' in
    __init__.py:
    params = {'options': options,
                  ...
                  'gyp_binary': sys.argv[0],
    
    But when called via 'configure' sys.argv[0] is 'configure' instead of
    gyp_node.py leading to the above error.
    
    This commit suggests setting the program name explicitly in
    gyp_node.py. Alternatively perhaps this could be done in configure.py
    instead but I was not sure what would be best.
    danbev committed Jul 8, 2020
    Copy the full SHA
    9e30b73 View commit details
    Browse the repository at this point in the history
  2. squash!: correct comment

    danbev committed Jul 8, 2020
    Copy the full SHA
    2a3b3cf View commit details
    Browse the repository at this point in the history