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

Use magic $(MAKE) variable to suppress build warning #91

Merged
merged 1 commit into from
May 26, 2020

Conversation

rhaschke
Copy link
Contributor

According to the gnu make documentation, a subprocess make should use the $(MAKE) variable or +make to tell the parent make process that the child is actually a make process as well.

This is required to suppress the warning:
warning: jobserver unavailable: using -j1. Add +' to parent make rule.`

According to the gnu make documentation, a subprocess make should use
the $(MAKE) variable or +make to tell the parent make process that
the child is actually a make process as well.

This is required to suppress the warning
`warning: jobserver unavailable: using -j1. Add `+' to parent make rule.`
@dirk-thomas
Copy link
Contributor

Thanks for the patch.

@dirk-thomas dirk-thomas merged commit 1b440d7 into ros-visualization:melodic-devel May 26, 2020
dirk-thomas pushed a commit that referenced this pull request May 26, 2020
According to the gnu make documentation, a subprocess make should use
the $(MAKE) variable or +make to tell the parent make process that
the child is actually a make process as well.

This is required to suppress the warning
`warning: jobserver unavailable: using -j1. Add `+' to parent make rule.`
@dirk-thomas
Copy link
Contributor

Cherry-picked to crystal-devel: 7b140ec.

@Tobias-Fischer
Copy link

This leads to a cmake error on my machine:

CMake Error:
  Running

   '/Users/tobias/opt/anaconda3/conda-bld/ros_1590965520994/_build_env/bin/ninja' '-C' '/Users/tobias/opt/anaconda3/conda-bld/ros_1590965520994/work/build' '-t' 'cleandead'

  failed with:

   ninja: error: build.ninja:621: bad $-escape (literal $ must be written as $$)

I am not sure why the $ is escaped with a ?

@rhaschke
Copy link
Contributor Author

rhaschke commented Jun 1, 2020

According to the GNU documentation, the command in the makefile should read $(MAKE), which it exactly does:

/vol/sandbox/rviz/devel/.private/rviz/lib/python2.7/dist-packages/rviz/librviz_sip.so: sip/rviz_sip/Makefile
        cd /vol/sandbox/rviz/build/rviz/sip/rviz_sip && $(MAKE)

In cmake the dollar needs to be escaped with a backslash in order to be not interpreted by cmake.
I'm tempted to blame ninja. Please file a bug report over there.

@Tobias-Fischer
Copy link

You are right, I would not have expected that: ninja-build/ninja#1140

@Tobias-Fischer
Copy link

Or maybe that issue is more related: https://gitlab.kitware.com/cmake/cmake/-/issues/18062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants