Message ID | 591577E60200007800159179@prv-mh.provo.novell.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, May 12, 2017 at 12:52:54AM -0600, Jan Beulich wrote: > The rule for headers++.chk wants to move headers++.chk.new to the > designated target, which means we have to create that file in the first > place. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> If I were to fix it I would just skip the check altogether if CXX isn't available. But this approach is fine, too.
>>> On 12.05.17 at 18:20, <wei.liu2@citrix.com> wrote: > On Fri, May 12, 2017 at 12:52:54AM -0600, Jan Beulich wrote: >> The rule for headers++.chk wants to move headers++.chk.new to the >> designated target, which means we have to create that file in the first >> place. >> >> Signed-off-by: Jan Beulich <jbeulich@suse.com> > > Reviewed-by: Wei Liu <wei.liu2@citrix.com> Thanks. > If I were to fix it I would just skip the check altogether if CXX isn't > available. But this approach is fine, too. I may not be understanding what you mean: The test is being skipped; the destination file is being touched so that on an incremental re-build the rule wouldn't be re-run. What else are you imagining? Suppressing the headers++.chk target altogether would likely be more code churn, with an overall harder to read Makefile as a result. Yet if you have something neat and lightweight in mind, I'm all ears (likely for post-4.9 then). Jan
Hi Jan, On 12/05/17 07:52, Jan Beulich wrote: > The rule for headers++.chk wants to move headers++.chk.new to the > designated target, which means we have to create that file in the first > place. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Release-acked-by: Julien Grall <julien.grall@arm.com> Cheers, > > --- a/xen/include/Makefile > +++ b/xen/include/Makefile > @@ -120,7 +120,10 @@ headers99.chk: $(PUBLIC_C99_HEADERS) Mak > > headers++.chk: $(PUBLIC_HEADERS) Makefile > rm -f $@.new > - $(CXX) -v >/dev/null 2>&1 || exit 0; \ > + if ! $(CXX) -v >/dev/null 2>&1; then \ > + touch $@.new; \ > + exit 0; \ > + fi; \ > $(foreach i, $(filter %.h,$^), \ > echo "#include "\"$(i)\" \ > | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \ > > >
On Mon, May 15, 2017 at 01:02:48AM -0600, Jan Beulich wrote: > >>> On 12.05.17 at 18:20, <wei.liu2@citrix.com> wrote: > > On Fri, May 12, 2017 at 12:52:54AM -0600, Jan Beulich wrote: > >> The rule for headers++.chk wants to move headers++.chk.new to the > >> designated target, which means we have to create that file in the first > >> place. > >> > >> Signed-off-by: Jan Beulich <jbeulich@suse.com> > > > > Reviewed-by: Wei Liu <wei.liu2@citrix.com> > > Thanks. > > > If I were to fix it I would just skip the check altogether if CXX isn't > > available. But this approach is fine, too. > > I may not be understanding what you mean: The test is being skipped; > the destination file is being touched so that on an incremental re-build > the rule wouldn't be re-run. What else are you imagining? Suppressing > the headers++.chk target altogether would likely be more code churn, Yes that's what I was thinking. But as you said it's going to be more code churn. Wei.
--- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -120,7 +120,10 @@ headers99.chk: $(PUBLIC_C99_HEADERS) Mak headers++.chk: $(PUBLIC_HEADERS) Makefile rm -f $@.new - $(CXX) -v >/dev/null 2>&1 || exit 0; \ + if ! $(CXX) -v >/dev/null 2>&1; then \ + touch $@.new; \ + exit 0; \ + fi; \ $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \