Skip to content

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

Merged
dirk-thomas merged 1 commit intoros-visualization:melodic-develfrom
rhaschke:melodic-devel
May 26, 2020
Merged

Use magic $(MAKE) variable to suppress build warning#91
dirk-thomas merged 1 commit intoros-visualization:melodic-develfrom
rhaschke:melodic-devel

Conversation

@rhaschke
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Cherry-picked to crystal-devel: 7b140ec.

@Tobias-Fischer
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

@Tobias-Fischer
Copy link
Copy Markdown

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