|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 2/4] xen: introduce a C99 headers check
>>> On 30.03.17 at 00:18, <sstabellini@xxxxxxxxxx> wrote:
> @@ -104,16 +105,22 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile
> done >$@.new
> mv $@.new $@
>
> +headers99.chk: $(PUBLIC_C99_HEADERS) Makefile
> + rm -f $@.new $@
Why also $@?
> + $(foreach i, $(filter %.h,$^), $(CC) -x c -std=c99 -Wall -Werror \
> + -include stdint.h $($(i)-c99-prereq) -S -o /dev/null $(i) || \
> + exit 1; echo $(i) >> $@.new;)
> + mv $@.new $@
> +
> headers++.chk: $(PUBLIC_HEADERS) Makefile
> - if $(CXX) -v >/dev/null 2>&1; then \
> - for i in $(filter %.h,$^); do \
> - echo '#include "'$$i'"' \
> - | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
> - -include stdint.h -include public/xen.h -S -o /dev/null - \
> - || exit 1; \
> - echo $$i; \
> - done ; \
> - fi >$@.new
> + if ! $(CXX) -v >/dev/null 2>&1; then \
> + exit 0; \
> + fi
How about
$(CXX) -v >/dev/null 2>&1 || exit 0
avoiding the line continuations?
You can't, however, separate this from the rest (or else the
following commands will be executed anyway).
> + rm -f $@.new $@
This will then want moving ahead (without the $@).
> + $(foreach i, $(filter %.h,$^), echo "#include "\"$(i)\"| \
> + $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
> + -include stdint.h $($(i)-cxx-prereq) -include public/xen.h \
I think the prereq(s) should come after public/xen.h (the presence
of which I question anyway, as all headers should include it if there
is a dependency).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |