]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
libs/libs.mk: Rework target headers.chk dependencies
authorAnthony PERARD <anthony.perard@citrix.com>
Mon, 15 Aug 2022 06:55:36 +0000 (08:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 15 Aug 2022 06:55:36 +0000 (08:55 +0200)
There is no need to call the "headers.chk" target when it isn't
wanted, so it never need to be .PHONY.

Also, there is no more reason to separate the prerequisites from the
recipe.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
tools/libs/libs.mk

index 7aee44937053c0db5958040d45bca2f8814cff71..f778a7df820a0d25bca7589b9a31db5a31dbc793 100644 (file)
@@ -55,22 +55,20 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_INCLUDE)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
 
 .PHONY: all
-all: headers.chk $(TARGETS) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS)
+all: $(TARGETS) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS)
 
 ifneq ($(NO_HEADERS_CHK),y)
-headers.chk:
+all: headers.chk
+
+headers.chk: $(LIBHEADERS) $(AUTOINCS)
        for i in $(filter %.h,$^); do \
            $(CC) -x c -ansi -Wall -Werror $(CFLAGS_xeninclude) \
                  -S -o /dev/null $$i || exit 1; \
            echo $$i; \
        done >$@.new
        mv $@.new $@
-else
-.PHONY: headers.chk
 endif
 
-headers.chk: $(LIBHEADERS) $(AUTOINCS)
-
 headers.lst: FORCE
        @{ set -e; $(foreach h,$(LIBHEADERS),echo $(h);) } > $@.tmp
        @$(call move-if-changed,$@.tmp,$@)