]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
tools/libs: Fix headers.chk logic
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 4 Mar 2021 22:30:00 +0000 (22:30 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Mar 2021 17:27:48 +0000 (17:27 +0000)
c/s 4664034cd dropped the $(LIBHEADERSGLOB) dependency for the headers.chk
rule, without replacing it.

As headers.chk uses $^, a typical build looks like:

  andrewcoop@andrewcoop:/local/xen.git$ make -C tools/libs/devicemodel/
  make: Entering directory '/local/xen.git/tools/libs/devicemodel'
  for i in ; do \
      gcc -x c -ansi -Wall -Werror -I/local/xen.git/tools/libs/devicemodel/../../../tools/include \
            -S -o /dev/null $i || exit 1; \
      echo $i; \
  done >headers.chk.new
  mv headers.chk.new headers.chk

i.e. with an empty for loop.

Reinsert a $(LIBHEADERS) dependency, so more than just the $(AUTOINCS) get
checked.

Fixes: 4664034cd ("tools/libs: move official headers to common directory")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/libs/libs.mk

index a68cec244c79b6f09e638c8be9d201a80c813fcb..2d973ccb950f9bf36be8ea766e824e0be76888ed 100644 (file)
@@ -76,7 +76,7 @@ else
 .PHONY: headers.chk
 endif
 
-headers.chk: $(AUTOINCS)
+headers.chk: $(LIBHEADERS) $(AUTOINCS)
 
 headers.lst: FORCE
        @{ set -e; $(foreach h,$(LIBHEADERS),echo $(h);) } > $@.tmp